mirror of
https://github.com/MariaDB/server.git
synced 2025-02-23 13:53:10 +01:00

table->move_fields has some limitations: 1. It cannot be used in cascade 2. It should always have a restoring pair In this case, an error has occurred before the field ptr was restored, returning from the function in that state. Even in case of an error, the table can be reused afterwards and table->field[i]->ptr is not reset in between. The solution is to restore the field pointers immanently whenever they've been deviated. Also add an assertion that ensures that table fields are restored after the use in close_thread_tables.
19 lines
485 B
Text
19 lines
485 B
Text
SET @save_sql_mode=@@global.sql_mode;
|
|
SET sql_mode=ORACLE;
|
|
SET GLOBAL sql_mode='ORACLE';
|
|
|
|
|
|
--echo # MDEV-27769 Assertion failed in Field::ptr_in_record upon UPDATE
|
|
CREATE TABLE t (s geometry, t text) engine innodb;
|
|
INSERT IGNORE INTO t () VALUES ();
|
|
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
|
UPDATE IGNORE t SET t= '', s = 0;
|
|
--error ER_CANT_CREATE_GEOMETRY_OBJECT
|
|
UPDATE IGNORE t SET t= '', s = 0;
|
|
|
|
ALTER TABLE t force;
|
|
|
|
DROP TABLE t;
|
|
|
|
# Test cleanup
|
|
SET GLOBAL sql_mode=@save_sql_mode;
|