Bug #18443 | ALTER to TEXT w/o PK deletes fail, ALTER w/ PK both update and deletes fail | ||
---|---|---|---|
Submitted: | 22 Mar 2006 23:06 | Modified: | 23 Mar 2006 13:02 |
Reporter: | Jonathan Miller | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S2 (Serious) |
Version: | 5.1.8 | OS: | Linux (Linux 32 Bit OS) |
Assigned to: | CPU Architecture: | Any |
[22 Mar 2006 23:06]
Jonathan Miller
[23 Mar 2006 2:54]
Jonathan Miller
So now this is interesting. If I update the table to have a PK so that the ALTER to text won't complain about not having a PK to replicate blobs with, then updates to the table also start to fail after the ALTER: mysql> CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, f FLOAT DEFAULT 0, total BIGINT UNSIGNED, y YEAR, t DATE, PRIMARY KEY(id, t)) ENGINE=NDB PARTITION BY RANGE (YEAR(t)) (PARTITION p0 VALUES LESS THAN (1901), PARTITION p1 VALUES LESS THAN (1946), PARTITION p2 VALUES LESS THAN (1966), PARTITION p3 VALUES LESS THAN (1986), PARTITION p4 VALUES LESS THAN (2005), PARTITION p5 VALUES LESS THAN MAXVALUE); ALTER TABLE t1 MODIFY vc TEXT; INSERT INTO t1 VALUES(42,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer', 654321.4321,15.21,0,1965,"1905-11-14"); INSERT INTO t1 VALUES(2,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer', 654321.4321,15.21,0,1965,"1965-11-14"); INSERT INTO t1 VALUES(4,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer', 654321.4321,15.21,0,1965,"1985-11-14"); INSERT INTO t1 VALUES(142,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer', 654321.4321,15.21,0,1965,"1995-11-14"); INSERT INTO t1 VALUES(412,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer', 654321.4321,15.21,0,1965,"2005-11-14"); INSERT INTO t1 VALUES(422,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer', 654321.4321,15.21,0,1965,"2005-11-14"); select id,hex(b1),vc,bc,d,f,total,y,t from t1 order by id; UPDATE t1 SET b1 = 0, t="2006-02-22" WHERE id = 412; SELECT id,hex(b1),vc,bc,d,f,total,y,t FROM t1 WHERE id = 412; DELETE FROM t1 WHERE id = 42; SELECT COUNT(*) FROM t1; INSERT INTO t1 VALUES(32,1,'Testing MySQL databases is a cool ', 'Must make it bug free for the customer', 654321.4321,15.21,0,1965,"2005-11-14"); DELETE FROM t1; Results: Query OK, 1 row affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Query OK, 1 row affected (0.01 sec) Query OK, 1 row affected (0.00 sec) Query OK, 1 row affected (0.00 sec) Query OK, 1 row affected (0.00 sec) +-----+---------+------------------------------------+----------------------------------------+-------------+-------+-------+------+------------+ | id | hex(b1) | vc | bc | d | f | total | y | t | +-----+---------+------------------------------------+----------------------------------------+-------------+-------+-------+------+------------+ | 2 | 1 | Testing MySQL databases is a cool | Must make it bug free for the customer | 654321.4321 | 15.21 | 0 | 1965 | 1965-11-14 | | 4 | 1 | Testing MySQL databases is a cool | Must make it bug free for the customer | 654321.4321 | 15.21 | 0 | 1965 | 1985-11-14 | | 42 | 1 | Testing MySQL databases is a cool | Must make it bug free for the customer | 654321.4321 | 15.21 | 0 | 1965 | 1905-11-14 | | 142 | 1 | Testing MySQL databases is a cool | Must make it bug free for the customer | 654321.4321 | 15.21 | 0 | 1965 | 1995-11-14 | | 412 | 1 | Testing MySQL databases is a cool | Must make it bug free for the customer | 654321.4321 | 15.21 | 0 | 1965 | 2005-11-14 | | 422 | 1 | Testing MySQL databases is a cool | Must make it bug free for the customer | 654321.4321 | 15.21 | 0 | 1965 | 2005-11-14 | +-----+---------+------------------------------------+----------------------------------------+-------------+-------+-------+------+------------+ 6 rows in set (0.05 sec) ERROR 1296 (HY000): Got error 311 'Unknown error code' from NDBCLUSTER +-----+---------+------------------------------------+----------------------------------------+-------------+-------+-------+------+------------+ | id | hex(b1) | vc | bc | d | f | total | y | t | +-----+---------+------------------------------------+----------------------------------------+-------------+-------+-------+------+------------+ | 412 | 1 | Testing MySQL databases is a cool | Must make it bug free for the customer | 654321.4321 | 15.21 | 0 | 1965 | 2005-11-14 | +-----+---------+------------------------------------+----------------------------------------+-------------+-------+-------+------+------------+ 1 row in set (0.04 sec) ERROR 1296 (HY000): Got error 311 'Unknown error code' from NDBCLUSTER +----------+ | COUNT(*) | +----------+ | 6 | +----------+ 1 row in set (0.04 sec) ERROR 1296 (HY000): Got error 311 'Unknown error code' from NDBCLUSTER
[23 Mar 2006 6:17]
Jonas Oreland
This is a duplicate of bug#16976 When using blobs and non native partitioning, the partition id is not set in blob operation casuing 311. TEXT is impl. as blob. Range partitioning is handled by mysqld (not ndbd)
[23 Mar 2006 12:59]
Jonas Oreland
That should be bug#16796
[23 Mar 2006 13:02]
Jonathan Miller
Duplicate of the bug Jonas pointed out. I will add a link to this report to original bug report.