#371 Cannot delete a row if the table contains a large binary column

4.0.2
closed-fixed
nobody
None
5
2014-02-24
2014-01-17
No

I wanted to create a column to store ipv6 addresses in binary. I accidentally created a column of 128 bytes (instead of 128 bit). Then I found out I was unable to delete rows by using the checkboxes and delete button.

My table definition is:
CREATE TABLE attempts (
operation enum('authenticate','release') CHARACTER SET ascii COLLATE ascii_bin NOT NULL DEFAULT 'authenticate',
user_id int(10) unsigned NOT NULL DEFAULT '0',
attempt_ip binary(128) NOT NULL,
attempt_time datetime NOT NULL,
success tinyint(3) unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

I'm using Apache 2.2.22, MySQL 5.5.24, PHP 5.4.3

Discussion

  • Rogier Hartgring

    I now notice that delete also doesn't work for smaller binaries.

    This is my table definition and record:

    CREATE TABLE attempts (
    operation enum('authenticate','release') CHARACTER SET ascii COLLATE ascii_bin NOT NULL DEFAULT 'authenticate',
    user_id int(10) unsigned NOT NULL DEFAULT '0',
    attempt_ip binary(16) NOT NULL,
    attempt_time datetime NOT NULL,
    success tinyint(3) unsigned NOT NULL DEFAULT '0'
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

    INSERT INTO attempts (operation, user_id, attempt_ip, attempt_time, success) VALUES
    ('authenticate', 15, UNHEX('7F000001000000000000000000000000'), '0000-00-00 00:00:00', 1);

     
  • Jakub Vrána

    Jakub Vrána - 2014-01-20

    It's always a good idea to use a primary key in the table.

     
  • Jakub Vrána

    Jakub Vrána - 2014-02-24
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks