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

Merge branch '10.11' into 11.0

This commit is contained in:
Oleksandr Byelkin
2024-01-30 08:54:10 +01:00
193 changed files with 6186 additions and 1673 deletions

View File

@ -6801,3 +6801,56 @@ DROP TABLE t1, t2;
--echo #
--echo # End of 10.6 tests
--echo #
--echo #
--echo # MDEV-29587: Allowing insert into a view with columns that
--echo # are not part the table
--echo #
--echo # view with 2 the same fields
CREATE TABLE table1 (x INT);
CREATE VIEW view1 AS SELECT x, x as x1 FROM table1;
INSERT INTO view1(x) VALUES (1);
INSERT INTO view1(x1) VALUES (1);
--error ER_NON_INSERTABLE_TABLE
INSERT INTO view1(x1,x) VALUES (1,1);
DROP VIEW view1;
DROP TABLE table1;
--echo # view with a field and expression over the field
CREATE TABLE table1 (x INT);
CREATE VIEW view1 AS SELECT x, x + 1 as x1 FROM table1;
INSERT INTO view1(x) VALUES (1);
--error ER_NON_INSERTABLE_TABLE
INSERT INTO view1(x1) VALUES (1);
--error ER_NON_INSERTABLE_TABLE
INSERT INTO view1(x1,x) VALUES (1,1);
DROP VIEW view1;
DROP TABLE table1;
--echo # view with a field and collation expression over the field
CREATE TABLE table1 (x char(20));
CREATE VIEW view1 AS SELECT x, x collate latin1_german1_ci as x1 FROM table1;
INSERT INTO view1(x) VALUES ("ua");
--echo # we can insert in the field with collation
INSERT INTO view1(x1) VALUES ("ua");
--error ER_NON_INSERTABLE_TABLE
INSERT INTO view1(x1,x) VALUES ("ua","ua");
DROP VIEW view1;
DROP TABLE table1;
--echo # view with a field and expression over other field
CREATE TABLE table1 (x INT, y INT);
CREATE VIEW view1 AS SELECT x, y + 1 as x1 FROM table1;
INSERT INTO view1(x) VALUES (1);
--error ER_NON_INSERTABLE_TABLE
INSERT INTO view1(x1) VALUES (1);
--error ER_NON_INSERTABLE_TABLE
INSERT INTO view1(x1,x) VALUES (1,1);
DROP VIEW view1;
DROP TABLE table1;
--echo #
--echo # End of 10.11 test
--echo #