From: Date: April 8 2008 2:14pm Subject: bk commit into 5.1 tree (mattiasj:1.2576) BUG#31210 List-Archive: http://lists.mysql.com/commits/45054 X-Bug: 31210 Message-Id: <20080408121408.2EFFD45C730@witty.localhost> Below is the list of changes that have just been committed into a local 5.1 repository of mattiasj. When mattiasj does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet@stripped, 2008-04-08 14:13:53+02:00, mattiasj@witty. +6 -0 Bug#31210: INSERT DELAYED crashes server when used on partitioned tables Problem was an unclear error message since it could suggest that MyISAM did not support INSERT DELAYED. Changed the error message to say that DELAYED is not supported by the table, instead of the table's storage engine. The confusion is that a partitioned table is in somewhat sense using the partitioning storage engine, which in turn uses the ordinary storage engine. By saying that the table does not support DELAYED we do not give any extra informantion about the storage engine or if it is partitioned. mysql-test/r/innodb-replace.result@stripped, 2008-04-08 13:24:16+02:00, mattiasj@witty. +2 -2 Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message mysql-test/t/innodb-replace.test@stripped, 2008-04-08 13:24:16+02:00, mattiasj@witty. +2 -2 Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message mysql-test/t/merge.test@stripped, 2008-04-08 13:24:16+02:00, mattiasj@witty. +3 -3 Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message mysql-test/t/partition_hash.test@stripped, 2008-04-08 13:24:16+02:00, mattiasj@witty. +3 -2 Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message sql/share/errmsg.txt@stripped, 2008-04-08 13:24:17+02:00, mattiasj@witty. +3 -0 Bug#31210: INSERT DELAYED crashes server when used on partitioned tables added error message for tables not supporting DELAYED sql/sql_insert.cc@stripped, 2008-04-08 13:24:16+02:00, mattiasj@witty. +1 -1 Bug#31210: INSERT DELAYED crashes server when used on partitioned tables changed error message diff -Nrup a/mysql-test/r/innodb-replace.result b/mysql-test/r/innodb-replace.result --- a/mysql-test/r/innodb-replace.result 2007-02-15 15:39:01 +01:00 +++ b/mysql-test/r/innodb-replace.result 2008-04-08 13:24:16 +02:00 @@ -3,11 +3,11 @@ create table t1 (c1 char(5) unique not n select * from t1; c1 c2 stamp replace delayed into t1 (c1, c2) values ( "text1","11"); -ERROR HY000: Table storage engine for 't1' doesn't have this option +ERROR HY000: DELAYED option not supported for table 't1' select * from t1; c1 c2 stamp replace delayed into t1 (c1, c2) values ( "text1","12"); -ERROR HY000: Table storage engine for 't1' doesn't have this option +ERROR HY000: DELAYED option not supported for table 't1' select * from t1; c1 c2 stamp drop table t1; diff -Nrup a/mysql-test/t/innodb-replace.test b/mysql-test/t/innodb-replace.test --- a/mysql-test/t/innodb-replace.test 2007-02-15 15:39:01 +01:00 +++ b/mysql-test/t/innodb-replace.test 2008-04-08 13:24:16 +02:00 @@ -11,10 +11,10 @@ drop table if exists t1; # create table t1 (c1 char(5) unique not null, c2 int, stamp timestamp) engine=innodb; select * from t1; ---error 1031 +--error ER_DELAYED_NOT_SUPPORTED replace delayed into t1 (c1, c2) values ( "text1","11"); select * from t1; ---error 1031 +--error ER_DELAYED_NOT_SUPPORTED replace delayed into t1 (c1, c2) values ( "text1","12"); select * from t1; drop table t1; diff -Nrup a/mysql-test/t/merge.test b/mysql-test/t/merge.test --- a/mysql-test/t/merge.test 2008-03-14 16:57:59 +01:00 +++ b/mysql-test/t/merge.test 2008-04-08 13:24:16 +02:00 @@ -1201,7 +1201,7 @@ UNLOCK TABLES; # Succeeds in embedded server - is converted to normal insert # Fails in normal server, ps-protocol - not supported by engine # Fails in normal server, normal protocol - not a base table ---error 0, ER_ILLEGAL_HA, ER_WRONG_OBJECT +--error 0, ER_DELAYED_NOT_SUPPORTED, ER_WRONG_OBJECT INSERT DELAYED INTO t4 VALUES(44); # Get rid of row in embedded server DELETE FROM t4 WHERE c1 = 44; @@ -1214,9 +1214,9 @@ INSERT DELAYED INTO t3 VALUES(33); } SELECT * FROM t4 ORDER BY c1; LOCK TABLES t3 WRITE, t2 WRITE, t4 WRITE, t1 WRITE; ---error ER_DELAYED_INSERT_TABLE_LOCKED, ER_ILLEGAL_HA +--error ER_DELAYED_INSERT_TABLE_LOCKED, ER_DELAYED_NOT_SUPPORTED INSERT DELAYED INTO t4 VALUES(444); ---error ER_DELAYED_INSERT_TABLE_LOCKED, ER_ILLEGAL_HA +--error ER_DELAYED_INSERT_TABLE_LOCKED, ER_DELAYED_NOT_SUPPORTED INSERT DELAYED INTO t3 VALUES(333); SELECT * FROM t4 ORDER BY c1; UNLOCK TABLES; diff -Nrup a/mysql-test/t/partition_hash.test b/mysql-test/t/partition_hash.test --- a/mysql-test/t/partition_hash.test 2007-11-20 11:20:55 +01:00 +++ b/mysql-test/t/partition_hash.test 2008-04-08 13:24:16 +02:00 @@ -165,8 +165,9 @@ drop table t1; # CREATE TABLE t1 (c1 INT) ENGINE=MyISAM PARTITION BY HASH(c1) PARTITIONS 1; # The test succeeds in an embedded server because normal insert is done. -# The test fails in a normal server with "engine doesn't have this option". ---error 0, ER_ILLEGAL_HA +# The test fails in a normal server with +# "DELAYED option not supported by table". +--error 0, ER_DELAYED_NOT_SUPPORTED INSERT DELAYED INTO t1 VALUES (1); DROP TABLE t1; diff -Nrup a/sql/share/errmsg.txt b/sql/share/errmsg.txt --- a/sql/share/errmsg.txt 2008-02-17 12:50:33 +01:00 +++ b/sql/share/errmsg.txt 2008-04-08 13:24:17 +02:00 @@ -6121,3 +6121,6 @@ ER_NO_FORMAT_DESCRIPTION_EVENT_BEFORE_BI eng "The BINLOG statement of type `%s` was not preceded by a format description BINLOG statement." ER_SLAVE_CORRUPT_EVENT eng "Corrupted replication event was detected" + +ER_DELAYED_NOT_SUPPORTED + eng "DELAYED option not supported for table '%-.192s'" diff -Nrup a/sql/sql_insert.cc b/sql/sql_insert.cc --- a/sql/sql_insert.cc 2008-03-28 14:37:25 +01:00 +++ b/sql/sql_insert.cc 2008-04-08 13:24:16 +02:00 @@ -2305,7 +2305,7 @@ pthread_handler_t handle_delayed_insert( if (!(di->table->file->ha_table_flags() & HA_CAN_INSERT_DELAYED)) { thd->fatal_error(); - my_error(ER_ILLEGAL_HA, MYF(0), di->table_list.table_name); + my_error(ER_DELAYED_NOT_SUPPORTED, MYF(0), di->table_list.table_name); goto err; } if (di->table->triggers)