Merge branch '10.2' into 10.3

This commit is contained in:
Oleksandr Byelkin 2019-05-12 17:20:23 +02:00
commit c51f85f882
255 changed files with 3975 additions and 1186 deletions

View File

@ -491,7 +491,7 @@ ADD_CUSTOM_TARGET(INFO_BIN ALL
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
) )
INSTALL_DOCUMENTATION(README.md CREDITS COPYING COPYING.thirdparty INSTALL_DOCUMENTATION(README.md CREDITS COPYING THIRDPARTY
EXCEPTIONS-CLIENT COMPONENT Readme) EXCEPTIONS-CLIENT COMPONENT Readme)
# MDEV-6526 these files are not installed anymore # MDEV-6526 these files are not installed anymore

View File

@ -45,8 +45,8 @@ https://launchpad.net/~maria-discuss
and the #maria IRC channel on Freenode. and the #maria IRC channel on Freenode.
License: Licensing:
-------- ----------
*************************************************************************** ***************************************************************************
@ -57,8 +57,8 @@ General Public License (GPLv2). (I.e. Without the "any later version"
clause.) This is inherited from MySQL. Please see the README file in clause.) This is inherited from MySQL. Please see the README file in
the MySQL distribution for more information. the MySQL distribution for more information.
License information can be found in the COPYING, COPYING.LESSER, License information can be found in the COPYING file. Third party
and COPYING.thirdparty files. license information can be found in the THIRDPARTY file.
*************************************************************************** ***************************************************************************

View File

@ -321,7 +321,7 @@ static int get_default_values()
int ret= 0; int ret= 0;
FILE *file= 0; FILE *file= 0;
bzero(tool_path, FN_REFLEN); memset(tool_path, 0, FN_REFLEN);
if ((error= find_tool("my_print_defaults" FN_EXEEXT, tool_path))) if ((error= find_tool("my_print_defaults" FN_EXEEXT, tool_path)))
goto exit; goto exit;
else else
@ -334,9 +334,9 @@ static int get_default_values()
char *format_str= 0; char *format_str= 0;
if (has_spaces(tool_path) || has_spaces(defaults_file)) if (has_spaces(tool_path) || has_spaces(defaults_file))
format_str = "\"%s mysqld > %s\""; format_str = "\"%s --mysqld > %s\"";
else else
format_str = "%s mysqld > %s"; format_str = "%s --mysqld > %s";
snprintf(defaults_cmd, sizeof(defaults_cmd), format_str, snprintf(defaults_cmd, sizeof(defaults_cmd), format_str,
add_quotes(tool_path), add_quotes(defaults_file)); add_quotes(tool_path), add_quotes(defaults_file));
@ -347,7 +347,7 @@ static int get_default_values()
} }
#else #else
snprintf(defaults_cmd, sizeof(defaults_cmd), snprintf(defaults_cmd, sizeof(defaults_cmd),
"%s mysqld > %s", tool_path, defaults_file); "%s --mysqld > %s", tool_path, defaults_file);
#endif #endif
/* Execute the command */ /* Execute the command */

View File

@ -3322,7 +3322,7 @@ static void dump_trigger_old(FILE *sql_file, MYSQL_RES *show_triggers_rs,
char name_buff[NAME_LEN * 4 + 3]; char name_buff[NAME_LEN * 4 + 3];
const char *xml_msg= "\nWarning! mysqldump being run against old server " const char *xml_msg= "\nWarning! mysqldump being run against old server "
"that does not\nsupport 'SHOW CREATE TRIGGERS' " "that does not\nsupport 'SHOW CREATE TRIGGER' "
"statement. Skipping..\n"; "statement. Skipping..\n";
DBUG_ENTER("dump_trigger_old"); DBUG_ENTER("dump_trigger_old");
@ -3481,12 +3481,14 @@ static int dump_triggers_for_table(char *table_name, char *db_name)
char db_cl_name[MY_CS_NAME_SIZE]; char db_cl_name[MY_CS_NAME_SIZE];
int ret= TRUE; int ret= TRUE;
/* Servers below 5.1.21 do not support SHOW CREATE TRIGGER */
const int use_show_create_trigger= mysql_get_server_version(mysql) >= 50121;
DBUG_ENTER("dump_triggers_for_table"); DBUG_ENTER("dump_triggers_for_table");
DBUG_PRINT("enter", ("db: %s, table_name: %s", db_name, table_name)); DBUG_PRINT("enter", ("db: %s, table_name: %s", db_name, table_name));
if (path && !(sql_file= open_sql_file_for_table(table_name, if (path &&
O_WRONLY | O_APPEND))) !(sql_file= open_sql_file_for_table(table_name, O_WRONLY | O_APPEND)))
DBUG_RETURN(1); DBUG_RETURN(1);
/* Do not use ANSI_QUOTES on triggers in dump */ /* Do not use ANSI_QUOTES on triggers in dump */
@ -3502,11 +3504,15 @@ static int dump_triggers_for_table(char *table_name, char *db_name)
/* Get list of triggers. */ /* Get list of triggers. */
if (use_show_create_trigger)
my_snprintf(query_buff, sizeof(query_buff), my_snprintf(query_buff, sizeof(query_buff),
"SELECT TRIGGER_NAME FROM INFORMATION_SCHEMA.TRIGGERS " "SELECT TRIGGER_NAME FROM INFORMATION_SCHEMA.TRIGGERS "
"WHERE EVENT_OBJECT_SCHEMA = DATABASE() AND " "WHERE EVENT_OBJECT_SCHEMA = DATABASE() AND "
"EVENT_OBJECT_TABLE = %s", "EVENT_OBJECT_TABLE = %s",
quote_for_equal(table_name, name_buff)); quote_for_equal(table_name, name_buff));
else
my_snprintf(query_buff, sizeof(query_buff), "SHOW TRIGGERS LIKE %s",
quote_for_like(table_name, name_buff));
if (mysql_query_with_error_report(mysql, &show_triggers_rs, query_buff)) if (mysql_query_with_error_report(mysql, &show_triggers_rs, query_buff))
goto done; goto done;
@ -3522,27 +3528,18 @@ static int dump_triggers_for_table(char *table_name, char *db_name)
while ((row= mysql_fetch_row(show_triggers_rs))) while ((row= mysql_fetch_row(show_triggers_rs)))
{ {
if (use_show_create_trigger)
{
MYSQL_RES *show_create_trigger_rs;
my_snprintf(query_buff, sizeof (query_buff), my_snprintf(query_buff, sizeof (query_buff), "SHOW CREATE TRIGGER %s",
"SHOW CREATE TRIGGER %s",
quote_name(row[0], name_buff, TRUE)); quote_name(row[0], name_buff, TRUE));
if (mysql_query(mysql, query_buff)) if (mysql_query_with_error_report(mysql, &show_create_trigger_rs,
{ query_buff))
/* goto done;
mysqldump is being run against old server, that does not support
SHOW CREATE TRIGGER statement. We should use SHOW TRIGGERS output.
NOTE: the dump may be incorrect, as old SHOW TRIGGERS does not
provide all the necessary information to restore trigger properly.
*/
dump_trigger_old(sql_file, show_triggers_rs, &row, table_name);
}
else else
{ {
MYSQL_RES *show_create_trigger_rs= mysql_store_result(mysql);
int error= (!show_create_trigger_rs || int error= (!show_create_trigger_rs ||
dump_trigger(sql_file, show_create_trigger_rs, db_name, dump_trigger(sql_file, show_create_trigger_rs, db_name,
db_cl_name)); db_cl_name));
@ -3550,7 +3547,9 @@ static int dump_triggers_for_table(char *table_name, char *db_name)
if (error) if (error)
goto done; goto done;
} }
}
else
dump_trigger_old(sql_file, show_triggers_rs, &row, table_name);
} }
if (opt_xml) if (opt_xml)

View File

@ -514,11 +514,11 @@ static void safe_exit(int error, MYSQL *mysql)
if (mysql) if (mysql)
mysql_close(mysql); mysql_close(mysql);
mysql_library_end();
#ifdef HAVE_SMEM #ifdef HAVE_SMEM
my_free(shared_memory_base_name); my_free(shared_memory_base_name);
#endif #endif
free_defaults(argv_to_free); free_defaults(argv_to_free);
mysql_library_end();
my_free(opt_password); my_free(opt_password);
if (error) if (error)
sf_leaking_memory= 1; /* dirty exit, some threads are still running */ sf_leaking_memory= 1; /* dirty exit, some threads are still running */

View File

@ -59,7 +59,7 @@ typedef struct st_tree_element {
#define ELEMENT_CHILD(element, offs) (*(TREE_ELEMENT**)((char*)element + offs)) #define ELEMENT_CHILD(element, offs) (*(TREE_ELEMENT**)((char*)element + offs))
typedef struct st_tree { typedef struct st_tree {
TREE_ELEMENT *root,null_element; TREE_ELEMENT *root;
TREE_ELEMENT **parents[MAX_TREE_HEIGHT]; TREE_ELEMENT **parents[MAX_TREE_HEIGHT];
uint offset_to_key,elements_in_tree,size_of_element; uint offset_to_key,elements_in_tree,size_of_element;
size_t memory_limit, allocated; size_t memory_limit, allocated;

@ -1 +1 @@
Subproject commit b50871611764d282874ad095d6c021163d1fe354 Subproject commit bce6c8013805f203b38e52c979b22b3141334f3c

View File

@ -16,3 +16,9 @@ select c1 as c1u from t1 where c1 like 'ab\_def';
# should return ab_def # should return ab_def
select c1 as c2h from t1 where c1 like 'ab#_def' escape '#'; select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
drop table t1; drop table t1;
#
# MDEV-13335 UTF8 escape wildcard LIKE match has different behavior in different collations
#
SELECT @@collation_connection;
SELECT '\%b' LIKE '%\%';

View File

@ -34,7 +34,7 @@ openssl ca -keyfile cakey.pem -days 7300 -batch -cert cacert.pem -policy policy_
# with SubjectAltName, only for OpenSSL 1.0.2+ # with SubjectAltName, only for OpenSSL 1.0.2+
cat > demoCA/sanext.conf <<EOF cat > demoCA/sanext.conf <<EOF
subjectAltName=DNS:localhost subjectAltName=IP:127.0.0.1, DNS:localhost
EOF EOF
openssl req -newkey rsa:2048 -keyout serversan-key.pem -out demoCA/serversan-req.pem -days 7300 -nodes -subj '/CN=server/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB' openssl req -newkey rsa:2048 -keyout serversan-key.pem -out demoCA/serversan-req.pem -days 7300 -nodes -subj '/CN=server/C=FI/ST=Helsinki/L=Helsinki/O=MariaDB'
openssl ca -keyfile cakey.pem -extfile demoCA/sanext.conf -days 7300 -batch -cert cacert.pem -policy policy_anything -out serversan-cert.pem -in demoCA/serversan-req.pem openssl ca -keyfile cakey.pem -extfile demoCA/sanext.conf -days 7300 -batch -cert cacert.pem -policy policy_anything -out serversan-cert.pem -in demoCA/serversan-req.pem

View File

@ -65,6 +65,15 @@ SELECT 'bug' as '' FROM INFORMATION_SCHEMA.ENGINES WHERE engine='innodb'
--error 1 --error 1
--exec $MYSQLD_BOOTSTRAP_CMD --myisam_recover_options=NONE --exec $MYSQLD_BOOTSTRAP_CMD --myisam_recover_options=NONE
#
# MDEV-19349 mysql_install_db: segfault at tmp_file_prefix check
#
--write_file $MYSQLTEST_VARDIR/tmp/1
use test;
EOF
--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/1 >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/1
--echo End of 5.5 tests --echo End of 5.5 tests
--source include/not_windows_embedded.inc --source include/not_windows_embedded.inc

View File

@ -246,7 +246,11 @@ Log_name Pos Event_type Server_id End_log_pos Info
RESET MASTER; RESET MASTER;
SET timestamp=UNIX_TIMESTAMP('2014-11-01 10:20:30'); SET timestamp=UNIX_TIMESTAMP('2014-11-01 10:20:30');
CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE IF EXISTS t1; CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE IF EXISTS t1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE IF EXISTS t2; CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE IF EXISTS t2;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION EVENT_NAME EVENT_DEFINITION
ev1 DROP TABLE IF EXISTS t2 ev1 DROP TABLE IF EXISTS t2

View File

@ -4,6 +4,8 @@ CREATE TABLE t1 (a INT);
CREATE OR REPLACE EVENT IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1; CREATE OR REPLACE EVENT IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE db1;
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (10); CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (10);
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION EVENT_NAME EVENT_DEFINITION
ev1 INSERT INTO t1 VALUES (10) ev1 INSERT INTO t1 VALUES (10)
@ -21,10 +23,13 @@ ev1 INSERT INTO t1 VALUES (10)
CREATE EVENT IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (12); CREATE EVENT IF NOT EXISTS ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (12);
Warnings: Warnings:
Note 1537 Event 'ev1' already exists Note 1537 Event 'ev1' already exists
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION EVENT_NAME EVENT_DEFINITION
ev1 INSERT INTO t1 VALUES (10) ev1 INSERT INTO t1 VALUES (10)
CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (13); CREATE OR REPLACE EVENT ev1 ON SCHEDULE EVERY 1 SECOND DO INSERT INTO t1 VALUES (13);
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS; SELECT EVENT_NAME, EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS;
EVENT_NAME EVENT_DEFINITION EVENT_NAME EVENT_DEFINITION
ev1 INSERT INTO t1 VALUES (13) ev1 INSERT INTO t1 VALUES (13)

View File

@ -220,6 +220,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
big5_chinese_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
@ -450,6 +456,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
big5_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);

View File

@ -220,6 +220,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
euckr_korean_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
@ -355,6 +361,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
euckr_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);

View File

@ -220,6 +220,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
gb2312_chinese_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
@ -436,6 +442,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
gb2312_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);

View File

@ -220,6 +220,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
gbk_chinese_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
@ -436,6 +442,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
gbk_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);

View File

@ -506,6 +506,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
latin1_swedish_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
# #
# MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32 # MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32
# #
@ -636,6 +642,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
latin1_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
SELECT strcmp('a','a '), strcmp('a ','a'); SELECT strcmp('a','a '), strcmp('a ','a');
strcmp('a','a ') strcmp('a ','a') strcmp('a','a ') strcmp('a ','a')
0 0 0 0

View File

@ -189,6 +189,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
sjis_japanese_ci
SELECT '\%b' LIKE '%\%';
'<27>_%b' LIKE '%<25>_%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
@ -343,6 +349,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
sjis_bin
SELECT '\%b' LIKE '%\%';
'<27>_%b' LIKE '%<25>_%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);

View File

@ -3033,6 +3033,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
tis620_thai_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
drop table if exists t1; drop table if exists t1;
create table t1 select repeat('a',10) as c1; create table t1 select repeat('a',10) as c1;
delete from t1; delete from t1;
@ -3331,6 +3337,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
tis620_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
# #
# MDEV-7149 Constant condition propagation erroneously applied for LIKE # MDEV-7149 Constant condition propagation erroneously applied for LIKE
# #

View File

@ -6233,6 +6233,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8_unicode_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc" "BEGIN ctype_german.inc"
drop table if exists t1; drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1; create table t1 as select repeat(' ', 64) as s1;

View File

@ -840,6 +840,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
ucs2_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc" "BEGIN ctype_german.inc"
drop table if exists t1; drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1; create table t1 as select repeat(' ', 64) as s1;
@ -1089,6 +1095,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
ucs2_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);

View File

@ -2327,6 +2327,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
ujis_japanese_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
@ -2462,6 +2468,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
ujis_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 AS CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d; SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b); ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);

View File

@ -669,6 +669,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf16_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
SET NAMES latin1; SET NAMES latin1;
SET collation_connection='utf16_bin'; SET collation_connection='utf16_bin';
create table t1 select repeat('a',4000) a; create table t1 select repeat('a',4000) a;
@ -806,6 +812,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf16_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
select hex(substr(_utf16 0x00e400e50068,1)); select hex(substr(_utf16 0x00e400e50068,1));
hex(substr(_utf16 0x00e400e50068,1)) hex(substr(_utf16 0x00e400e50068,1))
00E400E50068 00E400E50068

View File

@ -2952,6 +2952,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf16_unicode_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc" "BEGIN ctype_german.inc"
drop table if exists t1; drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1; create table t1 as select repeat(' ', 64) as s1;

View File

@ -713,6 +713,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf16le_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
SET NAMES utf8, collation_connection='utf16le_bin'; SET NAMES utf8, collation_connection='utf16le_bin';
create table t1 select repeat('a',4000) a; create table t1 select repeat('a',4000) a;
delete from t1; delete from t1;
@ -849,6 +855,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf16le_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
# #
# Bug#10344 Some string functions fail for UCS2 # Bug#10344 Some string functions fail for UCS2
# #

View File

@ -668,6 +668,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf32_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
SET NAMES latin1; SET NAMES latin1;
SET collation_connection='utf32_bin'; SET collation_connection='utf32_bin';
create table t1 select repeat('a',4000) a; create table t1 select repeat('a',4000) a;
@ -805,6 +811,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf32_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
select hex(substr(_utf32 0x000000e4000000e500000068,1)); select hex(substr(_utf32 0x000000e4000000e500000068,1));
hex(substr(_utf32 0x000000e4000000e500000068,1)) hex(substr(_utf32 0x000000e4000000e500000068,1))
000000E4000000E500000068 000000E4000000E500000068

View File

@ -2952,6 +2952,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf32_unicode_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc" "BEGIN ctype_german.inc"
drop table if exists t1; drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1; create table t1 as select repeat(' ', 64) as s1;

View File

