diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-12 09:26:02 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2022-04-12 09:26:02 +0300 |
commit | ca3bbf4c0c40c784a464485eb660e88949203db9 (patch) | |
tree | abe28da3ea31e1bf14c265441ad458a982801dbc /mysql-test | |
parent | bc75f7ed6d81138f8c2d8d2c800b9cf55bbaff7d (diff) | |
parent | bf70532e3d64011e0d5319317fc938539fc42c28 (diff) | |
download | mariadb-git-ca3bbf4c0c40c784a464485eb660e88949203db9.tar.gz |
Merge 10.5 into 10.6
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/main/information_schema.result | 21 | ||||
-rw-r--r-- | mysql-test/main/information_schema.test | 24 | ||||
-rw-r--r-- | mysql-test/main/keywords.result | 421 | ||||
-rw-r--r-- | mysql-test/main/keywords.test | 77 | ||||
-rw-r--r-- | mysql-test/main/thread_pool_info.test | 1 | ||||
-rw-r--r-- | mysql-test/suite/innodb_i_s/innodb_trx.result | 18 | ||||
-rw-r--r-- | mysql-test/suite/innodb_i_s/innodb_trx.test | 25 | ||||
-rw-r--r-- | mysql-test/suite/perfschema/r/threads_mysql.result | 8 | ||||
-rw-r--r-- | mysql-test/suite/perfschema/t/threads_mysql.test | 2 |
9 files changed, 594 insertions, 3 deletions
diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result index ad78f413ea1..0ce5cbea37d 100644 --- a/mysql-test/main/information_schema.result +++ b/mysql-test/main/information_schema.result @@ -2532,3 +2532,24 @@ progress # # End of 10.3 tests # +# +# Start of 10.5 tests +# +# +# MDEV-26507 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed +# +CREATE TABLE t1 (a int); +CREATE ALGORITHM=TEMPTABLE VIEW i AS +SELECT a.created +FROM t1 w JOIN INFORMATION_SCHEMA.routines a +WHERE a.routine_name='not existing' + ORDER BY a.last_altered; +SET SESSION sql_mode='ALLOW_INVALID_DATES'; +SELECT * FROM i; +created +SET SESSION sql_mode=DEFAULT; +DROP VIEW i; +DROP TABLE t1; +# +# End of 10.5 tests +# diff --git a/mysql-test/main/information_schema.test b/mysql-test/main/information_schema.test index 0c403caa599..27f5dd6103d 100644 --- a/mysql-test/main/information_schema.test +++ b/mysql-test/main/information_schema.test @@ -2111,3 +2111,27 @@ select progress from information_schema.processlist limit 1; --echo # --echo # End of 10.3 tests --echo # + +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-26507 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed +--echo # + +CREATE TABLE t1 (a int); +CREATE ALGORITHM=TEMPTABLE VIEW i AS + SELECT a.created + FROM t1 w JOIN INFORMATION_SCHEMA.routines a + WHERE a.routine_name='not existing' + ORDER BY a.last_altered; +SET SESSION sql_mode='ALLOW_INVALID_DATES'; +SELECT * FROM i; +SET SESSION sql_mode=DEFAULT; +DROP VIEW i; +DROP TABLE t1; + +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/mysql-test/main/keywords.result b/mysql-test/main/keywords.result index 2765c05b3cb..483a8f7e7e8 100644 --- a/mysql-test/main/keywords.result +++ b/mysql-test/main/keywords.result @@ -391,3 +391,424 @@ END $$ compressed 1 +# +# Testing various keywords in various contexts +# +CREATE PROCEDURE p1(query TEXT, var TEXT) +BEGIN +DECLARE errmsg TEXT DEFAULT ''; +DECLARE CONTINUE HANDLER +FOR SQLEXCEPTION +BEGIN +GET DIAGNOSTICS CONDITION 1 errmsg = MESSAGE_TEXT; +SET errmsg= REPLACE(errmsg, 'You have an error in your SQL ', '..'); +SET errmsg= REPLACE(errmsg, '; check the manual that corresponds to your MariaDB server version for the right syntax to use', '..'); +END; +SET query=REPLACE(query, '$(VAR)', var); +EXECUTE IMMEDIATE query; +SELECT CONCAT(query, '; -- ', LEFT(COALESCE(errmsg,''),40)) AS `--------`; +END; +$$ +CREATE PROCEDURE p2(query TEXT) +BEGIN +FOR row IN (SELECT word FROM t1 ORDER BY category, word) +DO +CALL p1(query, row.word); +END FOR; +END; +$$ +CREATE TABLE t1 (word TEXT, category TEXT); +INSERT INTO t1 VALUES ('non_keyword', '00 Simple identifier'); +INSERT INTO t1 VALUES ('lpad', '01 Built-in native function'); +INSERT INTO t1 VALUES ('rpad', '01 Built-in native function'); +INSERT INTO t1 VALUES ('adddate', '02 function_call_nonkeyword'); +INSERT INTO t1 VALUES ('substr', '02 function_call_nonkeyword'); +INSERT INTO t1 VALUES ('substring', '02 function_call_nonkeyword'); +INSERT INTO t1 VALUES ('trim_oracle', '02 function_call_nonkeyword'); +INSERT INTO t1 VALUES ('ascii', '03 function_call_conflict'); +INSERT INTO t1 VALUES ('replace', '03 function_call_conflict'); +INSERT INTO t1 VALUES ('weight_string', '03 function_call_conflict'); +INSERT INTO t1 VALUES ('char', '04 function_call_keyword'); +INSERT INTO t1 VALUES ('trim', '04 function_call_keyword'); +INSERT INTO t1 VALUES ('year', '04 function_call_keyword'); +INSERT INTO t1 VALUES ('create', '05 Reserved keyword'); +CALL p2('SELECT @@$(VAR)'); +-------- +SELECT @@non_keyword; -- Unknown system variable 'non_keyword' +-------- +SELECT @@lpad; -- Unknown system variable 'lpad' +-------- +SELECT @@rpad; -- Unknown system variable 'rpad' +-------- +SELECT @@adddate; -- Unknown system variable 'adddate' +-------- +SELECT @@substr; -- Unknown system variable 'substr' +-------- +SELECT @@substring; -- Unknown system variable 'substring' +-------- +SELECT @@trim_oracle; -- Unknown system variable 'trim_oracle' +-------- +SELECT @@ascii; -- Unknown system variable 'ascii' +-------- +SELECT @@replace; -- ..syntax.. near 'replace' at line 1 +-------- +SELECT @@weight_string; -- Unknown system variable 'weight_string' +-------- +SELECT @@char; -- ..syntax.. near 'char' at line 1 +-------- +SELECT @@trim; -- Unknown system variable 'trim' +-------- +SELECT @@year; -- Unknown system variable 'year' +-------- +SELECT @@create; -- ..syntax.. near 'create' at line 1 +CALL p2('SELECT @@global.$(VAR)'); +-------- +SELECT @@global.non_keyword; -- Unknown system variable 'non_keyword' +-------- +SELECT @@global.lpad; -- Unknown system variable 'lpad' +-------- +SELECT @@global.rpad; -- Unknown system variable 'rpad' +-------- +SELECT @@global.adddate; -- Unknown system variable 'adddate' +-------- +SELECT @@global.substr; -- Unknown system variable 'substr' +-------- +SELECT @@global.substring; -- Unknown system variable 'substring' +-------- +SELECT @@global.trim_oracle; -- Unknown system variable 'trim_oracle' +-------- +SELECT @@global.ascii; -- Unknown system variable 'ascii' +-------- +SELECT @@global.replace; -- Unknown system variable 'replace' +-------- +SELECT @@global.weight_string; -- Unknown system variable 'weight_string' +-------- +SELECT @@global.char; -- Unknown system variable 'char' +-------- +SELECT @@global.trim; -- Unknown system variable 'trim' +-------- +SELECT @@global.year; -- Unknown system variable 'year' +-------- +SELECT @@global.create; -- Unknown system variable 'create' +CALL p2('SELECT @@global.$(VAR)()'); +-------- +SELECT @@global.non_keyword(); -- Unknown system variable 'non_keyword' +-------- +SELECT @@global.lpad(); -- Unknown system variable 'lpad' +-------- +SELECT @@global.rpad(); -- Unknown system variable 'rpad' +-------- +SELECT @@global.adddate(); -- Unknown system variable 'adddate' +-------- +SELECT @@global.substr(); -- Unknown system variable 'substr' +-------- +SELECT @@global.substring(); -- Unknown system variable 'substring' +-------- +SELECT @@global.trim_oracle(); -- Unknown system variable 'trim_oracle' +-------- +SELECT @@global.ascii(); -- Unknown system variable 'ascii' +-------- +SELECT @@global.replace(); -- Unknown system variable 'replace' +-------- +SELECT @@global.weight_string(); -- Unknown system variable 'weight_string' +-------- +SELECT @@global.char(); -- Unknown system variable 'char' +-------- +SELECT @@global.trim(); -- Unknown system variable 'trim' +-------- +SELECT @@global.year(); -- Unknown system variable 'year' +-------- +SELECT @@global.create(); -- Unknown system variable 'create' +CALL p2('SELECT $(VAR)()'); +-------- +SELECT non_keyword(); -- FUNCTION test.non_keyword does not exist +-------- +SELECT lpad(); -- Incorrect parameter count in the call to +-------- +SELECT rpad(); -- Incorrect parameter count in the call to +-------- +SELECT adddate(); -- ..syntax.. near ')' at line 1 +-------- +SELECT substr(); -- ..syntax.. near ')' at line 1 +-------- +SELECT substring(); -- ..syntax.. near ')' at line 1 +-------- +SELECT trim_oracle(); -- ..syntax.. near ')' at line 1 +-------- +SELECT ascii(); -- ..syntax.. near ')' at line 1 +-------- +SELECT replace(); -- ..syntax.. near ')' at line 1 +-------- +SELECT weight_string(); -- ..syntax.. near ')' at line 1 +-------- +SELECT char(); -- ..syntax.. near ')' at line 1 +-------- +SELECT trim(); -- ..syntax.. near ')' at line 1 +-------- +SELECT year(); -- ..syntax.. near ')' at line 1 +-------- +SELECT create(); -- ..syntax.. near 'create()' at line 1 +CALL p2('SELECT test.$(VAR)()'); +-------- +SELECT test.non_keyword(); -- FUNCTION test.non_keyword does not exist +-------- +SELECT test.lpad(); -- FUNCTION test.lpad does not exist +-------- +SELECT test.rpad(); -- FUNCTION test.rpad does not exist +-------- +SELECT test.adddate(); -- FUNCTION test.adddate does not exist. Ch +-------- +SELECT test.substr(); -- FUNCTION test.substr does not exist. Che +-------- +SELECT test.substring(); -- FUNCTION test.substring does not exist. +-------- +SELECT test.trim_oracle(); -- FUNCTION test.trim_oracle does not exist +-------- +SELECT test.ascii(); -- FUNCTION test.ascii does not exist. Chec +-------- +SELECT test.replace(); -- FUNCTION test.replace does not exist. Ch +-------- +SELECT test.weight_string(); -- FUNCTION test.weight_string does not exi +-------- +SELECT test.char(); -- FUNCTION test.char does not exist. Check +-------- +SELECT test.trim(); -- FUNCTION test.trim does not exist. Check +-------- +SELECT test.year(); -- FUNCTION test.year does not exist. Check +-------- +SELECT test.create(); -- FUNCTION test.create does not exist. Che +CALL p2('SELECT $(VAR) FROM t1'); +-------- +SELECT non_keyword FROM t1; -- Unknown column 'non_keyword' in 'field l +-------- +SELECT lpad FROM t1; -- Unknown column 'lpad' in 'field list' +-------- +SELECT rpad FROM t1; -- Unknown column 'rpad' in 'field list' +-------- +SELECT adddate FROM t1; -- Unknown column 'adddate' in 'field list' +-------- +SELECT substr FROM t1; -- Unknown column 'substr' in 'field list' +-------- +SELECT substring FROM t1; -- Unknown column 'substring' in 'field lis +-------- +SELECT trim_oracle FROM t1; -- Unknown column 'trim_oracle' in 'field l +-------- +SELECT ascii FROM t1; -- Unknown column 'ascii' in 'field list' +-------- +SELECT replace FROM t1; -- ..syntax.. near 'FROM t1' at line 1 +-------- +SELECT weight_string FROM t1; -- Unknown column 'weight_string' in 'field +-------- +SELECT char FROM t1; -- ..syntax.. near 'FROM t1' at line 1 +-------- +SELECT trim FROM t1; -- Unknown column 'trim' in 'field list' +-------- +SELECT year FROM t1; -- Unknown column 'year' in 'field list' +-------- +SELECT create FROM t1; -- ..syntax.. near 'create FROM t1' at line +CALL p2('SELECT t1.$(VAR) FROM t1'); +-------- +SELECT t1.non_keyword FROM t1; -- Unknown column 't1.non_keyword' in 'fiel +-------- +SELECT t1.lpad FROM t1; -- Unknown column 't1.lpad' in 'field list' +-------- +SELECT t1.rpad FROM t1; -- Unknown column 't1.rpad' in 'field list' +-------- +SELECT t1.adddate FROM t1; -- Unknown column 't1.adddate' in 'field li +-------- +SELECT t1.substr FROM t1; -- Unknown column 't1.substr' in 'field lis +-------- +SELECT t1.substring FROM t1; -- Unknown column 't1.substring' in 'field +-------- +SELECT t1.trim_oracle FROM t1; -- Unknown column 't1.trim_oracle' in 'fiel +-------- +SELECT t1.ascii FROM t1; -- Unknown column 't1.ascii' in 'field list +-------- +SELECT t1.replace FROM t1; -- Unknown column 't1.replace' in 'field li +-------- +SELECT t1.weight_string FROM t1; -- Unknown column 't1.weight_string' in 'fi +-------- +SELECT t1.char FROM t1; -- Unknown column 't1.char' in 'field list' +-------- +SELECT t1.trim FROM t1; -- Unknown column 't1.trim' in 'field list' +-------- +SELECT t1.year FROM t1; -- Unknown column 't1.year' in 'field list' +-------- +SELECT t1.create FROM t1; -- Unknown column 't1.create' in 'field lis +CALL p2('DROP TABLE $(VAR)'); +-------- +DROP TABLE non_keyword; -- Unknown table 'test.non_keyword' +-------- +DROP TABLE lpad; -- Unknown table 'test.lpad' +-------- +DROP TABLE rpad; -- Unknown table 'test.rpad' +-------- +DROP TABLE adddate; -- Unknown table 'test.adddate' +-------- +DROP TABLE substr; -- Unknown table 'test.substr' +-------- +DROP TABLE substring; -- Unknown table 'test.substring' +-------- +DROP TABLE trim_oracle; -- Unknown table 'test.trim_oracle' +-------- +DROP TABLE ascii; -- Unknown table 'test.ascii' +-------- +DROP TABLE replace; -- ..syntax.. near 'replace' at line 1 +-------- +DROP TABLE weight_string; -- Unknown table 'test.weight_string' +-------- +DROP TABLE char; -- ..syntax.. near 'char' at line 1 +-------- +DROP TABLE trim; -- Unknown table 'test.trim' +-------- +DROP TABLE year; -- Unknown table 'test.year' +-------- +DROP TABLE create; -- ..syntax.. near 'create' at line 1 +CALL p2('DROP TABLE test.$(VAR)'); +-------- +DROP TABLE test.non_keyword; -- Unknown table 'test.non_keyword' +-------- +DROP TABLE test.lpad; -- Unknown table 'test.lpad' +-------- +DROP TABLE test.rpad; -- Unknown table 'test.rpad' +-------- +DROP TABLE test.adddate; -- Unknown table 'test.adddate' +-------- +DROP TABLE test.substr; -- Unknown table 'test.substr' +-------- +DROP TABLE test.substring; -- Unknown table 'test.substring' +-------- +DROP TABLE test.trim_oracle; -- Unknown table 'test.trim_oracle' +-------- +DROP TABLE test.ascii; -- Unknown table 'test.ascii' +-------- +DROP TABLE test.replace; -- Unknown table 'test.replace' +-------- +DROP TABLE test.weight_string; -- Unknown table 'test.weight_string' +-------- +DROP TABLE test.char; -- Unknown table 'test.char' +-------- +DROP TABLE test.trim; -- Unknown table 'test.trim' +-------- +DROP TABLE test.year; -- Unknown table 'test.year' +-------- +DROP TABLE test.create; -- Unknown table 'test.create' +CALL p2('CREATE FUNCTION $(VAR)() RETURNS OOPS'); +-------- +CREATE FUNCTION non_keyword() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION lpad() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION rpad() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION adddate() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION substr() RETURNS OOPS; -- ..syntax.. near 'substr() RETURNS OOPS' +-------- +CREATE FUNCTION substring() RETURNS OOPS; -- ..syntax.. near 'substring() RETURNS OOP +-------- +CREATE FUNCTION trim_oracle() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION ascii() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION replace() RETURNS OOPS; -- ..syntax.. near 'replace() RETURNS OOPS' +-------- +CREATE FUNCTION weight_string() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION char() RETURNS OOPS; -- ..syntax.. near 'char() RETURNS OOPS' at +-------- +CREATE FUNCTION trim() RETURNS OOPS; -- ..syntax.. near 'trim() RETURNS OOPS' at +-------- +CREATE FUNCTION year() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION create() RETURNS OOPS; -- ..syntax.. near 'create() RETURNS OOPS' +CALL p2('CREATE FUNCTION test.$(VAR)() RETURNS OOPS'); +-------- +CREATE FUNCTION test.non_keyword() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.lpad() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.rpad() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.adddate() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.substr() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.substring() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.trim_oracle() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.ascii() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.replace() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.weight_string() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.char() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.trim() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.year() RETURNS OOPS; -- Unknown data type: 'OOPS' +-------- +CREATE FUNCTION test.create() RETURNS OOPS; -- Unknown data type: 'OOPS' +CALL p2('DROP FUNCTION $(VAR)'); +-------- +DROP FUNCTION non_keyword; -- FUNCTION test.non_keyword does not exist +-------- +DROP FUNCTION lpad; -- FUNCTION test.lpad does not exist +-------- +DROP FUNCTION rpad; -- FUNCTION test.rpad does not exist +-------- +DROP FUNCTION adddate; -- FUNCTION test.adddate does not exist +-------- +DROP FUNCTION substr; -- FUNCTION test.substr does not exist +-------- +DROP FUNCTION substring; -- FUNCTION test.substring does not exist +-------- +DROP FUNCTION trim_oracle; -- FUNCTION test.trim_oracle does not exist +-------- +DROP FUNCTION ascii; -- FUNCTION test.ascii does not exist +-------- +DROP FUNCTION replace; -- ..syntax.. near 'replace' at line 1 +-------- +DROP FUNCTION weight_string; -- FUNCTION test.weight_string does not exi +-------- +DROP FUNCTION char; -- ..syntax.. near 'char' at line 1 +-------- +DROP FUNCTION trim; -- FUNCTION test.trim does not exist +-------- +DROP FUNCTION year; -- FUNCTION test.year does not exist +-------- +DROP FUNCTION create; -- ..syntax.. near 'create' at line 1 +CALL p2('DROP FUNCTION test.$(VAR)'); +-------- +DROP FUNCTION test.non_keyword; -- FUNCTION test.non_keyword does not exist +-------- +DROP FUNCTION test.lpad; -- FUNCTION test.lpad does not exist +-------- +DROP FUNCTION test.rpad; -- FUNCTION test.rpad does not exist +-------- +DROP FUNCTION test.adddate; -- FUNCTION test.adddate does not exist +-------- +DROP FUNCTION test.substr; -- FUNCTION test.substr does not exist +-------- +DROP FUNCTION test.substring; -- FUNCTION test.substring does not exist +-------- +DROP FUNCTION test.trim_oracle; -- FUNCTION test.trim_oracle does not exist +-------- +DROP FUNCTION test.ascii; -- FUNCTION test.ascii does not exist +-------- +DROP FUNCTION test.replace; -- FUNCTION test.replace does not exist +-------- +DROP FUNCTION test.weight_string; -- FUNCTION test.weight_string does not exi +-------- +DROP FUNCTION test.char; -- FUNCTION test.char does not exist +-------- +DROP FUNCTION test.trim; -- FUNCTION test.trim does not exist +-------- +DROP FUNCTION test.year; -- FUNCTION test.year does not exist +-------- +DROP FUNCTION test.create; -- FUNCTION test.create does not exist +DROP TABLE t1; +DROP PROCEDURE p1; +DROP PROCEDURE p2; diff --git a/mysql-test/main/keywords.test b/mysql-test/main/keywords.test index a745aada106..e6a3fc4953d 100644 --- a/mysql-test/main/keywords.test +++ b/mysql-test/main/keywords.test @@ -295,3 +295,80 @@ BEGIN NOT ATOMIC END $$ DELIMITER ;$$ + + +--echo # +--echo # Testing various keywords in various contexts +--echo # + +DELIMITER $$; +CREATE PROCEDURE p1(query TEXT, var TEXT) +BEGIN + DECLARE errmsg TEXT DEFAULT ''; + DECLARE CONTINUE HANDLER + FOR SQLEXCEPTION + BEGIN + GET DIAGNOSTICS CONDITION 1 errmsg = MESSAGE_TEXT; + SET errmsg= REPLACE(errmsg, 'You have an error in your SQL ', '..'); + SET errmsg= REPLACE(errmsg, '; check the manual that corresponds to your MariaDB server version for the right syntax to use', '..'); + END; + SET query=REPLACE(query, '$(VAR)', var); + EXECUTE IMMEDIATE query; + SELECT CONCAT(query, '; -- ', LEFT(COALESCE(errmsg,''),40)) AS `--------`; +END; +$$ +CREATE PROCEDURE p2(query TEXT) +BEGIN + FOR row IN (SELECT word FROM t1 ORDER BY category, word) + DO + CALL p1(query, row.word); + END FOR; +END; +$$ +DELIMITER ;$$ + +CREATE TABLE t1 (word TEXT, category TEXT); + +INSERT INTO t1 VALUES ('non_keyword', '00 Simple identifier'); + +INSERT INTO t1 VALUES ('lpad', '01 Built-in native function'); +INSERT INTO t1 VALUES ('rpad', '01 Built-in native function'); + +INSERT INTO t1 VALUES ('adddate', '02 function_call_nonkeyword'); +INSERT INTO t1 VALUES ('substr', '02 function_call_nonkeyword'); +INSERT INTO t1 VALUES ('substring', '02 function_call_nonkeyword'); +INSERT INTO t1 VALUES ('trim_oracle', '02 function_call_nonkeyword'); + +INSERT INTO t1 VALUES ('ascii', '03 function_call_conflict'); +INSERT INTO t1 VALUES ('replace', '03 function_call_conflict'); +INSERT INTO t1 VALUES ('weight_string', '03 function_call_conflict'); + +INSERT INTO t1 VALUES ('char', '04 function_call_keyword'); +INSERT INTO t1 VALUES ('trim', '04 function_call_keyword'); +INSERT INTO t1 VALUES ('year', '04 function_call_keyword'); + +INSERT INTO t1 VALUES ('create', '05 Reserved keyword'); + +CALL p2('SELECT @@$(VAR)'); +CALL p2('SELECT @@global.$(VAR)'); +CALL p2('SELECT @@global.$(VAR)()'); + +CALL p2('SELECT $(VAR)()'); +CALL p2('SELECT test.$(VAR)()'); + +CALL p2('SELECT $(VAR) FROM t1'); +CALL p2('SELECT t1.$(VAR) FROM t1'); + +CALL p2('DROP TABLE $(VAR)'); +CALL p2('DROP TABLE test.$(VAR)'); + +CALL p2('CREATE FUNCTION $(VAR)() RETURNS OOPS'); +CALL p2('CREATE FUNCTION test.$(VAR)() RETURNS OOPS'); + +CALL p2('DROP FUNCTION $(VAR)'); +CALL p2('DROP FUNCTION test.$(VAR)'); + +DROP TABLE t1; + +DROP PROCEDURE p1; +DROP PROCEDURE p2; diff --git a/mysql-test/main/thread_pool_info.test b/mysql-test/main/thread_pool_info.test index cd906454d8c..84dce94d778 100644 --- a/mysql-test/main/thread_pool_info.test +++ b/mysql-test/main/thread_pool_info.test @@ -1,4 +1,5 @@ source include/not_embedded.inc; +source include/not_aix.inc; let $have_plugin = `SELECT COUNT(*) FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_STATUS='ACTIVE' AND PLUGIN_NAME = 'THREAD_POOL_GROUPS'`; if(!$have_plugin) diff --git a/mysql-test/suite/innodb_i_s/innodb_trx.result b/mysql-test/suite/innodb_i_s/innodb_trx.result index 912ae49b760..2c4b9281c92 100644 --- a/mysql-test/suite/innodb_i_s/innodb_trx.result +++ b/mysql-test/suite/innodb_i_s/innodb_trx.result @@ -28,3 +28,21 @@ CREATE TEMPORARY TABLE t1 LIKE INFORMATION_SCHEMA.INNODB_TRX; DROP TEMPORARY TABLE t1; CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX LIMIT 0; DROP TEMPORARY TABLE t1; +# +# Start of 10.5 tests +# +# +# MDEV-26507 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed +# +CREATE ALGORITHM=TEMPTABLE VIEW i AS +SELECT a.trx_started +FROM INFORMATION_SCHEMA.innodb_lock_waits w +JOIN INFORMATION_SCHEMA.innodb_trx a +ORDER BY a.trx_wait_started; +SET SESSION sql_mode='ALLOW_INVALID_DATES'; +SELECT * FROM i; +SET SESSION sql_mode=DEFAULT; +DROP VIEW i; +# +# End of 10.5 tests +# diff --git a/mysql-test/suite/innodb_i_s/innodb_trx.test b/mysql-test/suite/innodb_i_s/innodb_trx.test index 90fa3467b50..2a66750ed9f 100644 --- a/mysql-test/suite/innodb_i_s/innodb_trx.test +++ b/mysql-test/suite/innodb_i_s/innodb_trx.test @@ -7,3 +7,28 @@ DROP TEMPORARY TABLE t1; CREATE TEMPORARY TABLE t1 AS SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX LIMIT 0; DROP TEMPORARY TABLE t1; + + +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-26507 Assertion `tmp != ((long long) 0x8000000000000000LL)' failed in TIME_from_longlong_datetime_packed +--echo # + +CREATE ALGORITHM=TEMPTABLE VIEW i AS + SELECT a.trx_started + FROM INFORMATION_SCHEMA.innodb_lock_waits w + JOIN INFORMATION_SCHEMA.innodb_trx a + ORDER BY a.trx_wait_started; +SET SESSION sql_mode='ALLOW_INVALID_DATES'; +--disable_result_log +SELECT * FROM i; +--enable_result_log +SET SESSION sql_mode=DEFAULT; +DROP VIEW i; + +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/mysql-test/suite/perfschema/r/threads_mysql.result b/mysql-test/suite/perfschema/r/threads_mysql.result index 40e6360fec7..d0748349af3 100644 --- a/mysql-test/suite/perfschema/r/threads_mysql.result +++ b/mysql-test/suite/perfschema/r/threads_mysql.result @@ -1,6 +1,6 @@ SET GLOBAL event_scheduler = OFF; SELECT name, type, processlist_user, processlist_host, processlist_db, -processlist_command, processlist_info, +processlist_command, processlist_info, connection_type, IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id') AS unified_parent_thread_id, role, instrumented @@ -14,6 +14,7 @@ processlist_host NULL processlist_db mysql processlist_command NULL processlist_info NULL +connection_type NULL unified_parent_thread_id NULL role NULL instrumented YES @@ -24,6 +25,7 @@ processlist_host NULL processlist_db NULL processlist_command NULL processlist_info NULL +connection_type NULL unified_parent_thread_id unified parent_thread_id role NULL instrumented YES @@ -34,13 +36,14 @@ processlist_host localhost processlist_db test processlist_command Query processlist_info SELECT name, type, processlist_user, processlist_host, processlist_db, -processlist_command, processlist_info, +processlist_command, processlist_info, connection_type, IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id') AS unified_parent_thread_id, role, instrumented FROM performance_schema.threads WHERE name LIKE 'thread/sql%' ORDER BY name +connection_type Socket unified_parent_thread_id unified parent_thread_id role NULL instrumented YES @@ -51,6 +54,7 @@ processlist_host NULL processlist_db NULL processlist_command NULL processlist_info NULL +connection_type NULL unified_parent_thread_id unified parent_thread_id role NULL instrumented YES diff --git a/mysql-test/suite/perfschema/t/threads_mysql.test b/mysql-test/suite/perfschema/t/threads_mysql.test index c33f421863e..8a021055d44 100644 --- a/mysql-test/suite/perfschema/t/threads_mysql.test +++ b/mysql-test/suite/perfschema/t/threads_mysql.test @@ -32,7 +32,7 @@ SET GLOBAL event_scheduler = OFF; # Therefore we have to disable this protocol for the next statement. --disable_ps_protocol SELECT name, type, processlist_user, processlist_host, processlist_db, - processlist_command, processlist_info, + processlist_command, processlist_info, connection_type, IF(parent_thread_id IS NULL, parent_thread_id, 'unified parent_thread_id') AS unified_parent_thread_id, role, instrumented |