1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-12696 Crash with LOAD XML and non-updatable VIEW column

extend the fix from 5.5 (in read_sep_field()) to apply to read_xml_field()
This commit is contained in:
Sergei Golubchik
2017-05-08 19:23:39 +02:00
parent d738722eee
commit fbdf18f86e
4 changed files with 62 additions and 12 deletions

View File

@ -130,3 +130,16 @@ CREATE TABLE t1 (col1 VARCHAR(3), col2 VARCHAR(3), col3 INTEGER);
LOAD XML INFILE '../../std_data/bug16171518_2.dat' INTO TABLE t1;
SELECT * FROM t1 ORDER BY col1, col2, col3;
DROP TABLE t1;
--echo #
--echo # MDEV-12696 Crash with LOAD XML and non-updatable VIEW column
--echo #
CREATE TABLE t1 (c1 TEXT);
CREATE VIEW v1 AS SELECT CONCAT(c1,'') AS c1, NULL AS c2 FROM t1;
--error ER_NONUPDATEABLE_COLUMN
LOAD XML INFILE '../../std_data/loaddata/mdev12696.xml' INTO TABLE v1 (c1);
--error ER_NONUPDATEABLE_COLUMN
LOAD XML INFILE '../../std_data/loaddata/mdev12696.xml' INTO TABLE v1 (c2);
DROP VIEW v1;
DROP TABLE t1;