mirror of
https://github.com/MariaDB/server.git
synced 2025-06-12 07:44:43 +02: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.
16 lines
652 B
Text
16 lines
652 B
Text
SET @save_sql_mode=@@global.sql_mode;
|
|
SET sql_mode=ORACLE;
|
|
SET GLOBAL sql_mode='ORACLE';
|
|
# MDEV-27769 Assertion failed in Field::ptr_in_record upon UPDATE
|
|
CREATE TABLE t (s geometry, t text) engine innodb;
|
|
Warnings:
|
|
Warning 1286 Unknown storage engine 'innodb'
|
|
Warning 1266 Using storage engine MyISAM for table 't'
|
|
INSERT IGNORE INTO t () VALUES ();
|
|
UPDATE IGNORE t SET t= '', s = 0;
|
|
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
|
UPDATE IGNORE t SET t= '', s = 0;
|
|
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
|
ALTER TABLE t force;
|
|
DROP TABLE t;
|
|
SET GLOBAL sql_mode=@save_sql_mode;
|