mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-15975 PL/SQL parser does not understand historical queries
Merging the following features from sql_yacc.yy to sql_yacc_ora.yy: - system versioning - column compression - table value constructor - spatial predicate WITHIN - DELETE_DOMAIN_ID
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
SET sql_mode=ORACLE;
|
||||
SET column_compression_zlib_wrap=true;
|
||||
CREATE TABLE t1 (a BLOB COMPRESSED);
|
||||
INSERT INTO t1 VALUES (REPEAT('a',10000));
|
||||
SELECT DATA_LENGTH<100 AS c FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
|
||||
c
|
||||
1
|
||||
DROP TABLE t1;
|
6
mysql-test/suite/compat/oracle/r/gis.result
Normal file
6
mysql-test/suite/compat/oracle/r/gis.result
Normal file
@ -0,0 +1,6 @@
|
||||
SELECT WITHIN(POINT(1,1), POINT(1,1));
|
||||
WITHIN(POINT(1,1), POINT(1,1))
|
||||
1
|
||||
SELECT WITHIN(POINT(1,1), POINT(0,0));
|
||||
WITHIN(POINT(1,1), POINT(0,0))
|
||||
0
|
2101
mysql-test/suite/compat/oracle/r/table_value_constr.result
Normal file
2101
mysql-test/suite/compat/oracle/r/table_value_constr.result
Normal file
File diff suppressed because it is too large
Load Diff
16
mysql-test/suite/compat/oracle/r/versioning.result
Normal file
16
mysql-test/suite/compat/oracle/r/versioning.result
Normal file
@ -0,0 +1,16 @@
|
||||
SET sql_mode=ORACLE;
|
||||
#
|
||||
# MDEV-15975 PL/SQL parser does not understand historical queries
|
||||
#
|
||||
CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1 VALUES (20);
|
||||
SELECT * FROM t1 FOR SYSTEM_TIME ALL;
|
||||
a
|
||||
10
|
||||
20
|
||||
SELECT * FROM t1 FOR SYSTEM_TIME AS OF (NOW()+INTERVAL 10 YEAR);
|
||||
a
|
||||
20
|
||||
DROP TABLE t1;
|
11
mysql-test/suite/compat/oracle/t/column_compression.test
Normal file
11
mysql-test/suite/compat/oracle/t/column_compression.test
Normal file
@ -0,0 +1,11 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_csv.inc
|
||||
|
||||
SET sql_mode=ORACLE;
|
||||
|
||||
SET column_compression_zlib_wrap=true;
|
||||
CREATE TABLE t1 (a BLOB COMPRESSED);
|
||||
INSERT INTO t1 VALUES (REPEAT('a',10000));
|
||||
SELECT DATA_LENGTH<100 AS c FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_NAME='t1' AND TABLE_SCHEMA='test';
|
||||
DROP TABLE t1;
|
4
mysql-test/suite/compat/oracle/t/gis.test
Normal file
4
mysql-test/suite/compat/oracle/t/gis.test
Normal file
@ -0,0 +1,4 @@
|
||||
-- source include/have_geometry.inc
|
||||
|
||||
SELECT WITHIN(POINT(1,1), POINT(1,1));
|
||||
SELECT WITHIN(POINT(1,1), POINT(0,0));
|
1083
mysql-test/suite/compat/oracle/t/table_value_constr.test
Normal file
1083
mysql-test/suite/compat/oracle/t/table_value_constr.test
Normal file
File diff suppressed because it is too large
Load Diff
13
mysql-test/suite/compat/oracle/t/versioning.test
Normal file
13
mysql-test/suite/compat/oracle/t/versioning.test
Normal file
@ -0,0 +1,13 @@
|
||||
SET sql_mode=ORACLE;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-15975 PL/SQL parser does not understand historical queries
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT) WITH SYSTEM VERSIONING;
|
||||
INSERT INTO t1 VALUES (10);
|
||||
DELETE FROM t1;
|
||||
INSERT INTO t1 VALUES (20);
|
||||
SELECT * FROM t1 FOR SYSTEM_TIME ALL;
|
||||
SELECT * FROM t1 FOR SYSTEM_TIME AS OF (NOW()+INTERVAL 10 YEAR);
|
||||
DROP TABLE t1;
|
Reference in New Issue
Block a user