mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug#46616: Assertion `!table->auto_increment_field_not_null' on
view manipulations The bespoke flag was not properly reset after last call to fill_record. Fixed by resetting in caller mysql_update. mysql-test/r/auto_increment.result: Bug#46616: Test result. mysql-test/t/auto_increment.test: Bug#46616: Test case. sql/sql_update.cc: Bug#46616: Fix.
This commit is contained in:
@@ -292,3 +292,19 @@ update t1 set a=2 where a=1;
|
||||
insert into t1 (val) values (1);
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
--echo #
|
||||
--echo # Bug#46616: Assertion `!table->auto_increment_field_not_null' on view
|
||||
--echo # manipulations
|
||||
--echo #
|
||||
CREATE TABLE t1 ( a INT );
|
||||
INSERT INTO t1 VALUES (1), (1);
|
||||
|
||||
CREATE TABLE t2 ( a INT AUTO_INCREMENT KEY );
|
||||
--error ER_DUP_ENTRY
|
||||
CREATE TABLE IF NOT EXISTS t2 AS SELECT a FROM t1;
|
||||
|
||||
UPDATE t2 SET a = 2;
|
||||
|
||||
SELECT a FROM t2;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
Reference in New Issue
Block a user