Commit c2d3d6bb authored by Jon Olav Hauglid's avatar Jon Olav Hauglid

automerge

parents d539c157 63541129
...@@ -503,3 +503,14 @@ ERROR HY000: Recursive stored functions and triggers are not allowed. ...@@ -503,3 +503,14 @@ ERROR HY000: Recursive stored functions and triggers are not allowed.
DROP TABLE t1; DROP TABLE t1;
DROP FUNCTION f1; DROP FUNCTION f1;
End of 5.0 tests End of 5.0 tests
#
# Bug #47919 assert in open_table during ALTER temporary table
#
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT, PRIMARY KEY (f1));
CREATE TEMPORARY TABLE t2 LIKE t1;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
ALTER TABLE t2 COMMENT = 'ABC';
UPDATE t2, t1 SET t2.f1 = 2, t1.f1 = 9;
ALTER TABLE t2 COMMENT = 'DEF';
DROP TABLE t1, t2;
...@@ -452,3 +452,18 @@ DROP TABLE t1; ...@@ -452,3 +452,18 @@ DROP TABLE t1;
DROP FUNCTION f1; DROP FUNCTION f1;
--echo End of 5.0 tests --echo End of 5.0 tests
--echo #
--echo # Bug #47919 assert in open_table during ALTER temporary table
--echo #
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT, PRIMARY KEY (f1));
CREATE TEMPORARY TABLE t2 LIKE t1;
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
ALTER TABLE t2 COMMENT = 'ABC';
UPDATE t2, t1 SET t2.f1 = 2, t1.f1 = 9;
ALTER TABLE t2 COMMENT = 'DEF';
DROP TABLE t1, t2;
...@@ -1696,6 +1696,11 @@ bool multi_update::send_data(List<Item> &not_used_values) ...@@ -1696,6 +1696,11 @@ bool multi_update::send_data(List<Item> &not_used_values)
TRG_EVENT_UPDATE)) TRG_EVENT_UPDATE))
DBUG_RETURN(1); DBUG_RETURN(1);
/*
Reset the table->auto_increment_field_not_null as it is valid for
only one row.
*/
table->auto_increment_field_not_null= FALSE;
found++; found++;
if (!can_compare_record || compare_record(table)) if (!can_compare_record || compare_record(table))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment