mariadb/mysql-test/suite/compat/oracle/r/update.result
Nikita Malyavin e33064e0fc MDEV-27769 Assertion failed in Field::ptr_in_record upon UPDATE in ORACLE mode
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.
2025-01-26 16:15:46 +01:00

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;