@ -1032,6 +1032,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc" "BEGIN ctype_german.inc"
drop table if exists t1; drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1; create table t1 as select repeat(' ', 64) as s1;
@ -1263,6 +1269,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 ( CREATE TABLE t1 (
user varchar(255) NOT NULL default '' user varchar(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1; ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

View File

@ -1032,6 +1032,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8mb4_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc" "BEGIN ctype_german.inc"
drop table if exists t1; drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1; create table t1 as select repeat(' ', 64) as s1;
@ -1284,6 +1290,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8mb4_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 ( CREATE TABLE t1 (
user varchar(255) NOT NULL default '' user varchar(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1; ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

View File

@ -971,6 +971,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8mb4_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc" "BEGIN ctype_german.inc"
drop table if exists t1; drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1; create table t1 as select repeat(' ', 64) as s1;
@ -1183,6 +1189,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8mb4_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 ( CREATE TABLE t1 (
user varchar(255) NOT NULL default '' user varchar(255) NOT NULL default ''
) ENGINE=heap DEFAULT CHARSET=latin1; ) ENGINE=heap DEFAULT CHARSET=latin1;

View File

@ -1034,6 +1034,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8mb4_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc" "BEGIN ctype_german.inc"
drop table if exists t1; drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1; create table t1 as select repeat(' ', 64) as s1;
@ -1246,6 +1252,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8mb4_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 ( CREATE TABLE t1 (
user varchar(255) NOT NULL default '' user varchar(255) NOT NULL default ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1; ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@ -1037,6 +1037,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8mb4_general_ci
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
"BEGIN ctype_german.inc" "BEGIN ctype_german.inc"
drop table if exists t1; drop table if exists t1;
create table t1 as select repeat(' ', 64) as s1; create table t1 as select repeat(' ', 64) as s1;
@ -1249,6 +1255,12 @@ select c1 as c2h from t1 where c1 like 'ab#_def' escape '#';
c2h c2h
ab_def ab_def
drop table t1; drop table t1;
SELECT @@collation_connection;
@@collation_connection
utf8mb4_bin
SELECT '\%b' LIKE '%\%';
'\%b' LIKE '%\%'
0
CREATE TABLE t1 ( CREATE TABLE t1 (
user varchar(255) NOT NULL default '' user varchar(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1; ) ENGINE=MyISAM DEFAULT CHARSET=latin1;

View File

@ -2183,6 +2183,8 @@ COLLATION(_utf8 'текст') AS c4,
@@collation_connection AS c5, @@collation_connection AS c5,
@@character_set_client AS c6; @@character_set_client AS c6;
END| END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT ev2 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO CREATE EVENT ev2 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
@ -2195,6 +2197,8 @@ COLLATION(_utf8 'текст') AS c4,
@@collation_connection AS c5, @@collation_connection AS c5,
@@character_set_client AS c6; @@character_set_client AS c6;
END| END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
@ -2207,6 +2211,8 @@ COLLATION(_utf8 'текст') AS c4,
@@collation_connection AS c5, @@collation_connection AS c5,
@@character_set_client AS c6; @@character_set_client AS c6;
END| END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
@ -2219,6 +2225,8 @@ COLLATION(_utf8 'текст') AS c4,
@@collation_connection AS c5, @@collation_connection AS c5,
@@character_set_client AS c6; @@character_set_client AS c6;
END| END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.

View File

@ -2183,6 +2183,8 @@ COLLATION(_koi8r '
@@collation_connection AS c5, @@collation_connection AS c5,
@@character_set_client AS c6; @@character_set_client AS c6;
END| END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT ev2 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO CREATE EVENT ev2 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
@ -2195,6 +2197,8 @@ COLLATION(_koi8r '
@@collation_connection AS c5, @@collation_connection AS c5,
@@character_set_client AS c6; @@character_set_client AS c6;
END| END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO CREATE EVENT mysqltest2.ev3 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
@ -2207,6 +2211,8 @@ COLLATION(_koi8r '
@@collation_connection AS c5, @@collation_connection AS c5,
@@character_set_client AS c6; @@character_set_client AS c6;
END| END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO CREATE EVENT mysqltest2.ev4 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO
BEGIN BEGIN
@ -2219,6 +2225,8 @@ COLLATION(_koi8r '
@@collation_connection AS c5, @@collation_connection AS c5,
@@character_set_client AS c6; @@character_set_client AS c6;
END| END|
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.

View File

@ -10517,6 +10517,56 @@ a b max_d c
1 2 3 1 1 2 3 1
5 6 1 5 5 6 1 5
DROP TABLE t1,t2; DROP TABLE t1,t2;
#
# MDEV-19139: pushdown condition with Item_func_set_user_var
#
CREATE TABLE t1 (a INT, b INT);
CREATE VIEW v1 AS SELECT a, MAX(b) FROM t1 GROUP BY a;
SELECT * FROM (SELECT 1 FROM v1 UNION (SELECT 1 FROM v1 WHERE @a := uuid())) dt;
1
EXPLAIN FORMAT=JSON
SELECT * FROM (SELECT 1 FROM v1 UNION (SELECT 1 FROM v1 WHERE @a := uuid())) dt;
EXPLAIN
{
"query_block": {
"select_id": 1,
"table": {
"table_name": "<derived2>",
"access_type": "ALL",
"rows": 2,
"filtered": 100,
"materialized": {
"query_block": {
"union_result": {
"table_name": "<union2,3>",
"access_type": "ALL",
"query_specifications": [
{
"query_block": {
"select_id": 2,
"table": {
"message": "no matching row in const table"
}
}
},
{
"query_block": {
"select_id": 3,
"operation": "UNION",
"table": {
"message": "no matching row in const table"
}
}
}
]
}
}
}
}
}
}
DROP TABLE t1;
DROP VIEW v1;
# End of 10.2 tests # End of 10.2 tests
# #
# MDEV-14579: pushdown conditions into materialized views/derived tables # MDEV-14579: pushdown conditions into materialized views/derived tables

View File

@ -2124,6 +2124,20 @@ WHERE t1.a=tab.c AND
DROP TABLE t1,t2; DROP TABLE t1,t2;
--echo #
--echo # MDEV-19139: pushdown condition with Item_func_set_user_var
--echo #
CREATE TABLE t1 (a INT, b INT);
CREATE VIEW v1 AS SELECT a, MAX(b) FROM t1 GROUP BY a;
SELECT * FROM (SELECT 1 FROM v1 UNION (SELECT 1 FROM v1 WHERE @a := uuid())) dt;
EXPLAIN FORMAT=JSON
SELECT * FROM (SELECT 1 FROM v1 UNION (SELECT 1 FROM v1 WHERE @a := uuid())) dt;
DROP TABLE t1;
DROP VIEW v1;
--echo # End of 10.2 tests --echo # End of 10.2 tests
--echo # --echo #

View File

@ -13,7 +13,11 @@ USE db_x;
CREATE TABLE x_table(a int); CREATE TABLE x_table(a int);
connect priv_conn,localhost,pauline,,db_x; connect priv_conn,localhost,pauline,,db_x;
CREATE EVENT e_x1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE db_x; CREATE EVENT e_x1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE db_x;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e_x2 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE x_table; CREATE EVENT e_x2 ON SCHEDULE EVERY 1 SECOND DO DROP TABLE x_table;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
connection default; connection default;
SHOW DATABASES LIKE 'db_x'; SHOW DATABASES LIKE 'db_x';
Database (db_x) Database (db_x)
@ -39,6 +43,8 @@ drop event if exists event1;
Warnings: Warnings:
Note 1305 Event event1 does not exist Note 1305 Event event1 does not exist
create event event1 on schedule every 15 minute starts now() ends date_add(now(), interval 5 hour) DO begin end; create event event1 on schedule every 15 minute starts now() ends date_add(now(), interval 5 hour) DO begin end;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event event1 rename to event2 enable; alter event event1 rename to event2 enable;
alter event event2 disable; alter event event2 disable;
alter event event2 enable; alter event event2 enable;
@ -47,8 +53,12 @@ alter event event2 on schedule every 1 year on completion preserve rename to eve
alter event event3 rename to event2; alter event event3 rename to event2;
drop event event2; drop event event2;
create event event2 on schedule every 2 second starts now() ends date_add(now(), interval 5 hour) comment "some" DO begin end; create event event2 on schedule every 2 second starts now() ends date_add(now(), interval 5 hour) comment "some" DO begin end;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
drop event event2; drop event event2;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1; CREATE EVENT event_starts_test ON SCHEDULE EVERY 10 SECOND COMMENT "" DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT interval_field, interval_value, body FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT interval_field, interval_value, body FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
interval_field interval_value body interval_field interval_value body
SECOND 10 SELECT 1 SECOND 10 SELECT 1
@ -69,6 +79,8 @@ execute_at IS NULL starts IS NULL ends IS NULL comment
0 1 1 0 1 1
DROP EVENT event_starts_test; DROP EVENT event_starts_test;
CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '1970-01-02 00:00:00' ENDS '1970-01-03 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 2; CREATE EVENT event_starts_test ON SCHEDULE EVERY 20 SECOND STARTS '1970-01-02 00:00:00' ENDS '1970-01-03 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 2;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test'; SELECT execute_at IS NULL, starts IS NULL, ends IS NULL, comment FROM mysql.event WHERE db='events_test' AND name='event_starts_test';
execute_at IS NULL starts IS NULL ends IS NULL comment execute_at IS NULL starts IS NULL ends IS NULL comment
1 0 0 1 0 0
@ -83,6 +95,8 @@ execute_at IS NULL starts IS NULL ends IS NULL comment
DROP EVENT event_starts_test; DROP EVENT event_starts_test;
create table test_nested(a int); create table test_nested(a int);
create event e_43 on schedule every 1 second do set @a = 5; create event e_43 on schedule every 1 second do set @a = 5;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event e_43 do alter event e_43 do set @a = 4; alter event e_43 do alter event e_43 do set @a = 4;
ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present
alter event e_43 do alter event e_43 do
@ -111,6 +125,8 @@ alter event non_existant rename to non_existant_too;
ERROR HY000: Unknown event 'non_existant' ERROR HY000: Unknown event 'non_existant'
set global event_scheduler = off; set global event_scheduler = off;
create event existant on schedule at now() + interval 1 year do select 12; create event existant on schedule at now() + interval 1 year do select 12;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event non_existant rename to existant; alter event non_existant rename to existant;
ERROR HY000: Event 'existant' already exists ERROR HY000: Event 'existant' already exists
alter event existant rename to events_test.existant; alter event existant rename to events_test.existant;
@ -121,6 +137,8 @@ drop event if exists event3;
Warnings: Warnings:
Note 1305 Event event3 does not exist Note 1305 Event event3 does not exist
create event event3 on schedule every 50 + 10 minute starts date_add(curdate(), interval 5 minute) ends date_add(curdate(), interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand()); create event event3 on schedule every 50 + 10 minute starts date_add(curdate(), interval 5 minute) ends date_add(curdate(), interval 5 day) comment "portokala_comment" DO insert into t_event3 values (unix_timestamp(), rand());
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select count(*) from t_event3; select count(*) from t_event3;
count(*) count(*)
0 0
@ -128,79 +146,117 @@ drop event event3;
drop table t_event3; drop table t_event3;
set names utf8; set names utf8;
CREATE EVENT root6 ON SCHEDULE EVERY '10:20' MINUTE_SECOND ON COMPLETION PRESERVE ENABLE COMMENT 'some comment' DO select 1; CREATE EVENT root6 ON SCHEDULE EVERY '10:20' MINUTE_SECOND ON COMPLETION PRESERVE ENABLE COMMENT 'some comment' DO select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root6; SHOW CREATE EVENT root6;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root6 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root6` ON SCHEDULE EVERY '10:20' MINUTE_SECOND STARTS '#' ON COMPLETION PRESERVE ENABLE COMMENT 'some comment' DO select 1 utf8 utf8_general_ci latin1_swedish_ci root6 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root6` ON SCHEDULE EVERY '10:20' MINUTE_SECOND STARTS '#' ON COMPLETION PRESERVE ENABLE COMMENT 'some comment' DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root7 on schedule every 2 year do select 1; create event root7 on schedule every 2 year do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root7; SHOW CREATE EVENT root7;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root7 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root7` ON SCHEDULE EVERY 2 YEAR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root7 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root7` ON SCHEDULE EVERY 2 YEAR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root8 on schedule every '2:5' year_month do select 1; create event root8 on schedule every '2:5' year_month do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root8; SHOW CREATE EVENT root8;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root8 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root8` ON SCHEDULE EVERY '2-5' YEAR_MONTH STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root8 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root8` ON SCHEDULE EVERY '2-5' YEAR_MONTH STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root8_1 on schedule every '2:15' year_month do select 1; create event root8_1 on schedule every '2:15' year_month do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root8_1; SHOW CREATE EVENT root8_1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root8_1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root8_1` ON SCHEDULE EVERY '3-3' YEAR_MONTH STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root8_1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root8_1` ON SCHEDULE EVERY '3-3' YEAR_MONTH STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root9 on schedule every 2 week ON COMPLETION PRESERVE DISABLE COMMENT 'коментар на кирилица' do select 1; create event root9 on schedule every 2 week ON COMPLETION PRESERVE DISABLE COMMENT 'коментар на кирилица' do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root9; SHOW CREATE EVENT root9;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root9 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root9` ON SCHEDULE EVERY 2 WEEK STARTS '#' ON COMPLETION PRESERVE DISABLE COMMENT 'коментар на кирилица' DO select 1 utf8 utf8_general_ci latin1_swedish_ci root9 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root9` ON SCHEDULE EVERY 2 WEEK STARTS '#' ON COMPLETION PRESERVE DISABLE COMMENT 'коментар на кирилица' DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root10 on schedule every '20:5' day_hour do select 1; create event root10 on schedule every '20:5' day_hour do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root10; SHOW CREATE EVENT root10;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root10 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root10` ON SCHEDULE EVERY '20 5' DAY_HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root10 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root10` ON SCHEDULE EVERY '20 5' DAY_HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root11 on schedule every '20:25' day_hour do select 1; create event root11 on schedule every '20:25' day_hour do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root11; SHOW CREATE EVENT root11;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root11 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root11` ON SCHEDULE EVERY '21 1' DAY_HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root11 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root11` ON SCHEDULE EVERY '21 1' DAY_HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root12 on schedule every '20:25' hour_minute do select 1; create event root12 on schedule every '20:25' hour_minute do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root12; SHOW CREATE EVENT root12;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root12 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root12` ON SCHEDULE EVERY '20:25' HOUR_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root12 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root12` ON SCHEDULE EVERY '20:25' HOUR_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root13 on schedule every '25:25' hour_minute do select 1; create event root13 on schedule every '25:25' hour_minute do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root13; SHOW CREATE EVENT root13;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root13 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root13` ON SCHEDULE EVERY '25:25' HOUR_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root13 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root13` ON SCHEDULE EVERY '25:25' HOUR_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root13_1 on schedule every '11:65' hour_minute do select 1; create event root13_1 on schedule every '11:65' hour_minute do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root13_1; SHOW CREATE EVENT root13_1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root13_1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root13_1` ON SCHEDULE EVERY '12:5' HOUR_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root13_1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root13_1` ON SCHEDULE EVERY '12:5' HOUR_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root14 on schedule every '35:35' minute_second do select 1; create event root14 on schedule every '35:35' minute_second do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root14; SHOW CREATE EVENT root14;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root14 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root14` ON SCHEDULE EVERY '35:35' MINUTE_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root14 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root14` ON SCHEDULE EVERY '35:35' MINUTE_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root15 on schedule every '35:66' minute_second do select 1; create event root15 on schedule every '35:66' minute_second do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root15; SHOW CREATE EVENT root15;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root15 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root15` ON SCHEDULE EVERY '36:6' MINUTE_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root15 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root15` ON SCHEDULE EVERY '36:6' MINUTE_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root16 on schedule every '35:56' day_minute do select 1; create event root16 on schedule every '35:56' day_minute do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root16; SHOW CREATE EVENT root16;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root16 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root16` ON SCHEDULE EVERY '1 11:56' DAY_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root16 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root16` ON SCHEDULE EVERY '1 11:56' DAY_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root17 on schedule every '35:12:45' day_minute do select 1; create event root17 on schedule every '35:12:45' day_minute do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root17; SHOW CREATE EVENT root17;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root17 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root17` ON SCHEDULE EVERY '35 12:45' DAY_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root17 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root17` ON SCHEDULE EVERY '35 12:45' DAY_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root17_1 on schedule every '35:25:65' day_minute do select 1; create event root17_1 on schedule every '35:25:65' day_minute do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root17_1; SHOW CREATE EVENT root17_1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root17_1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root17_1` ON SCHEDULE EVERY '36 2:5' DAY_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root17_1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root17_1` ON SCHEDULE EVERY '36 2:5' DAY_MINUTE STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root18 on schedule every '35:12:45' hour_second do select 1; create event root18 on schedule every '35:12:45' hour_second do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root18; SHOW CREATE EVENT root18;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root18 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root18` ON SCHEDULE EVERY '35:12:45' HOUR_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root18 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root18` ON SCHEDULE EVERY '35:12:45' HOUR_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root19 on schedule every '15:59:85' hour_second do select 1; create event root19 on schedule every '15:59:85' hour_second do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root19; SHOW CREATE EVENT root19;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root19 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root19` ON SCHEDULE EVERY '16:0:25' HOUR_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root19 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root19` ON SCHEDULE EVERY '16:0:25' HOUR_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
create event root20 on schedule every '50:20:12:45' day_second do select 1; create event root20 on schedule every '50:20:12:45' day_second do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT root20; SHOW CREATE EVENT root20;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
root20 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root20` ON SCHEDULE EVERY '50 20:12:45' DAY_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci root20 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `root20` ON SCHEDULE EVERY '50 20:12:45' DAY_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 utf8 utf8_general_ci latin1_swedish_ci
set names cp1251; set names cp1251;
create event ðóóò21 on schedule every '50:23:59:95' day_second COMMENT 'òîâà å 1251 êîìåíòàð' do select 1; create event ðóóò21 on schedule every '50:23:59:95' day_second COMMENT 'òîâà å 1251 êîìåíòàð' do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW CREATE EVENT ðóóò21; SHOW CREATE EVENT ðóóò21;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ðóóò21 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `рууÑ21` ON SCHEDULE EVERY '51 0:0:35' DAY_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'това е 1251 коментар' DO select 1 cp1251 cp1251_general_ci latin1_swedish_ci ðóóò21 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `рууÑ21` ON SCHEDULE EVERY '51 0:0:35' DAY_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'това е 1251 коментар' DO select 1 cp1251 cp1251_general_ci latin1_swedish_ci
@ -260,6 +316,8 @@ set names latin1;
Create a test event. Only event metadata is relevant, Create a test event. Only event metadata is relevant,
the actual schedule and body are not. the actual schedule and body are not.
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@ -306,6 +364,8 @@ SET GLOBAL event_scheduler=OFF;
ALTER TABLE mysql.event DROP dummy; ALTER TABLE mysql.event DROP dummy;
DROP EVENT intact_check; DROP EVENT intact_check;
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
Now let's add a column to the first position: the server Now let's add a column to the first position: the server
expects to see event schema name there expects to see event schema name there
@ -349,6 +409,8 @@ Clean up
ALTER TABLE mysql.event DROP dummy; ALTER TABLE mysql.event DROP dummy;
DELETE FROM mysql.event; DELETE FROM mysql.event;
CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing";
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
Back up the table, further changes are not reversible Back up the table, further changes are not reversible
CREATE TABLE event_like LIKE mysql.event; CREATE TABLE event_like LIKE mysql.event;
INSERT INTO event_like SELECT * FROM mysql.event; INSERT INTO event_like SELECT * FROM mysql.event;
@ -447,6 +509,8 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
# #
CREATE EVENT ev1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; CREATE EVENT ev1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
ALTER EVENT ev1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; ALTER EVENT ev1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8;
CREATE TABLE event_original LIKE mysql.event; CREATE TABLE event_original LIKE mysql.event;
@ -480,6 +544,8 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
# #
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
CREATE EVENT ev1 ON SCHEDULE EVERY 5 SECOND DO DELETE FROM t1; CREATE EVENT ev1 ON SCHEDULE EVERY 5 SECOND DO DELETE FROM t1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@ -489,6 +555,8 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E
events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
DROP EVENT ev1; DROP EVENT ev1;
CREATE EVENT ev1 ON SCHEDULE EVERY 5 SECOND DO DELETE FROM t1; CREATE EVENT ev1 ON SCHEDULE EVERY 5 SECOND DO DELETE FROM t1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci events_test ev1 root@localhost SYSTEM RECURRING NULL 5 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci

View File

@ -3,6 +3,8 @@ drop database if exists events_test;
create database events_test; create database events_test;
use events_test; use events_test;
create event e_26 on schedule at '2037-01-01 00:00:00' disable do set @a = 5; create event e_26 on schedule at '2037-01-01 00:00:00' disable do set @a = 5;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event;
db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion
events_test e_26 set @a = 5 root@localhost 2037-01-01 00:00:00 DROP events_test e_26 set @a = 5 root@localhost 2037-01-01 00:00:00 DROP
@ -13,6 +15,8 @@ create event e_26 on schedule at 'definitely not a datetime' disable do set @a =
ERROR HY000: Incorrect AT value: 'definitely not a datetime' ERROR HY000: Incorrect AT value: 'definitely not a datetime'
set names utf8; set names utf8;
create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1; create event задачка on schedule every 123 minute starts now() ends now() + interval 1 month do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
drop event задачка; drop event задачка;
"DISABLE the scheduler. Testing that it does not work when the variable is 0" "DISABLE the scheduler. Testing that it does not work when the variable is 0"
set global event_scheduler=off; set global event_scheduler=off;
@ -22,6 +26,8 @@ select get_lock("test_lock1", 20);
get_lock("test_lock1", 20) get_lock("test_lock1", 20)
1 1
create event закачка on schedule every 10 hour do select get_lock("test_lock1", 20); create event закачка on schedule every 10 hour do select get_lock("test_lock1", 20);
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
"Should return 1 row" "Should return 1 row"
select definer, name, db from mysql.event; select definer, name, db from mysql.event;
definer name db definer name db
@ -94,22 +100,30 @@ on schedule every 10 hour
disable disable
do do
select 1; select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space';
event_schema event_name definer event_definition event_schema event_name definer event_definition
events_test white_space root@localhost select 1 events_test white_space root@localhost select 1
drop event white_space; drop event white_space;
create event white_space on schedule every 10 hour disable do create event white_space on schedule every 10 hour disable do
select 2; select 2;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space';
event_schema event_name definer event_definition event_schema event_name definer event_definition
events_test white_space root@localhost select 2 events_test white_space root@localhost select 2
drop event white_space; drop event white_space;
create event white_space on schedule every 10 hour disable do select 3; create event white_space on schedule every 10 hour disable do select 3;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space'; select event_schema, event_name, definer, event_definition from information_schema.events where event_name='white_space';
event_schema event_name definer event_definition event_schema event_name definer event_definition
events_test white_space root@localhost select 3 events_test white_space root@localhost select 3
drop event white_space; drop event white_space;
create event e1 on schedule every 1 year do set @a = 5; create event e1 on schedule every 1 year do set @a = 5;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create table t1 (s1 int); create table t1 (s1 int);
create trigger t1_ai after insert on t1 for each row show create event e1; create trigger t1_ai after insert on t1 for each row show create event e1;
ERROR 0A000: Not allowed to return a result set from a trigger ERROR 0A000: Not allowed to return a result set from a trigger
@ -126,6 +140,8 @@ LOCK TABLES mode.
create table t1 (a int); create table t1 (a int);
create event e1 on schedule every 10 hour do select 1; create event e1 on schedule every 10 hour do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
lock table t1 read; lock table t1 read;
show create event e1; show create event e1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
@ -229,6 +245,8 @@ Events in sub-statements, events and prelocking
create event e1 on schedule every 10 hour do select 1; create event e1 on schedule every 10 hour do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create function f1() returns int create function f1() returns int
begin begin
show create event e1; show create event e1;
@ -321,6 +339,8 @@ drop table t1|
drop event e1| drop event e1|
set names utf8; set names utf8;
create event имя_события_в_кодировке_утф8_длиной_большеем_48 on schedule every 2 year do select 1; create event имя_события_в_кодировке_утф8_длиной_большеем_48 on schedule every 2 year do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select EVENT_NAME from information_schema.events select EVENT_NAME from information_schema.events
where event_schema='test'; where event_schema='test';
EVENT_NAME EVENT_NAME
@ -333,6 +353,8 @@ create event event_35981 on schedule every 6 month on completion preserve
disable disable
do do
select 1; select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
The following SELECTs should all give 1 The following SELECTs should all give 1
select count(*) from information_schema.events select count(*) from information_schema.events
where event_schema = database() and event_name = 'event_35981' and where event_schema = database() and event_name = 'event_35981' and
@ -367,6 +389,8 @@ drop event event_35981;
create event event_35981 on schedule every 6 month disable create event event_35981 on schedule every 6 month disable
do do
select 1; select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select count(*) from information_schema.events select count(*) from information_schema.events
where event_schema = database() and event_name = 'event_35981' and where event_schema = database() and event_name = 'event_35981' and
on_completion = 'NOT PRESERVE'; on_completion = 'NOT PRESERVE';
@ -377,6 +401,8 @@ create event event_35981 on schedule every 1 hour starts current_timestamp
on completion not preserve on completion not preserve
do do
select 1; select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00' alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
ends '1999-01-02 00:00:00'; ends '1999-01-02 00:00:00';
ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future
@ -385,6 +411,8 @@ create event event_35981 on schedule every 1 hour starts current_timestamp
on completion not preserve on completion not preserve
do do
select 1; select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00' alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
ends '1999-01-02 00:00:00' on completion preserve; ends '1999-01-02 00:00:00' on completion preserve;
Warnings: Warnings:
@ -394,6 +422,8 @@ create event event_35981 on schedule every 1 hour starts current_timestamp
on completion preserve on completion preserve
do do
select 1; select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00' alter event event_35981 on schedule every 1 hour starts '1999-01-01 00:00:00'
ends '1999-01-02 00:00:00'; ends '1999-01-02 00:00:00';
Warnings: Warnings:

View File

@ -11,16 +11,22 @@ VARIABLE_NAME VARIABLE_VALUE
EVENT_SCHEDULER ON EVENT_SCHEDULER ON
SET GLOBAL event_scheduler = 'OFF'; SET GLOBAL event_scheduler = 'OFF';
CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1; CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2; CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2;
ERROR HY000: Event 'Lower_case' already exists ERROR HY000: Event 'Lower_case' already exists
DROP EVENT Lower_case; DROP EVENT Lower_case;
SET NAMES cp1251; SET NAMES cp1251;
CREATE EVENT äîëåí_ðåãèñòúð_1251 ON SCHEDULE EVERY 1 YEAR DO SELECT 100; CREATE EVENT äîëåí_ðåãèñòúð_1251 ON SCHEDULE EVERY 1 YEAR DO SELECT 100;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT ÄîËåÍ_ðåãèñòúð_1251 ON SCHEDULE EVERY 2 YEAR DO SELECT 200; CREATE EVENT ÄîËåÍ_ðåãèñòúð_1251 ON SCHEDULE EVERY 2 YEAR DO SELECT 200;
ERROR HY000: Event 'ÄîËåÍ_ðåãèñòúð_1251' already exists ERROR HY000: Event 'ÄîËåÍ_ðåãèñòúð_1251' already exists
DROP EVENT ÄîËåÍ_ðåãèñòúð_1251; DROP EVENT ÄîËåÍ_ðåãèñòúð_1251;
SET NAMES utf8; SET NAMES utf8;
CREATE EVENT долен_региÑ<C2B8>ÑÑŠÑ€_уÑÑ„8 ON SCHEDULE EVERY 3 YEAR DO SELECT 300; CREATE EVENT долен_региÑ<C2B8>ÑÑŠÑ€_уÑÑ„8 ON SCHEDULE EVERY 3 YEAR DO SELECT 300;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT ДОÐЕÐ<E280A2>_региÑ<C2B8>ÑÑŠÑ€_уÑÑ„8 ON SCHEDULE EVERY 4 YEAR DO SELECT 400; CREATE EVENT ДОÐЕÐ<E280A2>_региÑ<C2B8>ÑÑŠÑ€_уÑÑ„8 ON SCHEDULE EVERY 4 YEAR DO SELECT 400;
ERROR HY000: Event 'ДОÐЕÐ<E280A2>_региÑ<C2B8>ÑÑŠÑ€_уÑÑ„8' already exists ERROR HY000: Event 'ДОÐЕÐ<E280A2>_региÑ<C2B8>ÑÑŠÑ€_уÑÑ„8' already exists
DROP EVENT ДОÐЕÐ<E280A2>_региÑ<C2B8>ÑÑŠÑ€_уÑÑ„8; DROP EVENT ДОÐЕÐ<E280A2>_региÑ<C2B8>ÑÑŠÑ€_уÑÑ„8;
@ -205,6 +211,8 @@ create database mysqltest_db1;
grant event on events_test.* to mysqltest_user1@localhost; grant event on events_test.* to mysqltest_user1@localhost;
connect conn2,localhost,mysqltest_user1,,events_test; connect conn2,localhost,mysqltest_user1,,events_test;
create event mysqltest_user1 on schedule every 10 second do select 42; create event mysqltest_user1 on schedule every 10 second do select 42;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
alter event mysqltest_user1 rename to mysqltest_db1.mysqltest_user1; alter event mysqltest_user1 rename to mysqltest_db1.mysqltest_user1;
ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db1' ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db1'
"Let's test now rename when there is no select DB" "Let's test now rename when there is no select DB"
@ -234,6 +242,8 @@ ERROR 42000: CREATE/ALTER EVENT does not support subqueries or stored functions
drop event if exists e_16; drop event if exists e_16;
drop procedure if exists p_16; drop procedure if exists p_16;
create event e_16 on schedule every 1 second do set @a=5; create event e_16 on schedule every 1 second do set @a=5;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create procedure p_16 () alter event e_16 on schedule every @a second; create procedure p_16 () alter event e_16 on schedule every @a second;
set @a = null; set @a = null;
call p_16(); call p_16();
@ -347,11 +357,15 @@ DROP USER mysqltest_u1@localhost;
CREATE USER mysqltest_u1@localhost; CREATE USER mysqltest_u1@localhost;
GRANT EVENT ON events_test.* TO mysqltest_u1@localhost; GRANT EVENT ON events_test.* TO mysqltest_u1@localhost;
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer event_name definer
e1 root@localhost e1 root@localhost
DROP EVENT e1; DROP EVENT e1;
CREATE DEFINER=CURRENT_USER EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE DEFINER=CURRENT_USER EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer event_name definer
e1 root@localhost e1 root@localhost
@ -361,23 +375,31 @@ event_name definer
e1 mysqltest_u1@localhost e1 mysqltest_u1@localhost
DROP EVENT e1; DROP EVENT e1;
CREATE DEFINER=CURRENT_USER() EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE DEFINER=CURRENT_USER() EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer event_name definer
e1 root@localhost e1 root@localhost
DROP EVENT e1; DROP EVENT e1;
CREATE DEFINER=mysqltest_u1@localhost EVENT e1 ON SCHEDULE EVERY 1 DAY DO CREATE DEFINER=mysqltest_u1@localhost EVENT e1 ON SCHEDULE EVERY 1 DAY DO
SELECT 1; SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer event_name definer
e1 mysqltest_u1@localhost e1 mysqltest_u1@localhost
DROP EVENT e1; DROP EVENT e1;
connect conn1, localhost, mysqltest_u1, , events_test; connect conn1, localhost, mysqltest_u1, , events_test;
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer event_name definer
e1 mysqltest_u1@localhost e1 mysqltest_u1@localhost
DROP EVENT e1; DROP EVENT e1;
CREATE DEFINER=CURRENT_USER EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE DEFINER=CURRENT_USER EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer event_name definer
e1 mysqltest_u1@localhost e1 mysqltest_u1@localhost
@ -388,6 +410,8 @@ event_name definer
e1 mysqltest_u1@localhost e1 mysqltest_u1@localhost
DROP EVENT e1; DROP EVENT e1;
CREATE DEFINER=CURRENT_USER() EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE DEFINER=CURRENT_USER() EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS; SELECT event_name, definer FROM INFORMATION_SCHEMA.EVENTS;
event_name definer event_name definer
e1 mysqltest_u1@localhost e1 mysqltest_u1@localhost
@ -404,6 +428,8 @@ SET @save_time_zone= @@TIME_ZONE;
SET TIME_ZONE= '+00:00'; SET TIME_ZONE= '+00:00';
SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59');
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test e1 root@localhost +00:00 RECURRING NULL 1 DAY 2005-12-31 23:58:59 NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci events_test e1 root@localhost +00:00 RECURRING NULL 1 DAY 2005-12-31 23:58:59 NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@ -433,14 +459,20 @@ DROP EVENT e1;
SET TIME_ZONE='+05:00'; SET TIME_ZONE='+05:00';
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO
SELECT 1; SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SET TIMESTAMP= @@TIMESTAMP + 1; SET TIMESTAMP= @@TIMESTAMP + 1;
SET TIME_ZONE='-05:00'; SET TIME_ZONE='-05:00';
CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO
SELECT 1; SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SET TIMESTAMP= @@TIMESTAMP + 1; SET TIMESTAMP= @@TIMESTAMP + 1;
SET TIME_ZONE='+00:00'; SET TIME_ZONE='+00:00';
CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO
SELECT 1; SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT * FROM INFORMATION_SCHEMA.EVENTS ORDER BY event_name; SELECT * FROM INFORMATION_SCHEMA.EVENTS ORDER BY event_name;
EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
def events_test e1 root@localhost +05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:58:59 2005-12-31 23:58:59 NULL 1 latin1 latin1_swedish_ci latin1_swedish_ci def events_test e1 root@localhost +05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:58:59 2005-12-31 23:58:59 NULL 1 latin1 latin1_swedish_ci latin1_swedish_ci
@ -505,26 +537,34 @@ DO
SELECT 1; SELECT 1;
Warnings: Warnings:
Note 1544 Event execution time is in the past. Event has been disabled Note 1544 Event execution time is in the past. Event has been disabled
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00'
ON COMPLETION PRESERVE ON COMPLETION PRESERVE
DO DO
SELECT 1; SELECT 1;
Warnings: Warnings:
Note 1544 Event execution time is in the past. Event has been disabled Note 1544 Event execution time is in the past. Event has been disabled
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
The following should succeed without warnings. The following should succeed without warnings.
ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00';
ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE;
CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO
SELECT 1; SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'
ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE
DO DO
SELECT 1; SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00'
ON COMPLETION PRESERVE DISABLE ON COMPLETION PRESERVE DISABLE
DO DO
SELECT 1; SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test e1 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci events_test e1 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@ -663,6 +703,8 @@ ERROR HY000: The MariaDB server is running with the --read-only option so it can
connect root_con,localhost,root,,events_test; connect root_con,localhost,root,,events_test;
CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1; CREATE EVENT e1 ON SCHEDULE AT '2020-01-01 00:00:00' DO SET @a = 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
ALTER EVENT e1 COMMENT 'comment'; ALTER EVENT e1 COMMENT 'comment';
@ -673,7 +715,11 @@ SET GLOBAL READ_ONLY = 0;
connection u1_con; connection u1_con;
CREATE EVENT e1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND DO SET @a = 1; CREATE EVENT e1 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND DO SET @a = 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e2 ON SCHEDULE EVERY 1 SECOND DO SET @a = 1; CREATE EVENT e2 ON SCHEDULE EVERY 1 SECOND DO SET @a = 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT SELECT
event_name, event_name,
@ -731,6 +777,8 @@ drop procedure if exists p;
set @old_mode= @@sql_mode; set @old_mode= @@sql_mode;
set @@sql_mode= cast(pow(2,32)-1 as unsigned integer); set @@sql_mode= cast(pow(2,32)-1 as unsigned integer);
create event e1 on schedule every 1 day do select 1; create event e1 on schedule every 1 day do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
select @@sql_mode into @full_mode; select @@sql_mode into @full_mode;
set @@sql_mode= @old_mode; set @@sql_mode= @old_mode;
select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode; select replace(@full_mode, 'ALLOW_INVALID_DATES', 'INVALID_DATES') into @full_mode;
@ -744,6 +792,8 @@ SELECT @@GLOBAL.server_id;
@@GLOBAL.server_id @@GLOBAL.server_id
4294967295 4294967295
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SELECT event_name, originator FROM INFORMATION_SCHEMA.EVENTS; SELECT event_name, originator FROM INFORMATION_SCHEMA.EVENTS;
event_name originator event_name originator
ev1 4294967295 ev1 4294967295
@ -752,6 +802,8 @@ SET GLOBAL server_id = @old_server_id;
CREATE DATABASE event_test12; CREATE DATABASE event_test12;
USE event_test12; USE event_test12;
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE DATABASE event_test1; CREATE DATABASE event_test1;
USE event_test1; USE event_test1;
SHOW EVENTS; SHOW EVENTS;
@ -801,6 +853,8 @@ DROP DATABASE IF EXISTS event_test11764334;
CREATE DATABASE event_test11764334; CREATE DATABASE event_test11764334;
USE event_test11764334; USE event_test11764334;
CREATE EVENT ev1 ON SCHEDULE EVERY 3 SECOND DISABLE DO SELECT 1; CREATE EVENT ev1 ON SCHEDULE EVERY 3 SECOND DISABLE DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS IN event_test11764334 WHERE NAME='ev1'; SHOW EVENTS IN event_test11764334 WHERE NAME='ev1';
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
event_test11764334 ev1 root@localhost SYSTEM RECURRING NULL 3 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci event_test11764334 ev1 root@localhost SYSTEM RECURRING NULL 3 SECOND # # DISABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci

View File

@ -1,6 +1,8 @@
CREATE DATABASE IF NOT EXISTS events_test; CREATE DATABASE IF NOT EXISTS events_test;
use events_test; use events_test;
CREATE EVENT one_event ON SCHEDULE EVERY 10 SECOND DO SELECT 123; CREATE EVENT one_event ON SCHEDULE EVERY 10 SECOND DO SELECT 123;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
events_test one_event root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci events_test one_event root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@ -38,7 +40,11 @@ Let's create some new events from the name of ev_test@localhost
CREATE EVENT one_event ON SCHEDULE EVERY 20 SECOND DO SELECT 123; CREATE EVENT one_event ON SCHEDULE EVERY 20 SECOND DO SELECT 123;
ERROR HY000: Event 'one_event' already exists ERROR HY000: Event 'one_event' already exists
CREATE EVENT two_event ON SCHEDULE EVERY 20 SECOND ON COMPLETION NOT PRESERVE COMMENT "two event" DO SELECT 123; CREATE EVENT two_event ON SCHEDULE EVERY 20 SECOND ON COMPLETION NOT PRESERVE COMMENT "two event" DO SELECT 123;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT three_event ON SCHEDULE EVERY 20 SECOND ON COMPLETION PRESERVE COMMENT "three event" DO SELECT 123; CREATE EVENT three_event ON SCHEDULE EVERY 20 SECOND ON COMPLETION PRESERVE COMMENT "three event" DO SELECT 123;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
"Now we should see 3 events:"; "Now we should see 3 events:";
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
@ -58,6 +64,8 @@ GRANT EVENT ON events_test2.* TO ev_test@localhost;
connection ev_con1; connection ev_con1;
USE events_test2; USE events_test2;
CREATE EVENT four_event ON SCHEDULE EVERY 20 SECOND DO SELECT 42; CREATE EVENT four_event ON SCHEDULE EVERY 20 SECOND DO SELECT 42;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
connection default; connection default;
USE events_test; USE events_test;
"We should see 4 events : one_event, two_event, three_event & four_event" "We should see 4 events : one_event, two_event, three_event & four_event"
@ -78,6 +86,8 @@ connection default;
CREATE DATABASE events_test2; CREATE DATABASE events_test2;
USE events_test2; USE events_test2;
CREATE EVENT five_event ON SCHEDULE EVERY 20 SECOND DO SELECT 42; CREATE EVENT five_event ON SCHEDULE EVERY 20 SECOND DO SELECT 42;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
connection ev_con1; connection ev_con1;
"Should see 4 events - one, two, three & five" "Should see 4 events - one, two, three & five"
SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_SCHEMA, EVENT_NAME; SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_SCHEMA, EVENT_NAME;

View File

@ -6,10 +6,16 @@ use events_test;
create table execution_log(name char(10)); create table execution_log(name char(10));
create event abc1 on schedule every 1 second do create event abc1 on schedule every 1 second do
insert into execution_log value('abc1'); insert into execution_log value('abc1');
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create event abc2 on schedule every 1 second do create event abc2 on schedule every 1 second do
insert into execution_log value('abc2'); insert into execution_log value('abc2');
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create event abc3 on schedule every 1 second do create event abc3 on schedule every 1 second do
insert into execution_log value('abc3'); insert into execution_log value('abc3');
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create table event_like like mysql.event; create table event_like like mysql.event;
insert into event_like select * from mysql.event; insert into event_like select * from mysql.event;
alter table mysql.event alter table mysql.event
@ -20,25 +26,25 @@ select @@event_scheduler;
@@event_scheduler @@event_scheduler
OFF OFF
show events; show events;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
select event_name from information_schema.events; select event_name from information_schema.events;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
show create event intact_check; show create event intact_check;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
drop event no_such_event; drop event no_such_event;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
create event intact_check_1 on schedule every 5 hour do select 5; create event intact_check_1 on schedule every 5 hour do select 5;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
alter event intact_check_1 on schedule every 8 hour do select 8; alter event intact_check_1 on schedule every 8 hour do select 8;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
alter event intact_check_1 rename to intact_check_2; alter event intact_check_1 rename to intact_check_2;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
drop event intact_check_1; drop event intact_check_1;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
drop event intact_check_2; drop event intact_check_2;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
drop event intact_check; drop event intact_check;
ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start ERROR HY000: Cannot proceed, because event scheduler is disabled
set global event_scheduler=on; set global event_scheduler=on;
ERROR HY000: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. ERROR HY000: Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
set global event_scheduler=off; set global event_scheduler=off;

View File

@ -21,6 +21,7 @@ GRANT ALL ON *.* TO event_user3@localhost;
connect (conn2,localhost,event_user2,,events_conn2_db); connect (conn2,localhost,event_user2,,events_conn2_db);
--echo "In the second connection we create some events which won't be dropped till the end" --echo "In the second connection we create some events which won't be dropped till the end"
--disable_query_log --disable_query_log
--disable_warnings
let $1= 50; let $1= 50;
while ($1) while ($1)
{ {

View File

@ -15,6 +15,8 @@ create table t1 (a varchar(255)) engine=innodb;
begin work; begin work;
insert into t1 (a) values ("OK: create event"); insert into t1 (a) values ("OK: create event");
create event e1 on schedule every 1 day do select 1; create event e1 on schedule every 1 day do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
rollback work; rollback work;
select * from t1; select * from t1;
a a
@ -60,11 +62,14 @@ OK: drop event if exists
delete from t1; delete from t1;
commit work; commit work;
create event e1 on schedule every 1 day do select 1; create event e1 on schedule every 1 day do select 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
begin work; begin work;
insert into t1 (a) values ("OK: create event if not exists"); insert into t1 (a) values ("OK: create event if not exists");
create event if not exists e1 on schedule every 2 day do select 2; create event if not exists e1 on schedule every 2 day do select 2;
Warnings: Warnings:
Note 1537 Event 'e1' already exists Note 1537 Event 'e1' already exists
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
rollback work; rollback work;
select * from t1; select * from t1;
a a
@ -96,6 +101,8 @@ OK: alter event rename: rename to same name
delete from t1; delete from t1;
commit work; commit work;
create event e2 on schedule every 3 day do select 3; create event e2 on schedule every 3 day do select 3;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
begin work; begin work;
insert into t1 (a) values ("OK: alter event rename: destination exists"); insert into t1 (a) values ("OK: alter event rename: destination exists");
alter event e2 rename to e1; alter event e2 rename to e1;
@ -126,6 +133,8 @@ DROP EVENT IF EXISTS e1;
CREATE TABLE t1 (a INT) ENGINE=InnoDB; CREATE TABLE t1 (a INT) ENGINE=InnoDB;
CREATE TABLE t2 (a INT); CREATE TABLE t2 (a INT);
CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
START TRANSACTION; START TRANSACTION;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
SAVEPOINT A; SAVEPOINT A;

View File

@ -85,6 +85,8 @@ insert into t1_temp values (1);
return 0; return 0;
end| end|
create event e1 on schedule every 1 minute do begin end; create event e1 on schedule every 1 minute do begin end;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
connect con1,localhost,root,,; connect con1,localhost,root,,;
connect con2,localhost,root,,; connect con2,localhost,root,,;
connect con3,localhost,root,,; connect con3,localhost,root,,;

View File

@ -1,4 +1,3 @@
drop table if exists t1, t2;
create table t1 (grp int, a bigint unsigned, c char(10) not null, d char(10) not null); create table t1 (grp int, a bigint unsigned, c char(10) not null, d char(10) not null);
insert into t1 values (1,1,"a","a"); insert into t1 values (1,1,"a","a");
insert into t1 values (2,2,"b","a"); insert into t1 values (2,2,"b","a");
@ -1200,6 +1199,35 @@ Warning 1260 Row 3 was cut by GROUP_CONCAT()
Warning 1260 Row 5 was cut by GROUP_CONCAT() Warning 1260 Row 5 was cut by GROUP_CONCAT()
DROP TABLE t1; DROP TABLE t1;
SET group_concat_max_len= DEFAULT; SET group_concat_max_len= DEFAULT;
set session group_concat_max_len=1024;
set max_session_mem_used=16*1024*1024;
SELECT GROUP_CONCAT(concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1) ORDER BY 2,1,3,4,6,5,8,7) AS c
FROM seq_1_to_200000;
c
0.90910.90910.90910.90910.90910.90910.90910.9091,1.81821.81821.81821.81821.81821.81821.81821.8182,10.000010.000010.000010.000010.000010.000010.000010.0000,10.909110.909110.909110.909110.909110.909110.909110.9091,100.0000100.0000100.0000100.0000100.0000100.0000100.0000100.0000,100.9091100.9091100.9091100.9091100.9091100.9091100.9091100.9091,1000.00001000.00001000.00001000.00001000.00001000.00001000.00001000.0000,1000.90911000.90911000.90911000.90911000.90911000.90911000.90911000.9091,10000.000010000.000010000.000010000.000010000.000010000.000010000.000010000.0000,10000.909110000.909110000.909110000.909110000.909110000.909110000.909110000.9091,100000.0000100000.0000100000.0000100000.0000100000.0000100000.0000100000.0000100000.0000,100000.9091100000.9091100000.9091100000.9091100000.9091100000.9091100000.9091100000.9091,100001.8182100001.8182100001.8182100001.8182100001.8182100001.8182100001.8182100001.8182,100002.7273100002.7273100002.7273100002.7273100002.7273100002.7273100002.7273100002.7273,100003.6364100003.
Warnings:
Warning 1260 Row 15 was cut by GROUP_CONCAT()
set max_session_mem_used=default;
set session group_concat_max_len=default;
SET group_concat_max_len= 8;
CREATE TABLE t1 (a INT);
INSERT t1 VALUES (1),(2);
CREATE TABLE t2 (b DATE, c INT);
INSERT t2 VALUES ('2019-12-04',1),('2020-03-28',2);
CREATE TABLE t3 (d INT);
INSERT t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14);
CREATE TABLE t4 (e INT);
INSERT t4 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15);
SELECT (SELECT MAX(a) FROM t1 WHERE t2_sq.c > 0) AS f,
GROUP_CONCAT(t2_sq.b ORDER BY 1) AS gc
FROM (SELECT t2_a.* FROM t2 AS t2_a, t2 AS t2_b) AS t2_sq, t3, t4
GROUP BY f;
f gc
2 2019-12-
Warnings:
Warning 1260 Row 1 was cut by GROUP_CONCAT()
DROP TABLE t1, t2, t3, t4;
SET group_concat_max_len= default;
# #
# Start of 10.2 tests # Start of 10.2 tests
# #

View File

@ -1,9 +1,7 @@
# #
# simple test of group_concat function # simple test of group_concat function
# #
--disable_warnings source include/have_sequence.inc;
drop table if exists t1, t2;
--enable_warnings
create table t1 (grp int, a bigint unsigned, c char(10) not null, d char(10) not null); create table t1 (grp int, a bigint unsigned, c char(10) not null, d char(10) not null);
insert into t1 values (1,1,"a","a"); insert into t1 values (1,1,"a","a");
@ -874,6 +872,35 @@ SELECT LENGTH(GROUP_CONCAT(f1 ORDER BY f2)) FROM t1 GROUP BY f2;
DROP TABLE t1; DROP TABLE t1;
SET group_concat_max_len= DEFAULT; SET group_concat_max_len= DEFAULT;
#
# MDEV-9531 GROUP_CONCAT with ORDER BY inside takes a lot of memory while it's executed
#
set session group_concat_max_len=1024;
set max_session_mem_used=16*1024*1024; # 8M..32M
SELECT GROUP_CONCAT(concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1), concat(seq/1.1) ORDER BY 2,1,3,4,6,5,8,7) AS c
FROM seq_1_to_200000;
set max_session_mem_used=default;
set session group_concat_max_len=default;
#
# MDEV-19350 Server crashes in delete_tree_element / ... / Item_func_group_concat::repack_tree
#
SET group_concat_max_len= 8;
CREATE TABLE t1 (a INT);
INSERT t1 VALUES (1),(2);
CREATE TABLE t2 (b DATE, c INT);
INSERT t2 VALUES ('2019-12-04',1),('2020-03-28',2);
CREATE TABLE t3 (d INT);
INSERT t3 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14);
CREATE TABLE t4 (e INT);
INSERT t4 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15);
SELECT (SELECT MAX(a) FROM t1 WHERE t2_sq.c > 0) AS f,
GROUP_CONCAT(t2_sq.b ORDER BY 1) AS gc
FROM (SELECT t2_a.* FROM t2 AS t2_a, t2 AS t2_b) AS t2_sq, t3, t4
GROUP BY f;
DROP TABLE t1, t2, t3, t4;
SET group_concat_max_len= default;
--echo # --echo #
--echo # Start of 10.2 tests --echo # Start of 10.2 tests

View File

@ -3448,6 +3448,36 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-11015 Assertion failed: precision > 0 in decimal_bin_size upon SELECT with DISTINCT, CAST and other functions
#
CREATE TABLE t1 (b LONGBLOB);
INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATETIME ) ) AS f FROM t1;
f
NULL
Warnings:
Warning 1292 Incorrect datetime value: 'foo'
Warning 1292 Incorrect datetime value: 'bar'
DROP TABLE t1;
CREATE TABLE t1 (b LONGBLOB);
INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
SELECT DISTINCT - GREATEST( b, CAST( NULL AS TIME) ) AS f FROM t1;
f
NULL
Warnings:
Warning 1292 Truncated incorrect time value: 'foo'
Warning 1292 Truncated incorrect time value: 'bar'
DROP TABLE t1;
CREATE TABLE t1 (b LONGBLOB);
INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATE) ) AS f FROM t1;
f
NULL
Warnings:
Warning 1292 Incorrect datetime value: 'foo'
Warning 1292 Incorrect datetime value: 'bar'
DROP TABLE t1;
#
# End of 10.1 tests # End of 10.1 tests
# #
# #

View File

@ -458,6 +458,26 @@ EXECUTE stmt USING @a,@a;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-11015 Assertion failed: precision > 0 in decimal_bin_size upon SELECT with DISTINCT, CAST and other functions
--echo #
CREATE TABLE t1 (b LONGBLOB);
INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATETIME ) ) AS f FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (b LONGBLOB);
INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
SELECT DISTINCT - GREATEST( b, CAST( NULL AS TIME) ) AS f FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (b LONGBLOB);
INSERT IGNORE INTO t1 VALUES ('foo'),('bar');
SELECT DISTINCT - GREATEST( b, CAST( NULL AS DATE) ) AS f FROM t1;
DROP TABLE t1;
--echo # --echo #
--echo # End of 10.1 tests --echo # End of 10.1 tests
--echo # --echo #

View File

@ -4972,6 +4972,44 @@ YQ== 61
Yq== 62 Yq== 62
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-18738 ASAN heap-use-after-free in copy_if_not_alloced / copy_fields
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT REPLACE( CAST( CURDATE() AS BINARY ), CURDATE(), REPEAT('a',32) ) AS f FROM t1 GROUP BY f;
f
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT REPLACE( LEFT( CURDATE(), 4), LEFT(CURDATE(),4), REPEAT('a',32) ) AS f FROM t1 GROUP BY f;
f
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT REPLACE(RIGHT(CURDATE(), 4), RIGHT(CURDATE(),4), REPEAT('a',32)) AS f FROM t1 GROUP BY f;
f
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT REPLACE(SUBSTR(CURDATE(),2,3), SUBSTR(CURDATE(),2,3), REPEAT('a',32)) AS f FROM t1 GROUP BY f;
f
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DROP TABLE t1;
#
# MDEV-19359 ASAN heap-use-after-free in copy_if_not_alloced / make_sortkey
#
CREATE TABLE t1 (a INT, b TIME, c TIME);
INSERT INTO t1 VALUES (NULL,'22:56:45','22:56:45'),(4,'12:51:42','12:51:42');
SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP;
f
NULL
12:51:12:51:422
NULL
DROP TABLE t1;
#
# End of 10.1 tests # End of 10.1 tests
# #
# #

View File

@ -1945,6 +1945,42 @@ SELECT f1,HEX(f2) FROM t1 WHERE f1='YQ==' AND (f2= from_base64(
SELECT f1,HEX(f2) FROM t1 WHERE f1='YQ==' AND (f2= from_base64("Yq==") OR f2= from_base64("YQ==")); SELECT f1,HEX(f2) FROM t1 WHERE f1='YQ==' AND (f2= from_base64("Yq==") OR f2= from_base64("YQ=="));
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-18738 ASAN heap-use-after-free in copy_if_not_alloced / copy_fields
--echo #
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT REPLACE( CAST( CURDATE() AS BINARY ), CURDATE(), REPEAT('a',32) ) AS f FROM t1 GROUP BY f;
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT REPLACE( LEFT( CURDATE(), 4), LEFT(CURDATE(),4), REPEAT('a',32) ) AS f FROM t1 GROUP BY f;
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT REPLACE(RIGHT(CURDATE(), 4), RIGHT(CURDATE(),4), REPEAT('a',32)) AS f FROM t1 GROUP BY f;
DROP TABLE t1;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT REPLACE(SUBSTR(CURDATE(),2,3), SUBSTR(CURDATE(),2,3), REPEAT('a',32)) AS f FROM t1 GROUP BY f;
DROP TABLE t1;
--echo #
--echo # MDEV-19359 ASAN heap-use-after-free in copy_if_not_alloced / make_sortkey
--echo #
CREATE TABLE t1 (a INT, b TIME, c TIME);
INSERT INTO t1 VALUES (NULL,'22:56:45','22:56:45'),(4,'12:51:42','12:51:42');
SELECT REPLACE( BINARY c, a, b ) f FROM t1 GROUP BY f WITH ROLLUP;
DROP TABLE t1;
--echo # --echo #
--echo # End of 10.1 tests --echo # End of 10.1 tests
--echo # --echo #

View File

@ -1865,6 +1865,20 @@ t2 CREATE TABLE `t2` (
`w2` int(1) DEFAULT NULL `w2` int(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2; DROP TABLE t1,t2;
CREATE TABLE t1 (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
point_data POINT NOT NULL,
PRIMARY KEY (id),
KEY idx_point_data(point_data)
) ENGINE=MyISAM;
INSERT t1 (point_data) VALUES
(GeomFromText('Point(37.0248492 23.8512726)')),
(GeomFromText('Point(38.0248492 23.8512726)'));
SELECT id FROM t1
WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
id
2
DROP TABLE t1;
# #
# Start of 10.2 tests # Start of 10.2 tests
# #
@ -2234,8 +2248,20 @@ SELECT c FROM t1;
c c
1 1
DROP TABLE t1; DROP TABLE t1;
create table t1 (p point default "qwer");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
create table t1 (p point default 0);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
create table t1 (p point not null default st_geometryfromtext('point 0)'));
ERROR 42000: Invalid default value for 'p'
create table t1 (p point not null default st_geometryfromtext('point(0 0)'));
insert into t1 values(default);
select st_astext(p) from t1;
st_astext(p)
POINT(0 0)
drop table t1;
# #
# Start of 10.3 tests # End of 10.2 tests
# #
# #
# MDEV-11478 Result data type aggregation for pluggable data types # MDEV-11478 Result data type aggregation for pluggable data types

View File

@ -1572,6 +1572,25 @@ CREATE TABLE t2 AS SELECT WITHIN(g1,g1) as w1,WITHIN(g2,g2) AS w2 FROM t1;
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
DROP TABLE t1,t2; DROP TABLE t1,t2;
#
# MDEV-3934 Assertion `((keypart_map+1) & keypart_map) == 0' failed in _mi_pack_key with an index on a POINT column
#
CREATE TABLE t1 (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
point_data POINT NOT NULL,
PRIMARY KEY (id),
KEY idx_point_data(point_data)
) ENGINE=MyISAM;
INSERT t1 (point_data) VALUES
(GeomFromText('Point(37.0248492 23.8512726)')),
(GeomFromText('Point(38.0248492 23.8512726)'));
SELECT id FROM t1
WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
DROP TABLE t1;
--echo # --echo #
--echo # Start of 10.2 tests --echo # Start of 10.2 tests
--echo # --echo #
@ -1762,8 +1781,22 @@ INSERT INTO t1 (a,b) VALUES (Point(1,1),Point(1,1));
SELECT c FROM t1; SELECT c FROM t1;
DROP TABLE t1; DROP TABLE t1;
#
# MDEV-13923 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon altering table with geometry field
#
--error ER_CANT_CREATE_GEOMETRY_OBJECT
create table t1 (p point default "qwer");
--error ER_CANT_CREATE_GEOMETRY_OBJECT
create table t1 (p point default 0);
--error ER_INVALID_DEFAULT
create table t1 (p point not null default st_geometryfromtext('point 0)'));
create table t1 (p point not null default st_geometryfromtext('point(0 0)'));
insert into t1 values(default);
select st_astext(p) from t1;
drop table t1;
--echo # --echo #
--echo # Start of 10.3 tests --echo # End of 10.2 tests
--echo # --echo #
--echo # --echo #

View File

@ -1,38 +0,0 @@
CREATE TABLE t1 (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
point_data POINT NOT NULL,
PRIMARY KEY (id),
KEY idx_point_data(point_data)
) ENGINE=MyISAM;
INSERT t1 (point_data) VALUES
(GeomFromText('Point(37.0248492 23.8512726)')),
(GeomFromText('Point(38.0248492 23.8512726)'));
SELECT id FROM t1
WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
id
2
DROP TABLE t1;
create table t1 (p point default "qwer");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
create table t1 (p point default 0);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
create table t1 (p point not null default st_geometryfromtext('point 0)'));
ERROR 42000: Invalid default value for 'p'
create table t1 (p point not null default st_geometryfromtext('point(0 0)'));
insert into t1 values(default);
select st_astext(p) from t1;
st_astext(p)
POINT(0 0)
drop table t1;
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
set timestamp=10;
insert into t1 values(default);
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`t1`.`p` at row 1
drop table t1;
SET timestamp=default;
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
set timestamp=10;
alter table t1 add column i int;
ERROR 22007: Incorrect POINT value: 'GEOMETRYCOLLECTION' for column `test`.`t1`.`p` at row 1
drop table t1;
SET timestamp=default;

View File

@ -1,45 +0,0 @@
#
# MDEV-3934 Assertion `((keypart_map+1) & keypart_map) == 0' failed in _mi_pack_key with an index on a POINT column
#
CREATE TABLE t1 (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
point_data POINT NOT NULL,
PRIMARY KEY (id),
KEY idx_point_data(point_data)
) ENGINE=MyISAM;
INSERT t1 (point_data) VALUES
(GeomFromText('Point(37.0248492 23.8512726)')),
(GeomFromText('Point(38.0248492 23.8512726)'));
SELECT id FROM t1
WHERE ST_Contains(point_data, GeomFromText('Point(38.0248492 23.8512726)'));
DROP TABLE t1;
#
# MDEV-13923 Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed upon altering table with geometry field
#
--error ER_CANT_CREATE_GEOMETRY_OBJECT
create table t1 (p point default "qwer");
--error ER_CANT_CREATE_GEOMETRY_OBJECT
create table t1 (p point default 0);
--error ER_INVALID_DEFAULT
create table t1 (p point not null default st_geometryfromtext('point 0)'));
create table t1 (p point not null default st_geometryfromtext('point(0 0)'));
insert into t1 values(default);
select st_astext(p) from t1;
drop table t1;
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
set timestamp=10;
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
insert into t1 values(default);
drop table t1;
SET timestamp=default;
create table t1 (p point not null default if(unix_timestamp()>10,POINT(1,1),LineString(Point(0,0),Point(1,1))));
set timestamp=10;
--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
alter table t1 add column i int;
drop table t1;
SET timestamp=default;

View File

@ -0,0 +1,45 @@
show create procedure mysql.AddGeometryColumn;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
AddGeometryColumn CREATE DEFINER=`root`@`localhost` PROCEDURE `AddGeometryColumn`(catalog varchar(64), t_schema varchar(64),
t_name varchar(64), geometry_column varchar(64), t_srid int)
SQL SECURITY INVOKER
begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end latin1 latin1_swedish_ci latin1_swedish_ci
show create procedure mysql.DropGeometryColumn;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
DropGeometryColumn CREATE DEFINER=`root`@`localhost` PROCEDURE `DropGeometryColumn`(catalog varchar(64), t_schema varchar(64),
t_name varchar(64), geometry_column varchar(64))
SQL SECURITY INVOKER
begin
set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end latin1 latin1_swedish_ci latin1_swedish_ci
create table t1 (a int, b int);
call mysql.AddGeometryColumn('', 'test', 't1', 'c', 10);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL,
`c` geometry DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
call mysql.DropGeometryColumn('', 'test', 't1', 'c');
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
call mysql.DropGeometryColumn('', 'test', 't1', 'b');
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create user foo@localhost;
grant execute on mysql.* to foo@localhost;
connect foo, localhost, foo;
call mysql.AddGeometryColumn('', 'mysql', 'proc', 'c', 10);
ERROR 42000: ALTER command denied to user 'foo'@'localhost' for table 'proc'
disconnect foo;
connection default;
drop user foo@localhost;

View File

@ -0,0 +1,24 @@
source include/not_embedded.inc;
#
# MDEV-60 Support for Spatial Reference systems for the GIS data.
#
show create procedure mysql.AddGeometryColumn;
show create procedure mysql.DropGeometryColumn;
create table t1 (a int, b int);
call mysql.AddGeometryColumn('', 'test', 't1', 'c', 10);
show create table t1;
call mysql.DropGeometryColumn('', 'test', 't1', 'c');
show create table t1;
call mysql.DropGeometryColumn('', 'test', 't1', 'b');
show create table t1;
drop table t1;
create user foo@localhost;
grant execute on mysql.* to foo@localhost;
connect (foo, localhost, foo);
--error ER_TABLEACCESS_DENIED_ERROR
call mysql.AddGeometryColumn('', 'mysql', 'proc', 'c', 10);
disconnect foo;
connection default;
drop user foo@localhost;

View File

@ -129,6 +129,26 @@ connection default;
disconnect con1; disconnect con1;
drop database mysqltest_db1; drop database mysqltest_db1;
drop user mysqltest_u1@localhost; drop user mysqltest_u1@localhost;
call mtr.add_suppression("Table 'mysql.user' doesn't exist");
call mtr.add_suppression("'mysql.user' is not of type 'TABLE'");
rename table mysql.user to mysql.user1;
create view mysql.user as select * from mysql.user1;
flush privileges;
ERROR HY000: 'mysql.user' is not of type 'TABLE'
drop view mysql.user;
create temporary table mysql.user select * from mysql.user1 limit 0;
flush privileges;
ERROR 42S02: Table 'mysql.user' doesn't exist
drop temporary table mysql.user;
rename table mysql.user1 to mysql.user;
call mtr.add_suppression('mysql.user table is damaged');
rename table mysql.user to mysql.user1;
create table mysql.user (Host char(100), User char(100));
flush privileges;
ERROR HY000: Unknown error
drop table mysql.user;
rename table mysql.user1 to mysql.user;
End of 5.5 tests
# #
# Additional coverage for refactoring which is made as part # Additional coverage for refactoring which is made as part
# of fix for bug #27480 "Extend CREATE TEMPORARY TABLES privilege # of fix for bug #27480 "Extend CREATE TEMPORARY TABLES privilege
@ -224,3 +244,4 @@ ERROR HY000: Password hash should be a 16-digit hexadecimal number
create user foo4 identified via mysql_old_password using '11111111111111111111111111111111111111111'; create user foo4 identified via mysql_old_password using '11111111111111111111111111111111111111111';
ERROR HY000: Password hash should be a 16-digit hexadecimal number ERROR HY000: Password hash should be a 16-digit hexadecimal number
set GLOBAL sql_mode=default; set GLOBAL sql_mode=default;
End of 10.1 tests

View File

@ -145,6 +145,34 @@ disconnect con1;
drop database mysqltest_db1; drop database mysqltest_db1;
drop user mysqltest_u1@localhost; drop user mysqltest_u1@localhost;
#
# MDEV-18241 Downgrade from 10.4 to 10.3 crashes
#
call mtr.add_suppression("Table 'mysql.user' doesn't exist");
call mtr.add_suppression("'mysql.user' is not of type 'TABLE'");
rename table mysql.user to mysql.user1;
create view mysql.user as select * from mysql.user1;
--error ER_WRONG_OBJECT
flush privileges;
drop view mysql.user;
create temporary table mysql.user select * from mysql.user1 limit 0;
--error ER_NO_SUCH_TABLE
flush privileges;
drop temporary table mysql.user;
rename table mysql.user1 to mysql.user;
#
# Bug#28986737: RENAMING AND REPLACING MYSQL.USER TABLE CAN LEAD TO A SERVER CRASH
#
call mtr.add_suppression('mysql.user table is damaged');
rename table mysql.user to mysql.user1;
create table mysql.user (Host char(100), User char(100));
--error ER_UNKNOWN_ERROR
flush privileges;
drop table mysql.user;
rename table mysql.user1 to mysql.user;
--echo End of 5.5 tests
--echo # --echo #
--echo # Additional coverage for refactoring which is made as part --echo # Additional coverage for refactoring which is made as part
@ -233,5 +261,6 @@ create user foo3 identified via mysql_old_password using '00';
--error ER_PASSWD_LENGTH --error ER_PASSWD_LENGTH
create user foo4 identified via mysql_old_password using '11111111111111111111111111111111111111111'; create user foo4 identified via mysql_old_password using '11111111111111111111111111111111111111111';
set GLOBAL sql_mode=default; set GLOBAL sql_mode=default;
--echo End of 10.1 tests

View File

@ -0,0 +1,4 @@
PREPARE stmt2 FROM "CREATE VIEW v AS SELECT * FROM INFORMATION_SCHEMA.TABLES";
FLUSH PRIVILEGES;
EXECUTE stmt2;
DROP VIEW v;

View File

@ -0,0 +1,7 @@
#
# MDEV-15907 ASAN heap-use-after-free in strnmov / .. / fill_effective_table_privileges on concurrent GRANT and CREATE VIEW
#
PREPARE stmt2 FROM "CREATE VIEW v AS SELECT * FROM INFORMATION_SCHEMA.TABLES";
FLUSH PRIVILEGES;
EXECUTE stmt2;
DROP VIEW v;

View File

@ -729,7 +729,11 @@ disconnect con2;
# Bug#51391 Deadlock involving events during rqg_info_schema test # Bug#51391 Deadlock involving events during rqg_info_schema test
# #
CREATE EVENT e1 ON SCHEDULE EVERY 5 HOUR DO SELECT 1; CREATE EVENT e1 ON SCHEDULE EVERY 5 HOUR DO SELECT 1;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e2 ON SCHEDULE EVERY 5 HOUR DO SELECT 2; CREATE EVENT e2 ON SCHEDULE EVERY 5 HOUR DO SELECT 2;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
connect con1, localhost, root; connect con1, localhost, root;
SET DEBUG_SYNC="before_lock_tables_takes_lock SIGNAL drop WAIT_FOR query"; SET DEBUG_SYNC="before_lock_tables_takes_lock SIGNAL drop WAIT_FOR query";
# Sending: # Sending:

View File

@ -0,0 +1,11 @@
CREATE DATABASE db1;
CREATE USER u@localhost IDENTIFIED BY 'pw';
set global log_warnings=2;
connect(localhost,u,pw,db1,MASTER_PORT,MASTER_SOCKET);
connect con1,localhost,u,pw,db1;
ERROR 42000: Access denied for user 'u'@'localhost' to database 'db1'
connection default;
FOUND 1 /Access denied for user 'u'@'localhost' to database 'db1'/ in mysqld.1.err
set global log_warnings=@@log_warnings;
DROP DATABASE db1;
DROP USER u@localhost;

View File

@ -0,0 +1,17 @@
source include/not_embedded.inc;
CREATE DATABASE db1;
CREATE USER u@localhost IDENTIFIED BY 'pw';
set global log_warnings=2;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
--error ER_DBACCESS_DENIED_ERROR
--connect(con1,localhost,u,pw,db1)
--connection default
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_RANGE= -50;
let SEARCH_PATTERN=Access denied for user 'u'@'localhost' to database 'db1';
source include/search_pattern_in_file.inc;
set global log_warnings=@@log_warnings;
DROP DATABASE db1;
DROP USER u@localhost;

View File

@ -940,6 +940,29 @@ execute stmt1;
deallocate prepare stmt1; deallocate prepare stmt1;
drop view v3,v2,v1; drop view v3,v2,v1;
drop table t1,t2,t3; drop table t1,t2,t3;
create table t1 (id int not null, v1 varchar(10) not null);
insert into t1 values (1,1),(2,2);
create table t2 (log varchar(10) not null);
create trigger t1_after_update after update on t1
for each row insert into t2 values ('triggered');
create user foo;
grant select, insert, update, delete, create, drop, reload, index, alter, show databases, create temporary tables, lock tables, execute, create view, show view, create routine, alter routine, trigger on *.* to 'foo'@'%';
set global read_only=1;
connect a, localhost, foo;
create temporary table temp_t1 (id int not null, update_me varchar(10));
insert into temp_t1 values (1,1),(2,2),(3,3);
update temp_t1 left join t1 on temp_t1.id = t1.id set temp_t1.update_me = 'hello';
connection default;
set global read_only = 0;
create table t3 (id int not null);
insert t3 values (2);
update t1 left join t3 on t1.id = t3.id set t1.v1 = 'hello';
select * from t2;
log
triggered
triggered
drop table t1,t2, t3;
drop user foo;
end of 5.5 tests end of 5.5 tests
create table t1 (c1 int, c3 int); create table t1 (c1 int, c3 int);
insert t1(c3) values (1), (2), (3), (4), (5), (6), (7), (8); insert t1(c3) values (1), (2), (3), (4), (5), (6), (7), (8);

View File

@ -899,6 +899,37 @@ deallocate prepare stmt1;
drop view v3,v2,v1; drop view v3,v2,v1;
drop table t1,t2,t3; drop table t1,t2,t3;
#
# MDEV-18507 can't update temporary table when joined with table with triggers on read-only
#
create table t1 (id int not null, v1 varchar(10) not null);
insert into t1 values (1,1),(2,2);
create table t2 (log varchar(10) not null);
create trigger t1_after_update after update on t1
for each row insert into t2 values ('triggered');
create user foo;
grant select, insert, update, delete, create, drop, reload, index, alter, show databases, create temporary tables, lock tables, execute, create view, show view, create routine, alter routine, trigger on *.* to 'foo'@'%';
set global read_only=1;
connect a, localhost, foo;
create temporary table temp_t1 (id int not null, update_me varchar(10));
insert into temp_t1 values (1,1),(2,2),(3,3);
update temp_t1 left join t1 on temp_t1.id = t1.id set temp_t1.update_me = 'hello';
connection default;
set global read_only = 0;
create table t3 (id int not null);
insert t3 values (2);
update t1 left join t3 on t1.id = t3.id set t1.v1 = 'hello';
select * from t2;
drop table t1,t2, t3;
drop user foo;
--echo end of 5.5 tests --echo end of 5.5 tests
# #

View File

@ -2,3 +2,7 @@ CREATE DATABASE mysqldump_30126;
USE mysqldump_30126; USE mysqldump_30126;
CREATE TABLE t1 (c1 int); CREATE TABLE t1 (c1 int);
DROP DATABASE mysqldump_30126; DROP DATABASE mysqldump_30126;
use test;
create table t1 (a int);
create trigger tr after insert on t1 for each row set @a=1;
drop table t1;

View File

@ -15,3 +15,16 @@ CREATE TABLE t1 (c1 int);
DROP DATABASE mysqldump_30126; DROP DATABASE mysqldump_30126;
--remove_file $file --remove_file $file
use test;
#
# MDEV-19182 mysqldump not always handling SHOW CREATE TRIGGER failures correctly
#
create table t1 (a int);
create trigger tr after insert on t1 for each row set @a=1;
let $datadir=`select @@datadir`;
move_file $datadir/test/tr.TRN $datadir/test/tr-1.TRN;
error 2;
exec $MYSQL_DUMP test t1 >/dev/null;
move_file $datadir/test/tr-1.TRN $datadir/test/tr.TRN;
drop table t1;

View File

@ -4318,6 +4318,8 @@ create database first;
use first; use first;
set time_zone = 'UTC'; set time_zone = 'UTC';
create event ee1 on schedule at '2035-12-31 20:01:23' do set @a=5; create event ee1 on schedule at '2035-12-31 20:01:23' do set @a=5;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
show events; show events;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
first ee1 root@localhost UTC ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci first ee1 root@localhost UTC ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@ -4334,7 +4336,11 @@ show create event ee1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
ee1 UTC CREATE DEFINER=`root`@`localhost` EVENT `ee1` ON SCHEDULE AT '2035-12-31 20:01:23' ON COMPLETION NOT PRESERVE ENABLE DO set @a=5 latin1 latin1_swedish_ci latin1_swedish_ci ee1 UTC CREATE DEFINER=`root`@`localhost` EVENT `ee1` ON SCHEDULE AT '2035-12-31 20:01:23' ON COMPLETION NOT PRESERVE ENABLE DO set @a=5 latin1 latin1_swedish_ci latin1_swedish_ci
create event ee2 on schedule at '2030-12-31 21:01:22' do set @a=5; create event ee2 on schedule at '2030-12-31 21:01:22' do set @a=5;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
create event ee3 on schedule at '2030-12-31 22:01:23' do set @a=5; create event ee3 on schedule at '2030-12-31 22:01:23' do set @a=5;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
show events; show events;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
second ee1 root@localhost UTC ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci second ee1 root@localhost UTC ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@ -4471,6 +4477,8 @@ DROP DATABASE mysqldump_test_db;
TRUNCATE mysql.event; TRUNCATE mysql.event;
USE test; USE test;
CREATE event e29938 ON SCHEDULE AT '2035-12-31 20:01:23' DO SET @bug29938=29938; CREATE event e29938 ON SCHEDULE AT '2035-12-31 20:01:23' DO SET @bug29938=29938;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS; SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test e29938 root@localhost SYSTEM ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci test e29938 root@localhost SYSTEM ONE TIME 2035-12-31 20:01:23 NULL NULL NULL NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci
@ -4565,6 +4573,8 @@ CREATE TABLE t1 (f1 INT);
CREATE TRIGGER tr1 BEFORE UPDATE ON t1 FOR EACH ROW SET @f1 = 1; CREATE TRIGGER tr1 BEFORE UPDATE ON t1 FOR EACH ROW SET @f1 = 1;
CREATE PROCEDURE pr1 () SELECT "Meow"; CREATE PROCEDURE pr1 () SELECT "Meow";
CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT "Meow"; CREATE EVENT ev1 ON SCHEDULE AT '2030-01-01 00:00:00' DO SELECT "Meow";
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW TRIGGERS; SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
@ -4755,7 +4765,11 @@ SELECT COUNT(*) INTO param1 FROM t2;
END// END//
# Events. # Events.
CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE BUG52792; CREATE EVENT e1 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE BUG52792;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
CREATE EVENT e2 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE BUG52792; CREATE EVENT e2 ON SCHEDULE EVERY 1 SECOND DO DROP DATABASE BUG52792;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
# Functions. # Functions.
CREATE FUNCTION `hello1` (s CHAR(20)) CREATE FUNCTION `hello1` (s CHAR(20))
RETURNS CHAR(50) DETERMINISTIC RETURNS CHAR(50) DETERMINISTIC
@ -5360,6 +5374,8 @@ one` BEFORE INSERT ON `tab
one` FOR EACH ROW SET NEW.a = 1; one` FOR EACH ROW SET NEW.a = 1;
CREATE EVENT `event CREATE EVENT `event
one` ON SCHEDULE AT '2030-01-01 00:00:00' DO SET @a=5; one` ON SCHEDULE AT '2030-01-01 00:00:00' DO SET @a=5;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW TABLES FROM bug25717383; SHOW TABLES FROM bug25717383;
Tables_in_bug25717383 Tables_in_bug25717383
tab tab

View File

@ -928,6 +928,48 @@ DROP view v;
DROP TABLE t; DROP TABLE t;
set sql_mode= @save_sql_mode; set sql_mode= @save_sql_mode;
# #
# Bug#28573894 ALTER PARTITIONED TABLE ADD AUTO_INCREMENT DIFF RESULT
#
CREATE TABLE t (a VARCHAR(10) NOT NULL,b INT,PRIMARY KEY (b)) ENGINE=INNODB
PARTITION BY RANGE (b)
(PARTITION pa VALUES LESS THAN (2),
PARTITION pb VALUES LESS THAN (20),
PARTITION pc VALUES LESS THAN (30),
PARTITION pd VALUES LESS THAN (40));
INSERT INTO t
VALUES('A',0),('B',1),('C',2),('D',3),('E',4),('F',5),('G',25),('H',35);
CREATE TABLE t_copy LIKE t;
INSERT INTO t_copy SELECT * FROM t;
ALTER TABLE t ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
ADD UNIQUE KEY (r,b);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
ALTER TABLE t_copy ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
ADD UNIQUE KEY (r,b), ALGORITHM=COPY;
affected rows: 8
info: Records: 8 Duplicates: 0 Warnings: 0
SELECT * FROM t;
a b r
A 0 1
B 1 2
C 2 3
D 3 4
E 4 5
F 5 6
G 25 7
H 35 8
SELECT * FROM t_copy;
a b r
A 0 1
B 1 2
C 2 3
D 3 4
E 4 5
F 5 6
G 25 7
H 35 8
DROP TABLE t,t_copy;
#
# Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE # Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE
# MYSQL.INNODB_TABLE_STATS # MYSQL.INNODB_TABLE_STATS
# #

View File

@ -1020,6 +1020,31 @@ DROP view v;
DROP TABLE t; DROP TABLE t;
set sql_mode= @save_sql_mode; set sql_mode= @save_sql_mode;
--echo #
--echo # Bug#28573894 ALTER PARTITIONED TABLE ADD AUTO_INCREMENT DIFF RESULT
--echo #
CREATE TABLE t (a VARCHAR(10) NOT NULL,b INT,PRIMARY KEY (b)) ENGINE=INNODB
PARTITION BY RANGE (b)
(PARTITION pa VALUES LESS THAN (2),
PARTITION pb VALUES LESS THAN (20),
PARTITION pc VALUES LESS THAN (30),
PARTITION pd VALUES LESS THAN (40));
INSERT INTO t
VALUES('A',0),('B',1),('C',2),('D',3),('E',4),('F',5),('G',25),('H',35);
CREATE TABLE t_copy LIKE t;
INSERT INTO t_copy SELECT * FROM t;
--enable_info
ALTER TABLE t ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
ADD UNIQUE KEY (r,b);
ALTER TABLE t_copy ADD COLUMN r INT UNSIGNED NOT NULL AUTO_INCREMENT,
ADD UNIQUE KEY (r,b), ALGORITHM=COPY;
--disable_info
SELECT * FROM t;
SELECT * FROM t_copy;
DROP TABLE t,t_copy;
--echo # --echo #
--echo # Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE --echo # Bug#26390658 RENAMING A PARTITIONED TABLE DOES NOT UPDATE
--echo # MYSQL.INNODB_TABLE_STATS --echo # MYSQL.INNODB_TABLE_STATS

View File

@ -2714,9 +2714,13 @@ create procedure proc_1() alter event xyz comment 'xyz';
call proc_1(); call proc_1();
drop event xyz; drop event xyz;
create event xyz on schedule every 5 minute disable do select 123; create event xyz on schedule every 5 minute disable do select 123;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
call proc_1(); call proc_1();
drop event xyz; drop event xyz;
create event xyz on schedule every 5 minute disable do select 123; create event xyz on schedule every 5 minute disable do select 123;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
call proc_1(); call proc_1();
drop event xyz; drop event xyz;
drop procedure proc_1; drop procedure proc_1;
@ -2731,6 +2735,8 @@ create event xyz on schedule every 5 minute disable do select 123;
create procedure proc_1() drop event xyz; create procedure proc_1() drop event xyz;
call proc_1(); call proc_1();
create event xyz on schedule every 5 minute disable do select 123; create event xyz on schedule every 5 minute disable do select 123;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
call proc_1(); call proc_1();
call proc_1(); call proc_1();
ERROR HY000: Unknown event 'xyz' ERROR HY000: Unknown event 'xyz'
@ -4407,6 +4413,23 @@ END;
1 1
1 1
# #
# MDEV-14572: Assertion `! is_set()' failed in
# Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
#
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
PREPARE stmt FROM 'EXPLAIN UPDATE t1, t2 SET a = 1';
EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found
1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found
EXECUTE stmt;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 0 Const row not found
1 SIMPLE t2 system NULL NULL NULL NULL 0 Const row not found
deallocate prepare stmt;
DROP TABLE t1, t2;
#
# End of 10.1 tests # End of 10.1 tests
# #
# #

View File

@ -3924,6 +3924,22 @@ END;
/ /
DELIMITER ;/ DELIMITER ;/
--echo #
--echo # MDEV-14572: Assertion `! is_set()' failed in
--echo # Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS
--echo #
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
#EXPLAIN UPDATE t1, t2 SET a = 1;
PREPARE stmt FROM 'EXPLAIN UPDATE t1, t2 SET a = 1';
EXECUTE stmt;
EXECUTE stmt;
deallocate prepare stmt;
# Cleanup
DROP TABLE t1, t2;
--echo # --echo #
--echo # End of 10.1 tests --echo # End of 10.1 tests

View File

@ -809,6 +809,8 @@ create event e1 on schedule every 1 year starts now()
ends date_add(now(), interval 5 hour) do ends date_add(now(), interval 5 hour) do
begin begin
end; end;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
flush status; flush status;
show databases; show databases;
show tables; show tables;
@ -1431,6 +1433,8 @@ CREATE TRIGGER t1_bi BEFORE INSERT ON t1
FOR EACH ROW FOR EACH ROW
SET NEW.c1 = 'ÔÅÓÔ'; SET NEW.c1 = 'ÔÅÓÔ';
CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 'ÔÅÓÔ' AS test; CREATE EVENT ev1 ON SCHEDULE AT '1970-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE DO SELECT 'ÔÅÓÔ' AS test;
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
set names utf8; set names utf8;
SHOW CREATE VIEW v1; SHOW CREATE VIEW v1;
View Create View character_set_client collation_connection View Create View character_set_client collation_connection

View File

@ -306,6 +306,8 @@ USE test;
SET @@SQL_MODE = ''; SET @@SQL_MODE = '';
CREATE EVENT teste_bug11763507 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR CREATE EVENT teste_bug11763507 ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO SELECT 1 $ DO SELECT 1 $
Warnings:
Warning 1105 Event scheduler is switched off, use SET GLOBAL event_scheduler=ON to enable it.
SHOW EVENTS LIKE 'teste_bug11763507'; SHOW EVENTS LIKE 'teste_bug11763507';
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
test teste_bug11763507 root@localhost SYSTEM ONE TIME # # # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci test teste_bug11763507 root@localhost SYSTEM ONE TIME # # # # NULL ENABLED 1 latin1 latin1_swedish_ci latin1_swedish_ci

View File

@ -0,0 +1,3 @@
--loose-enable-ssl
--loose-ssl-cert=$MYSQL_TEST_DIR/std_data/serversan-cert.pem
--loose-ssl-key=$MYSQL_TEST_DIR/std_data/serversan-key.pem

View File

@ -0,0 +1,4 @@
1
1
1
1

View File

@ -0,0 +1,3 @@
source include/have_ssl_crypto_functs.inc;
--exec $MYSQL --protocol=tcp --host=127.0.0.1 --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl --ssl-verify-server-cert -e "select 1"
--exec $MYSQL --protocol=tcp --host=localhost --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl --ssl-verify-server-cert -e "select 1"

View File

@ -692,6 +692,24 @@ USE test;
delete from mysql.table_stats; delete from mysql.table_stats;
delete from mysql.column_stats; delete from mysql.column_stats;
delete from mysql.index_stats; delete from mysql.index_stats;
#
# MDEV-19352: Server crash in alloc_histograms_for_table_share upon query from information schema
#
use test;
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @@optimizer_use_condition_selectivity= 4;
set use_stat_tables='preferably';
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
CREATE VIEW v AS SELECT * FROM t1 JOIN t2;
INSERT INTO t2 SELECT * FROM x;
ERROR 42S02: Table 'test.x' doesn't exist
select * from information_schema.tables where table_name='v';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
def test v VIEW NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL VIEW NULL NULL
drop table t1,t2;
drop view v;
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set @save_optimizer_switch=@@optimizer_switch; set @save_optimizer_switch=@@optimizer_switch;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;
# #

View File

@ -453,6 +453,27 @@ delete from mysql.table_stats;
delete from mysql.column_stats; delete from mysql.column_stats;
delete from mysql.index_stats; delete from mysql.index_stats;
--echo #
--echo # MDEV-19352: Server crash in alloc_histograms_for_table_share upon query from information schema
--echo #
use test;
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @@optimizer_use_condition_selectivity= 4;
set use_stat_tables='preferably';
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
CREATE VIEW v AS SELECT * FROM t1 JOIN t2;
--error ER_NO_SUCH_TABLE
INSERT INTO t2 SELECT * FROM x;
select * from information_schema.tables where table_name='v';
drop table t1,t2;
drop view v;
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set @save_optimizer_switch=@@optimizer_switch; set @save_optimizer_switch=@@optimizer_switch;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;

View File

@ -719,6 +719,24 @@ USE test;
delete from mysql.table_stats; delete from mysql.table_stats;
delete from mysql.column_stats; delete from mysql.column_stats;
delete from mysql.index_stats; delete from mysql.index_stats;
#
# MDEV-19352: Server crash in alloc_histograms_for_table_share upon query from information schema
#
use test;
set @save_optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set @@optimizer_use_condition_selectivity= 4;
set use_stat_tables='preferably';
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
CREATE VIEW v AS SELECT * FROM t1 JOIN t2;
INSERT INTO t2 SELECT * FROM x;
ERROR 42S02: Table 'test.x' doesn't exist
select * from information_schema.tables where table_name='v';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE VERSION ROW_FORMAT TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE AUTO_INCREMENT CREATE_TIME UPDATE_TIME CHECK_TIME TABLE_COLLATION CHECKSUM CREATE_OPTIONS TABLE_COMMENT MAX_INDEX_LENGTH TEMPORARY
def test v VIEW NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL VIEW NULL NULL
drop table t1,t2;
drop view v;
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set @save_optimizer_switch=@@optimizer_switch; set @save_optimizer_switch=@@optimizer_switch;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;
# #

View File

@ -1735,6 +1735,20 @@ rename table t1 to t2, t3 to t4;
ERROR 42S02: Table 'test.t3' doesn't exist ERROR 42S02: Table 'test.t3' doesn't exist
drop table t1, mysql.table_stats; drop table t1, mysql.table_stats;
rename table test.table_stats to mysql.table_stats; rename table test.table_stats to mysql.table_stats;
#
# MDEV-19334: bool is_eits_usable(Field*): Assertion `field->table->stats_is_read' failed.
#
create temporary table t1(a int);
insert into t1 values (1),(2),(3);
set use_stat_tables=preferably;
set @optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set optimizer_use_condition_selectivity=4;
select * from t1 where a >= 2;
a
2
3
drop table t1;
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;
# #
# Start of 10.2 tests # Start of 10.2 tests

View File

@ -879,6 +879,21 @@ rename table t1 to t2, t3 to t4;
drop table t1, mysql.table_stats; drop table t1, mysql.table_stats;
rename table test.table_stats to mysql.table_stats; rename table test.table_stats to mysql.table_stats;
--echo #
--echo # MDEV-19334: bool is_eits_usable(Field*): Assertion `field->table->stats_is_read' failed.
--echo #
create temporary table t1(a int);
insert into t1 values (1),(2),(3);
set use_stat_tables=preferably;
set @optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity;
set optimizer_use_condition_selectivity=4;
select * from t1 where a >= 2;
drop table t1;
set @@optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;
--echo # --echo #

View File

@ -15,10 +15,10 @@ BEGIN
SELECT 1; SELECT 1;
END $$ END $$
DROP TABLE IF EXISTS t1,t2; DROP TABLE IF EXISTS t1,t2;
CREATE TABLE t1 (c1 INT);
CREATE TABLE t2 (c1 INT);
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
DO INSERT INTO t1 VALUES(1); DO INSERT INTO t1 VALUES(1);
CREATE TABLE t1 (c1 INT);
CREATE TABLE t2 (c1 INT);
Assert Questions == 7 Assert Questions == 7
SHOW STATUS LIKE 'Questions'; SHOW STATUS LIKE 'Questions';
Variable_name Value Variable_name Value

View File

@ -20,11 +20,11 @@ END $$
DELIMITER ;$$ DELIMITER ;$$
--disable_warnings --disable_warnings
DROP TABLE IF EXISTS t1,t2; DROP TABLE IF EXISTS t1,t2;
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
DO INSERT INTO t1 VALUES(1);
--enable_warnings --enable_warnings
CREATE TABLE t1 (c1 INT); CREATE TABLE t1 (c1 INT);
CREATE TABLE t2 (c1 INT); CREATE TABLE t2 (c1 INT);
CREATE EVENT ev1 ON SCHEDULE EVERY 1 SECOND
DO INSERT INTO t1 VALUES(1);
--echo Assert Questions == 7 --echo Assert Questions == 7
SHOW STATUS LIKE 'Questions'; SHOW STATUS LIKE 'Questions';

View File

@ -332,3 +332,36 @@ NULL
# #
# End of 5.3 tests # End of 5.3 tests
# #
#
# Start of 10.1 tests
#
#
# MDEV-11895 NO_ZERO_DATE affects timestamp values without any warnings
#
SET sql_mode = '';
CREATE TABLE t1 (a TIMESTAMP NULL) ENGINE = MyISAM;
CREATE TABLE t2 (a TIMESTAMP NULL) ENGINE = MyISAM;
CREATE TABLE t3 (a TIMESTAMP NULL) ENGINE = MyISAM;
SET @@session.time_zone = 'UTC';
INSERT INTO t1 VALUES ('2011-10-29 23:00:00');
INSERT INTO t1 VALUES ('2011-10-29 23:00:01');
INSERT INTO t1 VALUES ('2011-10-29 23:59:59');
SET @@session.time_zone = 'Europe/Moscow';
SET sql_mode='NO_ZERO_DATE';
INSERT INTO t2 SELECT * FROM t1;
SET sql_mode='';
INSERT INTO t3 SELECT * FROM t1;
SELECT UNIX_TIMESTAMP(a), a FROM t2;
UNIX_TIMESTAMP(a) a
1319929200 2011-10-30 02:00:00
1319929201 2011-10-30 02:00:01
1319932799 2011-10-30 02:59:59
SELECT UNIX_TIMESTAMP(a), a FROM t3;
UNIX_TIMESTAMP(a) a
1319929200 2011-10-30 02:00:00
1319929201 2011-10-30 02:00:01
1319932799 2011-10-30 02:59:59
DROP TABLE t1, t2, t3;
#
# End of 10.1 tests
#

View File

@ -308,3 +308,34 @@ SELECT CONVERT_TZ('2001-10-08 00:00:00', MAKE_SET(0,'+01:00'), '+00:00' );
--echo # --echo #
--echo # End of 5.3 tests --echo # End of 5.3 tests
--echo # --echo #
--echo #
--echo # Start of 10.1 tests
--echo #
--echo #
--echo # MDEV-11895 NO_ZERO_DATE affects timestamp values without any warnings
--echo #
SET sql_mode = '';
CREATE TABLE t1 (a TIMESTAMP NULL) ENGINE = MyISAM;
CREATE TABLE t2 (a TIMESTAMP NULL) ENGINE = MyISAM;
CREATE TABLE t3 (a TIMESTAMP NULL) ENGINE = MyISAM;
SET @@session.time_zone = 'UTC';
INSERT INTO t1 VALUES ('2011-10-29 23:00:00');
INSERT INTO t1 VALUES ('2011-10-29 23:00:01');
INSERT INTO t1 VALUES ('2011-10-29 23:59:59');
SET @@session.time_zone = 'Europe/Moscow';
SET sql_mode='NO_ZERO_DATE';
INSERT INTO t2 SELECT * FROM t1;
SET sql_mode='';
INSERT INTO t3 SELECT * FROM t1;
SELECT UNIX_TIMESTAMP(a), a FROM t2;
SELECT UNIX_TIMESTAMP(a), a FROM t3;
DROP TABLE t1, t2, t3;
--echo #
--echo # End of 10.1 tests
--echo #

View File

@ -831,6 +831,13 @@ COALESCE(val, 1)
0 0
DROP TABLE t1; DROP TABLE t1;
# #
# MDEV-18452 ASAN unknown-crash in Field::set_default upon SET bit_column = DEFAULT
#
CREATE TABLE t1 (b BIT(20)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (0);
UPDATE t1 SET b = DEFAULT;
DROP TABLE t1;
#
# End of 10.1 tests # End of 10.1 tests
# #
# #

View File

@ -459,6 +459,15 @@ SELECT COALESCE(val, 1) FROM t1;
--disable_metadata --disable_metadata
DROP TABLE t1; DROP TABLE t1;
--echo #
--echo # MDEV-18452 ASAN unknown-crash in Field::set_default upon SET bit_column = DEFAULT
--echo #
CREATE TABLE t1 (b BIT(20)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (0);
UPDATE t1 SET b = DEFAULT;
DROP TABLE t1;
--echo # --echo #
--echo # End of 10.1 tests --echo # End of 10.1 tests
--echo # --echo #

View File

@ -198,12 +198,15 @@ create table mysqltest.t1 (a int, b int, primary key(a));
insert into mysqltest.t1 values (10,2), (20,3), (30,4), (40,5), (50,10); insert into mysqltest.t1 values (10,2), (20,3), (30,4), (40,5), (50,10);
create table mysqltest.t2 (x int); create table mysqltest.t2 (x int);
insert into mysqltest.t2 values (3), (4), (5), (6); insert into mysqltest.t2 values (3), (4), (5), (6);
create table mysqltest.t3 (x int);
insert into mysqltest.t3 values (3), (4), (5), (6);
create view mysqltest.v1 (a,c) as select a, b+1 from mysqltest.t1; create view mysqltest.v1 (a,c) as select a, b+1 from mysqltest.t1;
create view mysqltest.v2 (a,c) as select a, b from mysqltest.t1; create view mysqltest.v2 (a,c) as select a, b from mysqltest.t1;
create view mysqltest.v3 (a,c) as select a, b+1 from mysqltest.t1; create view mysqltest.v3 (a,c) as select a, b+1 from mysqltest.t1;
create user mysqltest_1@localhost; create user mysqltest_1@localhost;
grant update (a) on mysqltest.v2 to mysqltest_1@localhost; grant update (a) on mysqltest.v2 to mysqltest_1@localhost;
grant update on mysqltest.v1 to mysqltest_1@localhost; grant update on mysqltest.v1 to mysqltest_1@localhost;
grant update on mysqltest.t3 to mysqltest_1@localhost;
grant select on mysqltest.* to mysqltest_1@localhost; grant select on mysqltest.* to mysqltest_1@localhost;
connection user1; connection user1;
use mysqltest; use mysqltest;
@ -239,6 +242,7 @@ a b
48 4 48 4
62 5 62 5
71 10 71 10
update t3,v3 set t3.x=t3.x+v3.c where t3.x=v3.c;
update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c; update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c;
ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2' ERROR 42000: UPDATE command denied to user 'mysqltest_1'@'localhost' for column 'c' in table 'v2'
update v2 set c=a+c; update v2 set c=a+c;

View File

@ -244,6 +244,8 @@ create table mysqltest.t1 (a int, b int, primary key(a));
insert into mysqltest.t1 values (10,2), (20,3), (30,4), (40,5), (50,10); insert into mysqltest.t1 values (10,2), (20,3), (30,4), (40,5), (50,10);
create table mysqltest.t2 (x int); create table mysqltest.t2 (x int);
insert into mysqltest.t2 values (3), (4), (5), (6); insert into mysqltest.t2 values (3), (4), (5), (6);
create table mysqltest.t3 (x int);
insert into mysqltest.t3 values (3), (4), (5), (6);
create view mysqltest.v1 (a,c) as select a, b+1 from mysqltest.t1; create view mysqltest.v1 (a,c) as select a, b+1 from mysqltest.t1;
create view mysqltest.v2 (a,c) as select a, b from mysqltest.t1; create view mysqltest.v2 (a,c) as select a, b from mysqltest.t1;
create view mysqltest.v3 (a,c) as select a, b+1 from mysqltest.t1; create view mysqltest.v3 (a,c) as select a, b+1 from mysqltest.t1;
@ -251,6 +253,7 @@ create view mysqltest.v3 (a,c) as select a, b+1 from mysqltest.t1;
create user mysqltest_1@localhost; create user mysqltest_1@localhost;
grant update (a) on mysqltest.v2 to mysqltest_1@localhost; grant update (a) on mysqltest.v2 to mysqltest_1@localhost;
grant update on mysqltest.v1 to mysqltest_1@localhost; grant update on mysqltest.v1 to mysqltest_1@localhost;
grant update on mysqltest.t3 to mysqltest_1@localhost;
grant select on mysqltest.* to mysqltest_1@localhost; grant select on mysqltest.* to mysqltest_1@localhost;
connection user1; connection user1;
@ -265,6 +268,8 @@ update t2,v2 set v2.a=v2.a+v2.c where t2.x=v2.c;
select * from t1; select * from t1;
update v2 set a=a+c; update v2 set a=a+c;
select * from t1; select * from t1;
# update a table, select only on view
update t3,v3 set t3.x=t3.x+v3.c where t3.x=v3.c;
# no rights on column # no rights on column
--error ER_COLUMNACCESS_DENIED_ERROR --error ER_COLUMNACCESS_DENIED_ERROR
update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c; update t2,v2 set v2.c=v2.a+v2.c where t2.x=v2.c;

View File

@ -3518,6 +3518,95 @@ rank() OVER (ORDER BY 1) ROW_NUMBER() OVER (ORDER BY (EXPORT_SET(5,'Y','N',',',4
1 3 1 3
drop table t1; drop table t1;
# #
# MDEV-17781: Server crashes in next_linear_tab
#
CREATE TABLE t1 (i1 int);
explain
(SELECT AVG(0) OVER (), MAX('2') FROM t1)
UNION ALL
(SELECT AVG(0) OVER (), MAX('2') FROM t1);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNION NULL NULL NULL NULL NULL NULL NULL No tables used
(SELECT AVG(0) OVER (), MAX('2') FROM t1)
UNION ALL
(SELECT AVG(0) OVER (), MAX('2') FROM t1);
AVG(0) OVER () MAX('2')
0.0000 NULL
0.0000 NULL
drop table t1;
#
# MDEV-14791: Crash with order by expression containing window functions
#
CREATE TABLE t1 (b1 int, b2 int);
INSERT INTO t1 VALUES (1,1),(0,0);
explain
SELECT b1 from t1 order by row_number() over (ORDER BY b2) + 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
SELECT b1 from t1 order by row_number() over (ORDER BY b2) + 1;
b1
0
1
explain
SELECT b1 from t1 order by row_number() over (ORDER BY b2);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
SELECT b1 from t1 order by row_number() over (ORDER BY b2);
b1
0
1
DROP TABLE t1;
CREATE TABLE t1 (a int, b int, c int);
INSERT INTO t1 VALUES (2,3,207), (1,21,909), (7,13,312), (8,64,248);
explain
SELECT * FROM t1 ORDER BY max(t1.a) over (partition by c);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort
SELECT * FROM t1 ORDER BY max(t1.a) over (partition by c);
a b c
1 21 909
2 3 207
7 13 312
8 64 248
explain
SELECT max(t1.a) over (partition by c) as x, b, c from t1 order by max(t1.a) over (partition by c);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using temporary; Using filesort
SELECT max(t1.a) over (partition by c) as x, b, c from t1 order by max(t1.a) over (partition by c);
x b c
1 21 909
2 3 207
7 13 312
8 64 248
drop table t1;
#
# MDEV-18373: DENSE_RANK is not calculated correctly
#
create table t1 (a int, b int);
insert into t1 values (60, 1515),(60, 2000),(70, 2000),(55, 1600);
select b, dense_rank() over (order by sum(a)) from t1 group by b;
b dense_rank() over (order by sum(a))
1515 2
1600 1
2000 3
select b, dense_rank() over (order by sum(a)+1) from t1 group by b;
b dense_rank() over (order by sum(a)+1)
1515 2
1600 1
2000 3
select b, row_number() over (partition by sum(a)) from t1 group by b;
b row_number() over (partition by sum(a))
1515 1
1600 1
2000 1
select b, row_number() over (partition by sum(a)+1) from t1 group by b;
b row_number() over (partition by sum(a)+1)
1515 1
1600 1
2000 1
drop table t1;
#
# End of 10.2 tests # End of 10.2 tests
# #
# #

View File

@ -2265,6 +2265,66 @@ insert into t1 values (1),(2),(3);
SELECT rank() OVER (ORDER BY 1), ROW_NUMBER() OVER (ORDER BY (EXPORT_SET(5,'Y','N',',',4))) FROM t1; SELECT rank() OVER (ORDER BY 1), ROW_NUMBER() OVER (ORDER BY (EXPORT_SET(5,'Y','N',',',4))) FROM t1;
drop table t1; drop table t1;
--echo #
--echo # MDEV-17781: Server crashes in next_linear_tab
--echo #
CREATE TABLE t1 (i1 int);
explain
(SELECT AVG(0) OVER (), MAX('2') FROM t1)
UNION ALL
(SELECT AVG(0) OVER (), MAX('2') FROM t1);
(SELECT AVG(0) OVER (), MAX('2') FROM t1)
UNION ALL
(SELECT AVG(0) OVER (), MAX('2') FROM t1);
drop table t1;
--echo #
--echo # MDEV-14791: Crash with order by expression containing window functions
--echo #
CREATE TABLE t1 (b1 int, b2 int);
INSERT INTO t1 VALUES (1,1),(0,0);
explain
SELECT b1 from t1 order by row_number() over (ORDER BY b2) + 1;
SELECT b1 from t1 order by row_number() over (ORDER BY b2) + 1;
explain
SELECT b1 from t1 order by row_number() over (ORDER BY b2);
SELECT b1 from t1 order by row_number() over (ORDER BY b2);
DROP TABLE t1;
CREATE TABLE t1 (a int, b int, c int);
INSERT INTO t1 VALUES (2,3,207), (1,21,909), (7,13,312), (8,64,248);
explain
SELECT * FROM t1 ORDER BY max(t1.a) over (partition by c);
SELECT * FROM t1 ORDER BY max(t1.a) over (partition by c);
explain
SELECT max(t1.a) over (partition by c) as x, b, c from t1 order by max(t1.a) over (partition by c);
SELECT max(t1.a) over (partition by c) as x, b, c from t1 order by max(t1.a) over (partition by c);
drop table t1;
--echo #
--echo # MDEV-18373: DENSE_RANK is not calculated correctly
--echo #
create table t1 (a int, b int);
insert into t1 values (60, 1515),(60, 2000),(70, 2000),(55, 1600);
select b, dense_rank() over (order by sum(a)) from t1 group by b;
select b, dense_rank() over (order by sum(a)+1) from t1 group by b;
select b, row_number() over (partition by sum(a)) from t1 group by b;
select b, row_number() over (partition by sum(a)+1) from t1 group by b;
drop table t1;
--echo # --echo #
--echo # End of 10.2 tests --echo # End of 10.2 tests
--echo # --echo #

View File

@ -3197,6 +3197,10 @@ sub mysql_install_db {
mtr_appendfile_to_file("$sql_dir/mysql_system_tables.sql", mtr_appendfile_to_file("$sql_dir/mysql_system_tables.sql",
$bootstrap_sql_file); $bootstrap_sql_file);
my $gis_sp_path = $source_dist ? "$bindir/scripts" : $sql_dir;
mtr_appendfile_to_file("$gis_sp_path/maria_add_gis_sp_bootstrap.sql",
$bootstrap_sql_file);
# Add the performance tables # Add the performance tables
# for a production system # for a production system
mtr_appendfile_to_file("$sql_dir/mysql_performance_tables.sql", mtr_appendfile_to_file("$sql_dir/mysql_performance_tables.sql",

View File

@ -1,72 +1,72 @@
Certificate: Certificate:
Data: Data:
Version: 3 (0x2) Version: 3 (0x2)
Serial Number: 4 (0x4) Serial Number: 1 (0x1)
Signature Algorithm: sha256WithRSAEncryption Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB Issuer: CN=cacert, C=FI, ST=Helsinki, L=Helsinki, O=MariaDB
Validity Validity
Not Before: Jan 27 10:11:15 2019 GMT Not Before: May 2 14:29:07 2019 GMT
Not After : Jan 22 10:11:15 2039 GMT Not After : Apr 27 14:29:07 2039 GMT
Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server Subject: C=FI, ST=Helsinki, L=Helsinki, O=MariaDB, CN=server
Subject Public Key Info: Subject Public Key Info:
Public Key Algorithm: rsaEncryption Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit) RSA Public-Key: (2048 bit)
Modulus: Modulus:
00:be:e7:9b:da:e1:bf:fe:e6:a4:6d:c2:20:8a:1f: 00:b1:17:08:8f:43:a3:00:01:98:3b:52:8f:0b:b0:
ea:8e:1a:a6:3f:57:93:75:d8:3b:80:55:bd:f3:fe: 13:4c:eb:df:37:0d:a3:2c:5b:38:8d:28:88:94:33:
c3:1e:50:0f:e9:66:0e:bf:98:98:5f:06:95:fc:4a: f3:04:0a:b2:1c:98:27:ec:76:9f:a2:f7:35:79:48:
9a:b2:fc:7f:b1:e0:d9:ef:df:6c:28:d0:12:98:bf: cc:55:1e:68:b4:a7:4d:40:0e:bd:d5:86:c0:e5:cc:
78:b6:f4:1a:94:83:a0:3e:bc:d3:b3:02:4f:4a:96: cc:fa:41:5a:55:3f:79:59:28:6b:a2:ca:55:77:c9:
d9:30:b5:7c:5a:82:dd:ff:96:72:1c:f5:ad:80:bd: 3f:5e:c4:96:e1:8c:64:cc:c7:95:29:48:81:bf:a8:
ec:f7:fa:9c:40:e2:37:f5:86:b7:c6:b0:bb:6a:69: c0:d2:3a:6f:6d:a7:14:b5:ec:d8:b6:c1:d8:86:7f:
77:77:e1:2a:b1:03:bb:1e:bb:e8:b3:7a:2c:bf:a6: 7a:e9:83:c0:83:c3:e1:5a:30:dd:29:ec:85:68:d9:
c5:6b:4d:99:fb:f3:84:ec:ac:a9:2a:f3:f5:09:4e: 09:9a:75:eb:ab:5f:3d:b1:a3:4f:e2:de:54:35:56:
5b:75:18:9c:68:f7:c9:2b:59:0b:41:33:60:23:fa: 9c:7d:8f:2a:4a:18:8d:34:05:05:b4:3b:5b:9e:df:
d4:f8:64:e2:51:59:37:29:f2:bb:68:f5:6a:47:69: 40:20:ad:87:a3:6b:c1:f2:da:a3:65:ef:c4:cb:3c:
58:ed:a8:bb:11:9d:6b:d1:77:75:01:da:57:5d:3e: 24:68:43:23:e8:14:a7:c0:11:b7:5f:e9:e3:09:24:
8e:bf:f7:b1:7b:69:df:53:22:5f:7d:c5:ac:b0:80: af:dd:ac:97:75:22:9e:15:b7:20:b0:82:b0:e1:0f:
0c:20:ea:9d:f7:c4:52:d8:31:03:07:b8:84:a9:74: 0f:41:fc:da:3b:76:0c:6b:f8:42:06:e2:9e:70:9a:
e3:2e:4a:68:bf:a1:84:c6:38:32:c1:11:ef:f9:4b: ed:a1:73:23:58:5c:f1:98:18:42:42:d4:0f:2e:35:
e6:79:f4:7b:7f:52:f3:36:4b:a6:d8:a5:ad:d2:02: 41:00:50:1d:15:e7:65:30:b5:db:72:7d:88:da:be:
40:89:42:ed:ba:d6:ea:74:d0:6e:c1:bc:02:33:9f: 93:72:e3:65:14:fa:0d:23:98:d6:5c:a5:fc:bb:8a:
0b:ab 8f:f9
Exponent: 65537 (0x10001) Exponent: 65537 (0x10001)
X509v3 extensions: X509v3 extensions:
X509v3 Subject Alternative Name: X509v3 Subject Alternative Name:
DNS:localhost IP Address:127.0.0.1, DNS:localhost
Signature Algorithm: sha256WithRSAEncryption Signature Algorithm: sha256WithRSAEncryption
73:fa:07:e9:05:65:28:2e:72:91:29:f8:6b:a6:11:2e:e3:e2: 7e:97:8a:e9:81:e7:c9:44:0d:a6:45:7c:f6:ae:12:f9:c3:3c:
14:6c:4d:7e:69:16:01:47:55:df:88:8d:be:82:37:bd:95:4e: 2c:1f:de:aa:6b:1b:1a:09:ce:9d:d2:d7:5c:ab:32:98:91:1e:
cc:9c:71:98:fa:3b:0d:ad:13:53:e7:04:e7:6f:38:97:ce:12: f8:7d:63:7a:c0:d3:34:eb:3a:55:b2:cd:f5:99:5f:95:bb:3e:
c1:f1:c2:48:bc:3f:a9:61:b5:22:48:e1:8c:64:1f:58:14:e9: 52:1d:05:2d:06:26:08:d1:e8:59:09:61:64:67:70:6d:5b:94:
dd:5d:9f:e3:e7:78:5f:7d:43:6a:89:21:38:9d:65:e8:71:c1: 2b:b4:0c:59:88:bf:56:c8:fe:73:7f:47:e9:b0:e5:46:71:26:
62:d9:62:c7:e6:b3:bd:cb:de:f1:7c:46:10:53:28:8c:47:02: 73:5f:d2:a0:81:4a:67:43:7a:18:2a:81:5b:2a:90:a9:3e:7b:
22:91:ad:78:c0:21:10:28:a8:2c:23:a3:f2:c0:2c:c9:71:0d: 73:6e:83:b5:55:06:75:d1:8c:d1:d8:ad:7c:6a:ce:48:00:dd:
b4:a0:ca:37:ac:36:b3:1c:75:6a:74:85:a5:ba:c2:19:de:e4: c2:1d:b9:40:cd:91:2f:43:c4:d6:f4:79:5e:5c:83:23:87:a7:
3e:c2:3c:a4:cc:dc:8e:a7:08:36:f4:e9:81:32:ac:49:f4:34: 38:3c:d8:49:81:d2:eb:49:c7:f0:5f:3d:6e:a0:38:75:ca:92:
89:84:e7:61:54:29:7b:c0:54:53:b9:73:37:58:21:32:56:01: ce:d5:a7:54:fc:0e:7e:f4:14:66:77:79:93:bb:92:56:ab:f3:
7f:97:d3:a1:06:5b:06:14:19:6a:42:5d:45:5a:ba:8e:14:d7: 1b:3c:75:57:4f:2d:12:6d:99:5b:d0:b5:62:b7:1d:e3:5b:a9:
df:49:46:f2:83:7a:f0:d6:25:52:37:39:ae:37:ea:67:5f:7f: 70:cd:58:41:77:a6:2c:6d:34:bd:11:13:7d:ca:51:3e:06:f5:
7b:6d:f1:42:c9:0f:44:4d:f7:39:2d:39:78:12:93:42:1b:4a: cb:d4:d5:11:64:b0:cc:30:2f:a5:62:d0:dd:2c:8c:66:3f:df:
6d:f8:76:48:78:41:e9:a1:0b:78:fd:ad:29:f1:28:62:b8:9f: 2a:df:4d:56:99:5c:12:af:ee:92:e1:02:f6:ce:12:be:99:fa:
f7:22:39:3b cc:0c:5c:af
-----BEGIN CERTIFICATE----- -----BEGIN CERTIFICATE-----
MIIDPzCCAiegAwIBAgIBBDANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl MIIDRTCCAi2gAwIBAgIBATANBgkqhkiG9w0BAQsFADBWMQ8wDQYDVQQDDAZjYWNl
cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs cnQxCzAJBgNVBAYTAkZJMREwDwYDVQQIDAhIZWxzaW5raTERMA8GA1UEBwwISGVs
c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwMTI3MTAxMTE1WhcNMzkwMTIy c2lua2kxEDAOBgNVBAoMB01hcmlhREIwHhcNMTkwNTAyMTQyOTA3WhcNMzkwNDI3
MTAxMTE1WjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV MTQyOTA3WjBWMQswCQYDVQQGEwJGSTERMA8GA1UECAwISGVsc2lua2kxETAPBgNV
BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMQ8wDQYDVQQDDAZzZXJ2ZXIw BAcMCEhlbHNpbmtpMRAwDgYDVQQKDAdNYXJpYURCMQ8wDQYDVQQDDAZzZXJ2ZXIw
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC+55va4b/+5qRtwiCKH+qO ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCxFwiPQ6MAAZg7Uo8LsBNM
GqY/V5N12DuAVb3z/sMeUA/pZg6/mJhfBpX8Spqy/H+x4Nnv32wo0BKYv3i29BqU 6983DaMsWziNKIiUM/MECrIcmCfsdp+i9zV5SMxVHmi0p01ADr3VhsDlzMz6QVpV
g6A+vNOzAk9KltkwtXxagt3/lnIc9a2Avez3+pxA4jf1hrfGsLtqaXd34SqxA7se P3lZKGuiylV3yT9exJbhjGTMx5UpSIG/qMDSOm9tpxS17Ni2wdiGf3rpg8CDw+Fa
u+izeiy/psVrTZn784TsrKkq8/UJTlt1GJxo98krWQtBM2Aj+tT4ZOJRWTcp8rto MN0p7IVo2QmadeurXz2xo0/i3lQ1Vpx9jypKGI00BQW0O1ue30AgrYeja8Hy2qNl
9WpHaVjtqLsRnWvRd3UB2lddPo6/97F7ad9TIl99xaywgAwg6p33xFLYMQMHuISp 78TLPCRoQyPoFKfAEbdf6eMJJK/drJd1Ip4VtyCwgrDhDw9B/No7dgxr+EIG4p5w
dOMuSmi/oYTGODLBEe/5S+Z59Ht/UvM2S6bYpa3SAkCJQu261up00G7BvAIznwur mu2hcyNYXPGYGEJC1A8uNUEAUB0V52UwtdtyfYjavpNy42UU+g0jmNZcpfy7io/5
AgMBAAGjGDAWMBQGA1UdEQQNMAuCCWxvY2FsaG9zdDANBgkqhkiG9w0BAQsFAAOC AgMBAAGjHjAcMBoGA1UdEQQTMBGHBH8AAAGCCWxvY2FsaG9zdDANBgkqhkiG9w0B
AQEAc/oH6QVlKC5ykSn4a6YRLuPiFGxNfmkWAUdV34iNvoI3vZVOzJxxmPo7Da0T AQsFAAOCAQEAfpeK6YHnyUQNpkV89q4S+cM8LB/eqmsbGgnOndLXXKsymJEe+H1j
U+cE5284l84SwfHCSLw/qWG1IkjhjGQfWBTp3V2f4+d4X31DaokhOJ1l6HHBYtli esDTNOs6VbLN9Zlflbs+Uh0FLQYmCNHoWQlhZGdwbVuUK7QMWYi/Vsj+c39H6bDl
x+azvcve8XxGEFMojEcCIpGteMAhECioLCOj8sAsyXENtKDKN6w2sxx1anSFpbrC RnEmc1/SoIFKZ0N6GCqBWyqQqT57c26DtVUGddGM0ditfGrOSADdwh25QM2RL0PE
Gd7kPsI8pMzcjqcINvTpgTKsSfQ0iYTnYVQpe8BUU7lzN1ghMlYBf5fToQZbBhQZ 1vR5XlyDI4enODzYSYHS60nH8F89bqA4dcqSztWnVPwOfvQUZnd5k7uSVqvzGzx1
akJdRVq6jhTX30lG8oN68NYlUjc5rjfqZ19/e23xQskPRE33OS05eBKTQhtKbfh2 V08tEm2ZW9C1Yrcd41upcM1YQXemLG00vRETfcpRPgb1y9TVEWSwzDAvpWLQ3SyM
SHhB6aELeP2tKfEoYrif9yI5Ow== Zj/fKt9NVplcEq/ukuEC9s4Svpn6zAxcrw==
-----END CERTIFICATE----- -----END CERTIFICATE-----

View File

@ -1,28 +1,28 @@
-----BEGIN PRIVATE KEY----- -----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC+55va4b/+5qRt MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCxFwiPQ6MAAZg7
wiCKH+qOGqY/V5N12DuAVb3z/sMeUA/pZg6/mJhfBpX8Spqy/H+x4Nnv32wo0BKY Uo8LsBNM6983DaMsWziNKIiUM/MECrIcmCfsdp+i9zV5SMxVHmi0p01ADr3VhsDl
v3i29BqUg6A+vNOzAk9KltkwtXxagt3/lnIc9a2Avez3+pxA4jf1hrfGsLtqaXd3 zMz6QVpVP3lZKGuiylV3yT9exJbhjGTMx5UpSIG/qMDSOm9tpxS17Ni2wdiGf3rp
4SqxA7seu+izeiy/psVrTZn784TsrKkq8/UJTlt1GJxo98krWQtBM2Aj+tT4ZOJR g8CDw+FaMN0p7IVo2QmadeurXz2xo0/i3lQ1Vpx9jypKGI00BQW0O1ue30AgrYej
WTcp8rto9WpHaVjtqLsRnWvRd3UB2lddPo6/97F7ad9TIl99xaywgAwg6p33xFLY a8Hy2qNl78TLPCRoQyPoFKfAEbdf6eMJJK/drJd1Ip4VtyCwgrDhDw9B/No7dgxr
MQMHuISpdOMuSmi/oYTGODLBEe/5S+Z59Ht/UvM2S6bYpa3SAkCJQu261up00G7B +EIG4p5wmu2hcyNYXPGYGEJC1A8uNUEAUB0V52UwtdtyfYjavpNy42UU+g0jmNZc
vAIznwurAgMBAAECggEATXOwMuyWNbejjHhPNVrfkcnUGyzPweb5tQaUa5K33OuE pfy7io/5AgMBAAECggEAP6QHb3TfHyFzk94Xihu80+fwT9iWy1n8+L2YV6pTqyAs
mR/z6d3iK+ODJHmsK+Pvdt6P7RcLTb+lW92K/0coJYsFj46SoTTVsKBk+7MWAa7I 4hnMPy5iMC6nCO8gf3ZuKn31RRAHKLVEnVD8WPMjg39MHL5p8BbGoEWygFwl3OiX
nLKQF5nBS9NCehVuIZDmPTHsC6uWTgT+GF/9LxYha8W3EmIGF7d0ryUrzSGuk0qA UQBomm10M2xx3xsg8EcbKkXzm7oOFke55DF0/eVnFwJ4eJiHWSamTNwT1YJkqXFt
yVj4V2JbEbox5jjRUvRvCfbQnZYhT1Aa1/kN4fxYp00sQTkCQ1QZiC+SbN245nrv kbYxxcpvjzFKuIOFXMTbS6OHGLHjuuyWffxEkbvM/bU13IFmDOzahLFPihcz7rFu
UHumVBy0dPL+vmYxKc+L9qwYhHKsspx6+RUTgW+7YbHs6LEd8HmXb0hIp1Xb4yUS CaFN9JSSj4jENPkYOiw+zTtJhgOMCoclAcNc4c5Gs95wk6pTxoj9kHJaaYqinVgI
ADVI7TgTGEGGRt1gQYkfcwl1YoVQeyBK8Yvfz88tgQKBgQD9PeBEXM+y7z8jcXAB owUTgIXRhuixjWJd1dylgY3YvrRFENZlMe39cVKwAQKBgQDppB7Qf2FmejMYtJkA
f/JpmMmm+S8JhPyKOMDZRL5jPKgm93Xm0pAReo8xM/quKH2jAoMxmburnYTTskyo WmlDSy+LZnYAAYjTqIeSAlRXI91iDa9HqrdPucQkv6nPvL6yndZYIrq50BLNGiL+
HBATcWDTBUiNkjCJORdWKwP6kvtYt8ZZsC9vrWkx4pPqTXQaXUNmrfZ1cuh5U/BK v/3Ok/9v3H8jAiCzwIuqAYoA2gHh4d4ZV9Vxoqu6CcX/2xOUL7CSOV5NkK+3Yrs7
5aAzN5Drx0tKie+/+2gvevoZawKBgQDA++qDlRAiNft7fEZhjA3ovOSq9kIf1hnE n47X4ILGihIKzz5GoSTHyb6zRwKBgQDCCX1jwSEnIDhPCuid4+6g1vjTvVtgVIf9
psh4SRB21QZ443gifQKRRFIhMWRX0QkTyw2PbeVJvPjab08NmcumJWK5NCxPy3C0 87sds02duE8K5Uwjio7g3BlV1YzLv0jKNkUK+HuG/c7n9r0IVrs4of6t/bJjl7vJ
/ihQV2Ip49GVYA2qlgVzOMuxJJlG6SyKvCiBmadHY/ex4Ya1YPcfhjKsNr4ObIV8 RLl6ZkSybzzS2x2nYk23VZlInYWUdJS9kHlic+mXfJvJvBBwyz8WX7t2wQaTqlDu
OCvQruQmwQKBgB+jp21jGyAD/CN1fMTzM1o2GJuf7lyGHPc3+AAtMow7e9bCfByG QCpuV+HCvwKBgDz4/q2swG9s7o7A+rjT32qXYXYArES+IcYS0iZxgy8mhezD431R
mjFU2qcPE3bG4EuJeNKtnmDmoT3BvQoT135WX/59Xn8xkJbUZzIA1dJsorKG42U5 ePtOYHiyqA81k5KrjDd+ALrjKTTrYDyZQBQ8HUpFAczSDlS6p/ga5LfqLNmVB1AX
OfP9+nKdGFXhr2vL0yv0+CHcZWcjMZZp8gX0H0sV7zY03Zti0bV869pZAoGBALDg 0vUP3b70M/7cXlSqyWqvnAOkAadbFb+umSmPRrGncKPvh7II9b9J0AGbAoGAMyD3
c+IkJoRkm9ljXxKbDkiJkMBNMvABCN8fyk/ND8UKnIMCYaKil07Tor7/iSuf0MUO BnMcfkfSLpnMQ9aMyZr7xCeQTWjY0MUJmEDoAdhQE6nqDy9yiLPWhTSZPhLwZkA4
b6BNJkE+bYuvR3J8ypW+YEzFT/PWz7dj10lDvhoMz5QsVHpMRDSGEtOKat3+ay/B nzRssFxuydbNZsYb3UdqaYSBHhccZ2ORkDwke/Qtzc3pGXMg0V9f3a+MRFsX2n+Y
IxMd5J7fNjAYN6JYfEetdRY4mluYBYSD60y6byxBAoGBALDoRoub5TUMdgr66fNp TKYIdl9iWZ0Ro/cab5XYOumQBxcI7k7AH4VOutcCgYEA3JgQiYoiPohS9A49bPiF
p7tc9ERH8/htPEq5g2SrzQex7lUIp8+wmvprx0i4a2SgDYCkj6gmjG8rP2O65tsn eDX1Ck3lgaEF72us6BfvLHTrbA/qYhVUlrbrU2P/gAy1uKDRYq5RAoNGDLdwatvE
dkrKXnUOjIgjHGesbZoKgE+7Gl4c+eyoDsNVHH+ZFKN26fcO9i6wrbeGKjTTMcfu 0hPYj1hc1DuPAAGG83/tSh2jfFVbZBw5xEDjLerkpQyop59dfTS0E/oSu6ebxIIg
nEXqAq0CccdZ0lXxQTS/ttbU dHEwqlmDrrJv7WwUJUzuUJU=
-----END PRIVATE KEY----- -----END PRIVATE KEY-----

View File

@ -70,6 +70,10 @@ sub skip_combinations {
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/ unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
and $1 ge "1.0.2"; and $1 ge "1.0.2";
$skip{'main/ssl_verify_ip.test'} = 'x509v3 support required'
unless $::mysqld_variables{'version-ssl-library'} =~ /OpenSSL (\S+)/
and $1 ge "1.0.2";
%skip; %skip;
} }

Some files were not shown because too many files have changed in this diff Show More