mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
13.0 deprecations
removed: * DES encryption * --secure-auth * --old * spider table options: bfz, btt, cmd, ctp, cwg, isa, ilm, ios, smd, stc, stl extended under old-mode: * YEAR(2), still available when old-mode=2_DIGIT_YEAR un-deprecated: * keep_files_on_create, originally (MDEV-23570) the idea was to make it TRUE and deprecate. It cannot be removed when FALSE, but TRUE breaks mariabackup.aria_backup where a table is altered from Aria to InnoDB during a backup, so both t.MAD/t.MAI and t.ibd gets into a backup.
This commit is contained in:
@@ -53,7 +53,6 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
|
||||
SET(HAVE_ERR_remove_thread_state ON CACHE INTERNAL "wolfssl doesn't have ERR_remove_thread_state")
|
||||
SET(HAVE_EncryptAes128Ctr ON CACHE INTERNAL "wolfssl does support AES-CTR")
|
||||
SET(HAVE_EncryptAes128Gcm OFF CACHE INTERNAL "wolfssl does not support AES-GCM")
|
||||
SET(HAVE_des ON CACHE INTERNAL "wolfssl does support DES API")
|
||||
SET(HAVE_evp_pkey ON CACHE INTERNAL "wolfssl does support EVP_PKEY API")
|
||||
SET(HAVE_hkdf ON CACHE INTERNAL "wolfssl does support EVP_PKEY_HKDF API")
|
||||
CHANGE_SSL_SETTINGS("bundled")
|
||||
@@ -136,8 +135,6 @@ MACRO (MYSQL_CHECK_SSL)
|
||||
HAVE_EncryptAes128Ctr)
|
||||
CHECK_SYMBOL_EXISTS(EVP_aes_128_gcm "openssl/evp.h"
|
||||
HAVE_EncryptAes128Gcm)
|
||||
CHECK_SYMBOL_EXISTS(DES_set_key_unchecked "openssl/des.h"
|
||||
HAVE_des)
|
||||
CHECK_SYMBOL_EXISTS(EVP_PKEY_get_raw_public_key "openssl/evp.h"
|
||||
HAVE_evp_pkey)
|
||||
CHECK_SYMBOL_EXISTS(EVP_PKEY_CTX_set_hkdf_md "string.h;stdarg.h;openssl/kdf.h"
|
||||
|
||||
@@ -493,7 +493,6 @@ this is the case with Microsoft Windows VirtualFree(MEM_DECOMMIT) */
|
||||
#cmakedefine HAVE_COMPRESS 1
|
||||
#cmakedefine HAVE_EncryptAes128Ctr 1
|
||||
#cmakedefine HAVE_EncryptAes128Gcm 1
|
||||
#cmakedefine HAVE_des 1
|
||||
#cmakedefine HAVE_hkdf 1
|
||||
|
||||
/*
|
||||
|
||||
@@ -163,11 +163,6 @@ xb_mysql_connect()
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!opt_secure_auth) {
|
||||
mysql_options(connection, MYSQL_SECURE_AUTH,
|
||||
(char *) &opt_secure_auth);
|
||||
}
|
||||
|
||||
if (xb_plugin_dir && *xb_plugin_dir){
|
||||
mysql_options(connection, MYSQL_PLUGIN_DIR, xb_plugin_dir);
|
||||
}
|
||||
|
||||
@@ -1839,11 +1839,8 @@ struct my_option xb_client_options[]= {
|
||||
&opt_binlog_info, &opt_binlog_info, &binlog_info_typelib, GET_ENUM,
|
||||
OPT_ARG, BINLOG_INFO_AUTO, 0, 0, 0, 0, 0},
|
||||
|
||||
{"secure-auth", OPT_XB_SECURE_AUTH,
|
||||
"Refuse client connecting to server if it"
|
||||
" uses old (pre-4.1.1) protocol.",
|
||||
&opt_secure_auth, &opt_secure_auth, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0,
|
||||
0},
|
||||
{"secure-auth", OPT_XB_SECURE_AUTH, "Unused",
|
||||
0, 0, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
|
||||
{"log-innodb-page-corruption", OPT_XB_IGNORE_INNODB_PAGE_CORRUPTION,
|
||||
"Continue backup if innodb corrupted pages are found. The pages are "
|
||||
|
||||
@@ -214,7 +214,7 @@ enum enum_indicator_type
|
||||
|
||||
#define REFRESH_QUERY_CACHE (1ULL << 16) /* clear the query cache */
|
||||
#define REFRESH_QUERY_CACHE_FREE (1ULL << 17) /* pack query cache */
|
||||
#define REFRESH_DES_KEY_FILE (1ULL << 18)
|
||||
/* unused (1ULL << 18) */
|
||||
#define REFRESH_USER_RESOURCES (1ULL << 19)
|
||||
#define REFRESH_FOR_EXPORT (1ULL << 20) /* FLUSH TABLES ... FOR EXPORT */
|
||||
#define REFRESH_SSL (1ULL << 21)
|
||||
|
||||
@@ -79,7 +79,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
|
||||
../sql/opt_vcol_substitution.cc
|
||||
../sql/parse_file.cc ../sql/procedure.cc ../sql/protocol.cc
|
||||
../sql/records.cc ../sql/repl_failsafe.cc ../sql/rpl_filter.cc
|
||||
../sql/rpl_record.cc ../sql/des_key_file.cc
|
||||
../sql/rpl_record.cc
|
||||
../sql/rpl_injector.cc ../sql/set_var.cc ../sql/spatial.cc
|
||||
../sql/sp_cache.cc ../sql/sp.cc ../sql/sp_head.cc
|
||||
../sql/sp_pcontext.cc ../sql/sp_rcontext.cc ../sql/sql_acl.cc
|
||||
|
||||
@@ -1149,13 +1149,6 @@ insert into t1 values (1.1), (10.1), (100.1), (1000.1), (10000.1);
|
||||
select hex(concat(a)), a from t1;
|
||||
drop table t1;
|
||||
|
||||
create table t1 (a year(2));
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
drop table t1, t2;
|
||||
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
@@ -1457,14 +1450,6 @@ select hex(a) from v1;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
|
||||
create table t1 (a year(2));
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
select hex(a) from v1;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# in the FIPS mode, OpenSSL disables DES and other weak algorithms
|
||||
source include/have_ssl_crypto_functs.inc;
|
||||
|
||||
if (`select des_encrypt("a", "b") IS NULL`) {
|
||||
skip DES is disabled (fips mode?);
|
||||
}
|
||||
@@ -1,7 +1,4 @@
|
||||
connect old,localhost,root,,,,,auth=mysql_old_password:mysql_native_password;
|
||||
set global secure_auth=0;
|
||||
Warnings:
|
||||
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
|
||||
create user test_nopw;
|
||||
grant select on test.* to test_nopw;
|
||||
create user test_oldpw identified by password "09301740536db389";
|
||||
@@ -15,10 +12,6 @@ change_user test_nopw,,;
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
concat('<', user(), '>') concat('<', current_user(), '>') database()
|
||||
<test_nopw@localhost> <test_nopw@%> NULL
|
||||
change_user test_oldpw,oldpw,;
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
concat('<', user(), '>') concat('<', current_user(), '>') database()
|
||||
<test_oldpw@localhost> <test_oldpw@%> NULL
|
||||
change_user test_newpw,newpw,;
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
concat('<', user(), '>') concat('<', current_user(), '>') database()
|
||||
@@ -31,10 +24,6 @@ change_user test_nopw,,test;
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
concat('<', user(), '>') concat('<', current_user(), '>') database()
|
||||
<test_nopw@localhost> <test_nopw@%> test
|
||||
change_user test_oldpw,oldpw,test;
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
concat('<', user(), '>') concat('<', current_user(), '>') database()
|
||||
<test_oldpw@localhost> <test_oldpw@%> test
|
||||
change_user test_newpw,newpw,test;
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
concat('<', user(), '>') concat('<', current_user(), '>') database()
|
||||
@@ -101,9 +90,6 @@ NULL
|
||||
FLUSH STATUS;
|
||||
change_user root,,test;
|
||||
Value of com_select did not change
|
||||
set global secure_auth=default;
|
||||
Warnings:
|
||||
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
|
||||
set timestamp=unix_timestamp('2010-10-10 10:10:10');
|
||||
select now();
|
||||
now()
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
# This test is checking that old password authentication works
|
||||
--disable_service_connection
|
||||
|
||||
# connect with mysql_old_password enabled
|
||||
connect old,localhost,root,,,,,auth=mysql_old_password:mysql_native_password;
|
||||
|
||||
set global secure_auth=0;
|
||||
#
|
||||
# functional change user tests
|
||||
#
|
||||
@@ -27,19 +25,6 @@ change_user test_nopw;
|
||||
--replace_result <@> <test_nopw@%> @> @localhost>
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
|
||||
#
|
||||
# embedded with enabled privilege control cannot do plugin negotiation.
|
||||
# that is, it cannot try to authenticate with a new scramble, receive a request
|
||||
# to switch to an old scramble, and retry with an old scramble.
|
||||
# As a result, it cannot change to a user that has old scramble and
|
||||
# and it stays logged as a previous user - test_nopw in this test file.
|
||||
# For the embedded with auth we replace nopw with oldpw in the results.
|
||||
#
|
||||
let $repl = `select if(version() like '%embedded%' and user() like '%nopw%', 'nopw', 'oldpw')`;
|
||||
|
||||
change_user test_oldpw, oldpw;
|
||||
--replace_result <@> <test_oldpw@%> @> @localhost> $repl oldpw
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
change_user test_newpw, newpw;
|
||||
--replace_result <@> <test_newpw@%> @> @localhost>
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
@@ -50,9 +35,6 @@ select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
change_user test_nopw,,test;
|
||||
--replace_result <@> <test_nopw@%> @> @localhost>
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
change_user test_oldpw,oldpw,test;
|
||||
--replace_result <@> <test_oldpw@%> @> @localhost> $repl oldpw
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
change_user test_newpw,newpw,test;
|
||||
--replace_result <@> <test_newpw@%> @> @localhost>
|
||||
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
|
||||
@@ -142,8 +124,6 @@ if ($after != $before){
|
||||
}
|
||||
echo Value of com_select did not change;
|
||||
|
||||
set global secure_auth=default;
|
||||
|
||||
set timestamp=unix_timestamp('2010-10-10 10:10:10');
|
||||
select now();
|
||||
select year(now()) > 2011;
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
SET global secure_auth=0;
|
||||
Warnings:
|
||||
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
|
||||
connect con1,localhost,root,,mysql;
|
||||
show tables;
|
||||
Tables_in_mysql
|
||||
@@ -102,63 +99,6 @@ connect(localhost,test,zorro,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect fail_con,localhost,test,zorro,;
|
||||
ERROR 28000: Access denied for user 'test'@'localhost' (using password: YES)
|
||||
# switching from mysql.global_priv to mysql.user
|
||||
update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test";
|
||||
flush privileges;
|
||||
show grants for test@localhost;
|
||||
Grants for test@localhost
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test`@`localhost` IDENTIFIED BY PASSWORD '2f27438961437573'
|
||||
update mysql.user set plugin='mysql_old_password' where user='test';
|
||||
flush privileges;
|
||||
show grants for test@localhost;
|
||||
Grants for test@localhost
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test`@`localhost` IDENTIFIED BY PASSWORD '2f27438961437573'
|
||||
connect con10,localhost,test,gambling2,,,,auth=mysql_old_password:mysql_native_password;
|
||||
connect con5,localhost,test,gambling2,mysql,,,auth=mysql_old_password:mysql_native_password;
|
||||
set password="";
|
||||
set password='gambling3';
|
||||
ERROR HY000: Password hash should be a 41-digit hexadecimal number
|
||||
set password=old_password('gambling3');
|
||||
show tables;
|
||||
Tables_in_mysql
|
||||
column_stats
|
||||
columns_priv
|
||||
db
|
||||
event
|
||||
func
|
||||
general_log
|
||||
global_priv_bak
|
||||
gtid_slave_pos
|
||||
help_category
|
||||
help_keyword
|
||||
help_relation
|
||||
help_topic
|
||||
index_stats
|
||||
innodb_index_stats
|
||||
innodb_table_stats
|
||||
plugin
|
||||
proc
|
||||
procs_priv
|
||||
proxies_priv
|
||||
roles_mapping
|
||||
servers
|
||||
slow_log
|
||||
table_stats
|
||||
tables_priv
|
||||
time_zone
|
||||
time_zone_leap_second
|
||||
time_zone_name
|
||||
time_zone_transition
|
||||
time_zone_transition_type
|
||||
transaction_registry
|
||||
user
|
||||
user_bak
|
||||
connect con6,localhost,test,gambling3,test,,,auth=mysql_old_password:mysql_native_password;
|
||||
show tables;
|
||||
Tables_in_test
|
||||
connection default;
|
||||
disconnect con10;
|
||||
disconnect con5;
|
||||
disconnect con6;
|
||||
connect(localhost,test,,test2,MASTER_PORT,MASTER_SOCKET);
|
||||
connect fail_con,localhost,test,,test2,,,auth=mysql_old_password:mysql_native_password;
|
||||
ERROR 28000: Access denied for user 'test'@'localhost' (using password: NO)
|
||||
@@ -341,7 +281,6 @@ disconnect extracon;
|
||||
disconnect extracon2;
|
||||
connection default;
|
||||
CREATE USER mysqltest_up1 IDENTIFIED VIA mysql_native_password using '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB';
|
||||
CREATE USER mysqltest_up2 IDENTIFIED VIA mysql_old_password using '09301740536db389';
|
||||
connect(localhost,mysqltest_up1,foo,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect pcon1,localhost,mysqltest_up1,foo,,$MASTER_MYPORT,;
|
||||
ERROR 28000: Access denied for user 'mysqltest_up1'@'localhost' (using password: YES)
|
||||
@@ -350,14 +289,6 @@ select user(), current_user();
|
||||
user() current_user()
|
||||
mysqltest_up1@localhost mysqltest_up1@%
|
||||
disconnect pcon2;
|
||||
connect(localhost,mysqltest_up2,newpw,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect pcon3,localhost,mysqltest_up2,newpw,,$MASTER_MYPORT,,auth=mysql_old_password:mysql_native_password;
|
||||
ERROR 28000: Access denied for user 'mysqltest_up2'@'localhost' (using password: YES)
|
||||
connect pcon4,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,,auth=mysql_old_password:mysql_native_password;
|
||||
select user(), current_user();
|
||||
user() current_user()
|
||||
mysqltest_up2@localhost mysqltest_up2@%
|
||||
disconnect pcon4;
|
||||
connect(localhost,mysqltest_nouser,newpw,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect pcon5,localhost,mysqltest_nouser,newpw,,$MASTER_MYPORT,;
|
||||
ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using password: YES)
|
||||
@@ -367,27 +298,19 @@ ERROR 28000: Access denied for user 'mysqltest_nouser'@'localhost' (using passwo
|
||||
connection default;
|
||||
# switching from mysql.global_priv to mysql.user
|
||||
update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1';
|
||||
update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
|
||||
select user, password, plugin, authentication_string from mysql.user
|
||||
where user like 'mysqltest_up_';
|
||||
user password plugin authentication_string
|
||||
mysqltest_up1 *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB mysql_native_password *E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB
|
||||
mysqltest_up2 09301740536db389 mysql_old_password 09301740536db389
|
||||
flush privileges;
|
||||
connect pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,;
|
||||
select user(), current_user();
|
||||
user() current_user()
|
||||
mysqltest_up1@localhost mysqltest_up1@%
|
||||
disconnect pcon6;
|
||||
connect pcon7,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,,auth=mysql_old_password:mysql_native_password;
|
||||
select user(), current_user();
|
||||
user() current_user()
|
||||
mysqltest_up2@localhost mysqltest_up2@%
|
||||
disconnect pcon7;
|
||||
connection default;
|
||||
# switching back from mysql.user to mysql.global_priv
|
||||
DROP USER mysqltest_up1@'%';
|
||||
DROP USER mysqltest_up2@'%';
|
||||
#
|
||||
# BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
|
||||
#
|
||||
@@ -411,9 +334,6 @@ test
|
||||
test
|
||||
test
|
||||
drop procedure p1;
|
||||
SET global secure_auth=default;
|
||||
Warnings:
|
||||
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
|
||||
#
|
||||
# MDEV-19282: Log more specific warning with log_warnings=2 if
|
||||
# connection is aborted prior to authentication
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
# of the log tables (which are CSV-based). By connect mysql; show tables;
|
||||
--source include/have_csv.inc
|
||||
|
||||
SET global secure_auth=0;
|
||||
|
||||
#connect (con1,localhost,root,,"");
|
||||
#show tables;
|
||||
connect (con1,localhost,root,,mysql);
|
||||
@@ -58,29 +56,7 @@ connect (fail_con,localhost,test,zorro,test2);
|
||||
--error ER_ACCESS_DENIED_ERROR
|
||||
connect (fail_con,localhost,test,zorro,);
|
||||
|
||||
# check if old password version also works
|
||||
source include/switch_to_mysql_user.inc;
|
||||
update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test";
|
||||
flush privileges;
|
||||
show grants for test@localhost;
|
||||
update mysql.user set plugin='mysql_old_password' where user='test';
|
||||
flush privileges;
|
||||
show grants for test@localhost;
|
||||
|
||||
connect con10,localhost,test,gambling2,,,,auth=mysql_old_password:mysql_native_password;
|
||||
connect con5,localhost,test,gambling2,mysql,,,auth=mysql_old_password:mysql_native_password;
|
||||
set password="";
|
||||
--error ER_PASSWD_LENGTH
|
||||
set password='gambling3';
|
||||
set password=old_password('gambling3');
|
||||
show tables;
|
||||
connect (con6,localhost,test,gambling3,test,,,auth=mysql_old_password:mysql_native_password);
|
||||
show tables;
|
||||
|
||||
connection default;
|
||||
disconnect con10;
|
||||
disconnect con5;
|
||||
disconnect con6;
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
--error ER_ACCESS_DENIED_ERROR
|
||||
@@ -363,7 +339,6 @@ FLUSH PRIVILEGES;
|
||||
# A couple of plugin tests - for builtin plugins only
|
||||
#
|
||||
CREATE USER mysqltest_up1 IDENTIFIED VIA mysql_native_password using '*E8D46CE25265E545D225A8A6F1BAF642FEBEE5CB';
|
||||
CREATE USER mysqltest_up2 IDENTIFIED VIA mysql_old_password using '09301740536db389';
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
--error ER_ACCESS_DENIED_ERROR
|
||||
@@ -372,13 +347,6 @@ connect(pcon2,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,);
|
||||
select user(), current_user();
|
||||
disconnect pcon2;
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
|
||||
--error ER_ACCESS_DENIED_ERROR
|
||||
connect(pcon3,localhost,mysqltest_up2,newpw,,$MASTER_MYPORT,,auth=mysql_old_password:mysql_native_password);
|
||||
connect(pcon4,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,,auth=mysql_old_password:mysql_native_password);
|
||||
select user(), current_user();
|
||||
disconnect pcon4;
|
||||
|
||||
#
|
||||
# lp:683112 Maria 5.2 incorrectly reports "(using password: NO)"
|
||||
# even when password is specified
|
||||
@@ -401,7 +369,6 @@ connection default;
|
||||
#
|
||||
source include/switch_to_mysql_user.inc;
|
||||
update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1';
|
||||
update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
|
||||
select user, password, plugin, authentication_string from mysql.user
|
||||
where user like 'mysqltest_up_';
|
||||
flush privileges;
|
||||
@@ -410,15 +377,11 @@ connect(pcon6,localhost,mysqltest_up1,bar,,$MASTER_MYPORT,);
|
||||
select user(), current_user();
|
||||
disconnect pcon6;
|
||||
|
||||
connect(pcon7,localhost,mysqltest_up2,oldpw,,$MASTER_MYPORT,,auth=mysql_old_password:mysql_native_password);
|
||||
select user(), current_user();
|
||||
disconnect pcon7;
|
||||
connection default;
|
||||
|
||||
source include/switch_to_mysql_global_priv.inc;
|
||||
|
||||
DROP USER mysqltest_up1@'%';
|
||||
DROP USER mysqltest_up2@'%';
|
||||
|
||||
--echo #
|
||||
--echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
|
||||
@@ -445,8 +408,6 @@ delimiter ;|
|
||||
call p1(2);
|
||||
drop procedure p1;
|
||||
|
||||
SET global secure_auth=default;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-19282: Log more specific warning with log_warnings=2 if
|
||||
--echo # connection is aborted prior to authentication
|
||||
|
||||
@@ -2038,20 +2038,6 @@ hex(concat(a)) a
|
||||
30303030303030303030303030303030313030302E31 00000000000000001000.1
|
||||
30303030303030303030303030303031303030302E31 00000000000000010000.1
|
||||
drop table t1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
hex(concat(a))
|
||||
3031
|
||||
create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varbinary(2) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
@@ -2353,19 +2339,6 @@ hex(a)
|
||||
30303030303030303030303030303031303030302E31
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varbinary(2) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
|
||||
@@ -2450,20 +2450,6 @@ hex(concat(a)) a
|
||||
30303030303030303030303030303030313030302E31 00000000000000001000.1
|
||||
30303030303030303030303030303031303030302E31 00000000000000010000.1
|
||||
drop table t1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
hex(concat(a))
|
||||
3031
|
||||
create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET cp1251 COLLATE cp1251_general_ci DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
@@ -2765,19 +2751,6 @@ hex(a)
|
||||
30303030303030303030303030303031303030302E31
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
|
||||
@@ -2759,20 +2759,6 @@ hex(concat(a)) a
|
||||
30303030303030303030303030303030313030302E31 00000000000000001000.1
|
||||
30303030303030303030303030303031303030302E31 00000000000000010000.1
|
||||
drop table t1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
hex(concat(a))
|
||||
3031
|
||||
create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
@@ -3074,19 +3060,6 @@ hex(a)
|
||||
30303030303030303030303030303031303030302E31
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
|
||||
@@ -3641,20 +3641,6 @@ hex(concat(a)) a
|
||||
00300030003000300030003000300030003000300030003000300030003000300031003000300030002E0031 00000000000000001000.1
|
||||
00300030003000300030003000300030003000300030003000300030003000310030003000300030002E0031 00000000000000010000.1
|
||||
drop table t1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
hex(concat(a))
|
||||
00300031
|
||||
create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
@@ -3956,19 +3942,6 @@ hex(a)
|
||||
00300030003000300030003000300030003000300030003000300030003000310030003000300030002E0031
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
00300031
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
|
||||
@@ -4387,20 +4387,6 @@ hex(concat(a)) a
|
||||
30303030303030303030303030303030313030302E31 00000000000000001000.1
|
||||
30303030303030303030303030303031303030302E31 00000000000000010000.1
|
||||
drop table t1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
hex(concat(a))
|
||||
3031
|
||||
create table t2 as select concat(a) from t1;
|
||||
show create table t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`concat(a)` varchar(2) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||
drop table t1, t2;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
select hex(concat(a)) from t1;
|
||||
@@ -4702,19 +4688,6 @@ hex(a)
|
||||
30303030303030303030303030303031303030302E31
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
show columns from v1;
|
||||
Field Type Null Key Default Extra
|
||||
a varchar(2) YES NULL
|
||||
select hex(a) from v1;
|
||||
hex(a)
|
||||
3031
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1 (a year);
|
||||
insert into t1 values (1);
|
||||
create view v1(a) as select concat(a) from t1;
|
||||
|
||||
@@ -6,15 +6,15 @@ connect fail,localhost,u1;
|
||||
ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
|
||||
connect(localhost,uu2,,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect fail,localhost,uu2;
|
||||
ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format
|
||||
ERROR HY000: User 'uu2'@'localhost' has a password in the old format; please change the password to the new format
|
||||
connect(localhost,uu2,password,test,MASTER_PORT,MASTER_SOCKET);
|
||||
connect fail,localhost,uu2,password;
|
||||
ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format
|
||||
ERROR HY000: User 'uu2'@'localhost' has a password in the old format; please change the password to the new format
|
||||
change_user u1,,;
|
||||
ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO)
|
||||
change_user uu2,,;
|
||||
ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format
|
||||
ERROR HY000: User 'uu2'@'localhost' has a password in the old format; please change the password to the new format
|
||||
change_user uu2,password,;
|
||||
ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format
|
||||
ERROR HY000: User 'uu2'@'localhost' has a password in the old format; please change the password to the new format
|
||||
delete from mysql.user where plugin = 'mysql_old_password';
|
||||
flush privileges;
|
||||
|
||||
@@ -45,6 +45,8 @@ select password(NULL);
|
||||
password(NULL)
|
||||
|
||||
set global old_passwords=on;
|
||||
Warnings:
|
||||
Warning 4200 The setting 'old_passwords' is ignored. It only exists for compatibility with old installations and will be removed in a future release
|
||||
select password('');
|
||||
password('')
|
||||
|
||||
@@ -58,20 +60,26 @@ select old_password('idkfa');
|
||||
old_password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
set old_passwords=on;
|
||||
Warnings:
|
||||
Warning 4200 The setting 'old_passwords' is ignored. It only exists for compatibility with old installations and will be removed in a future release
|
||||
select password('idkfa');
|
||||
password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
*B669C9DAC3AA6F2254B03CDEF8DFDD6B2D1054BA
|
||||
select old_password('idkfa');
|
||||
old_password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
set global old_passwords=off;
|
||||
Warnings:
|
||||
Warning 4200 The setting 'old_passwords' is ignored. It only exists for compatibility with old installations and will be removed in a future release
|
||||
select password('idkfa');
|
||||
password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
*B669C9DAC3AA6F2254B03CDEF8DFDD6B2D1054BA
|
||||
select old_password('idkfa');
|
||||
old_password('idkfa')
|
||||
5c078dc54ca0fcca
|
||||
set old_passwords=off;
|
||||
Warnings:
|
||||
Warning 4200 The setting 'old_passwords' is ignored. It only exists for compatibility with old installations and will be removed in a future release
|
||||
select password('idkfa ');
|
||||
password('idkfa ')
|
||||
*2DC31D90647B4C1ABC9231563D2236E96C9A2DB2
|
||||
|
||||
@@ -1,101 +0,0 @@
|
||||
select des_encrypt('hello');
|
||||
des_encrypt('hello')
|
||||
€Ö2nV“Ø}
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
#
|
||||
# Bug #11643: des_encrypt() causes server to die
|
||||
#
|
||||
CREATE TABLE t1 (des VARBINARY(200) NOT NULL DEFAULT '') ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES ('1234'), ('12345'), ('123456'), ('1234567');
|
||||
UPDATE t1 SET des=DES_ENCRYPT('1234');
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
SELECT LENGTH(des) FROM t1;
|
||||
LENGTH(des)
|
||||
9
|
||||
9
|
||||
9
|
||||
9
|
||||
SELECT DES_DECRYPT(des) FROM t1;
|
||||
DES_DECRYPT(des)
|
||||
1234
|
||||
1234
|
||||
1234
|
||||
1234
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
SELECT
|
||||
LENGTH(DES_ENCRYPT('1234')),
|
||||
LENGTH(DES_ENCRYPT('12345')),
|
||||
LENGTH(DES_ENCRYPT('123456')),
|
||||
LENGTH(DES_ENCRYPT('1234567'));
|
||||
LENGTH(DES_ENCRYPT('1234')) LENGTH(DES_ENCRYPT('12345')) LENGTH(DES_ENCRYPT('123456')) LENGTH(DES_ENCRYPT('1234567'))
|
||||
9 9 9 9
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
SELECT
|
||||
DES_DECRYPT(DES_ENCRYPT('1234')),
|
||||
DES_DECRYPT(DES_ENCRYPT('12345')),
|
||||
DES_DECRYPT(DES_ENCRYPT('123456')),
|
||||
DES_DECRYPT(DES_ENCRYPT('1234567'));
|
||||
DES_DECRYPT(DES_ENCRYPT('1234')) DES_DECRYPT(DES_ENCRYPT('12345')) DES_DECRYPT(DES_ENCRYPT('123456')) DES_DECRYPT(DES_ENCRYPT('1234567'))
|
||||
1234 12345 123456 1234567
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# MDEV-23330 Server crash or ASAN negative-size-param in
|
||||
# my_strnncollsp_binary / SORT_FIELD_ATTR::compare_packed_varstrings
|
||||
#
|
||||
CREATE TABLE t1 (a CHAR(240), b BIT(48));
|
||||
INSERT INTO t1 VALUES ('a',b'0001'),('b',b'0010'),('c',b'0011'),('d',b'0100'),('e',b'0001'),('f',b'0101'),('g',b'0110'),('h',b'0111'),('i',b'1000'),('j',b'1001');
|
||||
SELECT DES_DECRYPT(a, 'x'), HEX(BINARY b) FROM t1 GROUP BY 1, 2 WITH ROLLUP;
|
||||
DES_DECRYPT(a, 'x') HEX(BINARY b)
|
||||
a 000000000001
|
||||
a NULL
|
||||
b 000000000002
|
||||
b NULL
|
||||
c 000000000003
|
||||
c NULL
|
||||
d 000000000004
|
||||
d NULL
|
||||
e 000000000001
|
||||
e NULL
|
||||
f 000000000005
|
||||
f NULL
|
||||
g 000000000006
|
||||
g NULL
|
||||
h 000000000007
|
||||
h NULL
|
||||
i 000000000008
|
||||
i NULL
|
||||
j 000000000009
|
||||
j NULL
|
||||
NULL NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT t1 VALUES (1),(2);
|
||||
SELECT CHAR_LENGTH(a), DES_DECRYPT(a) FROM (SELECT _utf8 0xC2A2 AS a FROM t1) AS t2;
|
||||
CHAR_LENGTH(a) DES_DECRYPT(a)
|
||||
1 ¢
|
||||
1 ¢
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
@@ -1,70 +0,0 @@
|
||||
-- source include/have_des.inc
|
||||
#double warning for view protocol
|
||||
--source include/no_view_protocol.inc
|
||||
|
||||
# This test can't be in func_encrypt.test, because it requires
|
||||
# --des-key-file to not be set.
|
||||
|
||||
#
|
||||
# Bug #11643: des_encrypt() causes server to die
|
||||
#
|
||||
select des_encrypt('hello');
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #11643: des_encrypt() causes server to die
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (des VARBINARY(200) NOT NULL DEFAULT '') ENGINE=MyISAM;
|
||||
|
||||
INSERT INTO t1 VALUES ('1234'), ('12345'), ('123456'), ('1234567');
|
||||
|
||||
UPDATE t1 SET des=DES_ENCRYPT('1234');
|
||||
|
||||
SELECT LENGTH(des) FROM t1;
|
||||
SELECT DES_DECRYPT(des) FROM t1;
|
||||
|
||||
SELECT
|
||||
LENGTH(DES_ENCRYPT('1234')),
|
||||
LENGTH(DES_ENCRYPT('12345')),
|
||||
LENGTH(DES_ENCRYPT('123456')),
|
||||
LENGTH(DES_ENCRYPT('1234567'));
|
||||
SELECT
|
||||
DES_DECRYPT(DES_ENCRYPT('1234')),
|
||||
DES_DECRYPT(DES_ENCRYPT('12345')),
|
||||
DES_DECRYPT(DES_ENCRYPT('123456')),
|
||||
DES_DECRYPT(DES_ENCRYPT('1234567'));
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--Echo End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23330 Server crash or ASAN negative-size-param in
|
||||
--echo # my_strnncollsp_binary / SORT_FIELD_ATTR::compare_packed_varstrings
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a CHAR(240), b BIT(48));
|
||||
INSERT INTO t1 VALUES ('a',b'0001'),('b',b'0010'),('c',b'0011'),('d',b'0100'),('e',b'0001'),('f',b'0101'),('g',b'0110'),('h',b'0111'),('i',b'1000'),('j',b'1001');
|
||||
SELECT DES_DECRYPT(a, 'x'), HEX(BINARY b) FROM t1 GROUP BY 1, 2 WITH ROLLUP;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# don't change the charset of a literal Item_string
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT t1 VALUES (1),(2);
|
||||
# There is a problem with cursor-protocol and DES_DECRYPT(),
|
||||
# but DES_DECRYPT has been deprecated from MariaDB 10.10.0,
|
||||
# and will be removed in a future release. That's why this
|
||||
# case is excluded without bug
|
||||
--disable_cursor_protocol
|
||||
SELECT CHAR_LENGTH(a), DES_DECRYPT(a) FROM (SELECT _utf8 0xC2A2 AS a FROM t1) AS t2;
|
||||
--enable_cursor_protocol
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
@@ -1,373 +0,0 @@
|
||||
drop table if exists t1;
|
||||
create table t1 (x blob);
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('a','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','a'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('ab','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','ab'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('abc','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abc'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('abcd','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcd'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('abcde','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcde'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('abcdef','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdef'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('abcdefg','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefg'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('abcdefgh','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefgh'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('abcdefghi','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghi'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('abcdefghij','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghij'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('abcdefghijk','The quick red fox jumped over the lazy brown dog'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghijk'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('quick red fox jumped over the lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('red fox jumped over the lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('fox jumped over the lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('over the lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('the lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('dog!','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('dog!!','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('dog!!!','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('dog!!!!','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('dog!!!!!','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala'));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
select hex(x), hex(des_decrypt(x,'sabakala')) from t1;
|
||||
hex(x) hex(des_decrypt(x,'sabakala'))
|
||||
FFA185A4656D113445E31D7A5B31BB57671A4CA9E21E63FE5D9C801E0CC7AA6190C13E269C2AE8D8060D3FB3FEA94FEC7FB006B9DCAC3E3E41 NULL
|
||||
FFC620C3B84E926A54 NULL
|
||||
FFA4F77D4220A16C980AF7CB576F8DC0A864F357825C16F329F24F66EBA775765B7C1538B90970740F853B556AEBD35AC31B962EA9B12B5AD4 NULL
|
||||
FFACFF5921BB876A90 NULL
|
||||
FFA6F18760E7CC5A4C325244B8486F692AAA11D229AF9ED4E4C9D56D7C0278C0DDA58F73E15E2B5F6C1DDD19B22B8071C454C930585449AAEB NULL
|
||||
FF3736DFEDC4B765F4 NULL
|
||||
FF598681EA5F03CD6D6AEA2B118DF4885DD78BECDFB012BBB05386E436DC403D3CB9DE3BE8D5D3BB7FD90A1F9F9A3E055BB3B4FD3F6A869473 NULL
|
||||
FF15B8B5952D630CAE NULL
|
||||
FF11EE3A400685226B76D5EC567681FA90247CE3C9DBE43341311C22F74562B1199957D80E300737791F6345BBC61AE03F28F52E5A6DCC78B2 NULL
|
||||
FF0A832AE10DC85483 NULL
|
||||
FF6F5C0BF4C5F899B4E7C091D9B1F1E92A7623B651B150CA3E7F420B4DD316D2C1BF76FCF9F9A046C000A9E21C106591E8C1930201B1750269 NULL
|
||||
FFA08D5FB849A9FC90 NULL
|
||||
FFF7331312FE153A39B1EC0D65BC1D3A0B6FCD49DA8C95D6161F53B11D297BAE142BCA6B9492DAE9A02AF455F16CA2C1CF4E1AD17297E947E2 NULL
|
||||
FFDEE60A938478E059 NULL
|
||||
FF95A729E73D5D87416A53055029E8CAA95B4F7B49F3D2D821A95D1FCE70F4B7A3226077176723F3DCC0A44D3B2EE9EFBC4D31AA87C948916C NULL
|
||||
FF1C78557F542A1FDC91943761B2EED14F NULL
|
||||
FF1E35B0775EEE512544A75BDAF58EA1655F5C899D3C5191A47263E2D11C3E688F662AB79F66D3B1DF9C75BD869EB8E04FDAE85719CB573A43 NULL
|
||||
FF1C78557F542A1FDCDC4182B5314185E5 NULL
|
||||
FF783123DCB36F98A51C39A560C92E129F1DDEEAB170825406A61260FBFBBFB0F2E48DB3282588A975C9C71E0EACA71A2B642A8C9C2E921A9F NULL
|
||||
FF1C78557F542A1FDCAC4B1B6B47206306 NULL
|
||||
FF6D9B450837017D06CA1F1C9A0E700D03DEF06A4F954527A961CA805F70320E9F3F0007636B80768A253A5F7ADABC18B78F1A2FA560CC0B21 NULL
|
||||
FF1C78557F542A1FDCE9038BD99DD43F2E NULL
|
||||
FF23FD03BA7548DD0957EBA7A8FBF7A18589762F3913E9A935BDA72F6F28202DC64572E0D633A54EA55BFD2C749E408C8632CCE36A7AE00619 NULL
|
||||
FFD8DD3C4ABCB02FCDFE1383ECC0F61E7D02CD3BA72BBAEA26384D14835796501B3DC9A2F7EC2FC1633BDA6D56464536FE12010049C53A1991 54686520717569636B2072656420666F78206A756D706564206F76657220746865206C617A792062726F776E20646F67
|
||||
FFACC5C5479575CBCA518B05778139B1BFC10F07299C98D04F580BC2F816828722D65A89C1831BD29DA626D319813BD374 717569636B2072656420666F78206A756D706564206F76657220746865206C617A792062726F776E20646F67
|
||||
FF128D5517241DEEC631ABD2A47FA66E57930001417F18204328B0B2CB13F7AD2F50B8336EFAE7DE21 72656420666F78206A756D706564206F76657220746865206C617A792062726F776E20646F67
|
||||
FF7CF971283B4DC2D050B3DB22684737B74B5B1CF12CF2FAC5A5995A298505F56D82BBFB9FC3E70059 666F78206A756D706564206F76657220746865206C617A792062726F776E20646F67
|
||||
FF8333F3DD21E4488F967E03DD12394813A49F72848BB49473D3CB1C8A1AACF220 6A756D706564206F76657220746865206C617A792062726F776E20646F67
|
||||
FFE8CB7FD80E6262C5FEB042A2DCC73B699CEEDCA6DC4458A0 6F76657220746865206C617A792062726F776E20646F67
|
||||
FFA29334D7CDB1B403DF3EB992067DD524C7D568E8D98EBFE5 746865206C617A792062726F776E20646F67
|
||||
FF4F0C5858FE2358D400E38831D5577C85 6C617A792062726F776E20646F67
|
||||
FFB370CD6BAFD1CB95974D21DCCA2DD9D7 62726F776E20646F67
|
||||
FF8F7777B28C7A459A 646F67
|
||||
FF75213A4D7D01D715 646F6721
|
||||
FF2DCAF574B173FB4D 646F672121
|
||||
FFFA775787BE776B15 646F67212121
|
||||
FF3FC2E42D7C840905 646F6721212121
|
||||
FF9723312D26D9E6DA01D01A784A64DB9D 646F672121212121
|
||||
FF8333F3DD21E4488F967E03DD12394813A49F72848BB49473D3CB1C8A1AACF220 6A756D706564206F76657220746865206C617A792062726F776E20646F67
|
||||
FF8333F3DD21E4488F967E03DD12394813A49F72848BB49473D3CB1C8A1AACF220 6A756D706564206F76657220746865206C617A792062726F776E20646F67
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt(x,'sabakala') as s from t1 having s like '%dog%';
|
||||
s
|
||||
The quick red fox jumped over the lazy brown dog
|
||||
quick red fox jumped over the lazy brown dog
|
||||
red fox jumped over the lazy brown dog
|
||||
fox jumped over the lazy brown dog
|
||||
jumped over the lazy brown dog
|
||||
over the lazy brown dog
|
||||
the lazy brown dog
|
||||
lazy brown dog
|
||||
brown dog
|
||||
dog
|
||||
dog!
|
||||
dog!!
|
||||
dog!!!
|
||||
dog!!!!
|
||||
dog!!!!!
|
||||
jumped over the lazy brown dog
|
||||
jumped over the lazy brown dog
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
drop table t1;
|
||||
select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello"));
|
||||
hex(des_encrypt("hello")) des_decrypt(des_encrypt("hello"))
|
||||
85D6DC8859F9759BBB hello
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt(des_encrypt("hello",4));
|
||||
des_decrypt(des_encrypt("hello",4))
|
||||
hello
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt(des_encrypt("hello",'test'),'test');
|
||||
des_decrypt(des_encrypt("hello",'test'),'test')
|
||||
hello
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password'));
|
||||
hex(des_encrypt("hello")) hex(des_encrypt("hello",5)) hex(des_encrypt("hello",'default_password'))
|
||||
85D6DC8859F9759BBB 85D6DC8859F9759BBB FFD6DC8859F9759BBB
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt(des_encrypt("hello"),'default_password');
|
||||
des_decrypt(des_encrypt("hello"),'default_password')
|
||||
hello
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt(des_encrypt("hello",4),'password4');
|
||||
des_decrypt(des_encrypt("hello",4),'password4')
|
||||
hello
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_encrypt("hello",10);
|
||||
des_encrypt("hello",10)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1108 Incorrect parameters to procedure 'des_encrypt'
|
||||
select des_encrypt(NULL);
|
||||
des_encrypt(NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
select des_encrypt(NULL, 10);
|
||||
des_encrypt(NULL, 10)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
select des_encrypt(NULL, NULL);
|
||||
des_encrypt(NULL, NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
select des_encrypt(10, NULL);
|
||||
des_encrypt(10, NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1108 Incorrect parameters to procedure 'des_encrypt'
|
||||
select des_encrypt("hello", NULL);
|
||||
des_encrypt("hello", NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1108 Incorrect parameters to procedure 'des_encrypt'
|
||||
select des_decrypt("hello",10);
|
||||
des_decrypt("hello",10)
|
||||
hello
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt(NULL);
|
||||
des_decrypt(NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt(NULL, 10);
|
||||
des_decrypt(NULL, 10)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt(NULL, NULL);
|
||||
des_decrypt(NULL, NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt(10, NULL);
|
||||
des_decrypt(10, NULL)
|
||||
10
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select des_decrypt("hello", NULL);
|
||||
des_decrypt("hello", NULL)
|
||||
hello
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
SET @a=des_decrypt(des_encrypt("hello"));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
flush des_key_file;
|
||||
select @a = des_decrypt(des_encrypt("hello"));
|
||||
@a = des_decrypt(des_encrypt("hello"))
|
||||
1
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select hex("hello");
|
||||
hex("hello")
|
||||
68656C6C6F
|
||||
select hex(des_decrypt(des_encrypt("hello",4),'password2'));
|
||||
hex(des_decrypt(des_encrypt("hello",4),'password2'))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select hex(des_decrypt(des_encrypt("hello","hidden")));
|
||||
hex(des_decrypt(des_encrypt("hello","hidden")))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1108 Incorrect parameters to procedure 'des_decrypt'
|
||||
explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden"));
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Note 1003 select des_decrypt(des_encrypt('hello',4),'password2') AS `des_decrypt(des_encrypt("hello",4),'password2')`,des_decrypt(des_encrypt('hello','hidden')) AS `des_decrypt(des_encrypt("hello","hidden"))`
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL field
|
||||
#
|
||||
CREATE TABLE t1 (a INT(6) ZEROFILL);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t1 WHERE a=1 AND DES_ENCRYPT('test',a)=_latin1 'abc' COLLATE latin1_bin;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 and des_encrypt('test',`test`.`t1`.`a`) = 'abc'
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-10134 Add full support for DEFAULT
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a VARCHAR(30),
|
||||
b BLOB DEFAULT DES_ENCRYPT(a, 'passwd'),
|
||||
c TEXT DEFAULT DES_DECRYPT(b, 'passwd')
|
||||
);
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` varchar(30) DEFAULT NULL,
|
||||
`b` blob DEFAULT des_encrypt(`a`,'passwd'),
|
||||
`c` text DEFAULT des_decrypt(`b`,'passwd')
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||
INSERT INTO t1 (a) VALUES ('test');
|
||||
SELECT c FROM t1;
|
||||
c
|
||||
test
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
@@ -1,134 +0,0 @@
|
||||
-- source include/have_des.inc
|
||||
#double warning for view protocol
|
||||
--source include/no_view_protocol.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (x blob);
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('a','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','a'));
|
||||
insert into t1 values (des_encrypt('ab','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','ab'));
|
||||
insert into t1 values (des_encrypt('abc','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abc'));
|
||||
insert into t1 values (des_encrypt('abcd','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcd'));
|
||||
insert into t1 values (des_encrypt('abcde','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcde'));
|
||||
insert into t1 values (des_encrypt('abcdef','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdef'));
|
||||
insert into t1 values (des_encrypt('abcdefg','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefg'));
|
||||
insert into t1 values (des_encrypt('abcdefgh','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefgh'));
|
||||
insert into t1 values (des_encrypt('abcdefghi','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghi'));
|
||||
insert into t1 values (des_encrypt('abcdefghij','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghij'));
|
||||
insert into t1 values (des_encrypt('abcdefghijk','The quick red fox jumped over the lazy brown dog'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','abcdefghijk'));
|
||||
insert into t1 values (des_encrypt('The quick red fox jumped over the lazy brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('quick red fox jumped over the lazy brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('red fox jumped over the lazy brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('fox jumped over the lazy brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('over the lazy brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('the lazy brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('lazy brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('dog!','sabakala'));
|
||||
insert into t1 values (des_encrypt('dog!!','sabakala'));
|
||||
insert into t1 values (des_encrypt('dog!!!','sabakala'));
|
||||
insert into t1 values (des_encrypt('dog!!!!','sabakala'));
|
||||
insert into t1 values (des_encrypt('dog!!!!!','sabakala'));
|
||||
insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala'));
|
||||
insert into t1 values (des_encrypt('jumped over the lazy brown dog','sabakala'));
|
||||
select hex(x), hex(des_decrypt(x,'sabakala')) from t1;
|
||||
select des_decrypt(x,'sabakala') as s from t1 having s like '%dog%';
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test default keys
|
||||
#
|
||||
select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello"));
|
||||
select des_decrypt(des_encrypt("hello",4));
|
||||
select des_decrypt(des_encrypt("hello",'test'),'test');
|
||||
select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password'));
|
||||
select des_decrypt(des_encrypt("hello"),'default_password');
|
||||
select des_decrypt(des_encrypt("hello",4),'password4');
|
||||
|
||||
# Test use of invalid parameters
|
||||
select des_encrypt("hello",10);
|
||||
select des_encrypt(NULL);
|
||||
select des_encrypt(NULL, 10);
|
||||
select des_encrypt(NULL, NULL);
|
||||
select des_encrypt(10, NULL);
|
||||
select des_encrypt("hello", NULL);
|
||||
|
||||
select des_decrypt("hello",10);
|
||||
select des_decrypt(NULL);
|
||||
select des_decrypt(NULL, 10);
|
||||
select des_decrypt(NULL, NULL);
|
||||
select des_decrypt(10, NULL);
|
||||
select des_decrypt("hello", NULL);
|
||||
|
||||
|
||||
# Test flush
|
||||
SET @a=des_decrypt(des_encrypt("hello"));
|
||||
flush des_key_file;
|
||||
select @a = des_decrypt(des_encrypt("hello"));
|
||||
|
||||
# Test usage of wrong password
|
||||
select hex("hello");
|
||||
select hex(des_decrypt(des_encrypt("hello",4),'password2'));
|
||||
select hex(des_decrypt(des_encrypt("hello","hidden")));
|
||||
|
||||
explain extended select des_decrypt(des_encrypt("hello",4),'password2'), des_decrypt(des_encrypt("hello","hidden"));
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-8369 Unexpected impossible WHERE for a condition on a ZEROFILL field
|
||||
--echo #
|
||||
CREATE TABLE t1 (a INT(6) ZEROFILL);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
# This should not propagate a=1 into DES_ENCRYPT
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t1 WHERE a=1 AND DES_ENCRYPT('test',a)=_latin1 'abc' COLLATE latin1_bin;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Start of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-10134 Add full support for DEFAULT
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (
|
||||
a VARCHAR(30),
|
||||
b BLOB DEFAULT DES_ENCRYPT(a, 'passwd'),
|
||||
c TEXT DEFAULT DES_DECRYPT(b, 'passwd')
|
||||
);
|
||||
--disable_warnings
|
||||
SHOW CREATE TABLE t1;
|
||||
--enable_warnings
|
||||
INSERT INTO t1 (a) VALUES ('test');
|
||||
SELECT c FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
@@ -1,131 +0,0 @@
|
||||
select des_encrypt("test", 'akeystr');
|
||||
des_encrypt("test", 'akeystr')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_encrypt("test", 1);
|
||||
des_encrypt("test", 1)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_encrypt("test", 9);
|
||||
des_encrypt("test", 9)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_encrypt("test", 100);
|
||||
des_encrypt("test", 100)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_encrypt("test", NULL);
|
||||
des_encrypt("test", NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_encrypt(NULL, NULL);
|
||||
des_encrypt(NULL, NULL)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_decrypt("test", 'anotherkeystr');
|
||||
des_decrypt("test", 'anotherkeystr')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_decrypt(1, 1);
|
||||
des_decrypt(1, 1)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_decrypt(des_encrypt("test", 'thekey'));
|
||||
des_decrypt(des_encrypt("test", 'thekey'))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello"));
|
||||
hex(des_encrypt("hello")) des_decrypt(des_encrypt("hello"))
|
||||
NULL NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_decrypt(des_encrypt("hello",4));
|
||||
des_decrypt(des_encrypt("hello",4))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_decrypt(des_encrypt("hello",'test'),'test');
|
||||
des_decrypt(des_encrypt("hello",'test'),'test')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password'));
|
||||
hex(des_encrypt("hello")) hex(des_encrypt("hello",5)) hex(des_encrypt("hello",'default_password'))
|
||||
NULL NULL NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
Warning 1289 The 'des_encrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_decrypt(des_encrypt("hello"),'default_password');
|
||||
des_decrypt(des_encrypt("hello"),'default_password')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select des_decrypt(des_encrypt("hello",4),'password4');
|
||||
des_decrypt(des_encrypt("hello",4),'password4')
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
SET @a=des_decrypt(des_encrypt("hello"));
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
flush des_key_file;
|
||||
select @a = des_decrypt(des_encrypt("hello"));
|
||||
@a = des_decrypt(des_encrypt("hello"))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
select hex("hello");
|
||||
hex("hello")
|
||||
68656C6C6F
|
||||
select hex(des_decrypt(des_encrypt("hello",4),'password2'));
|
||||
hex(des_decrypt(des_encrypt("hello",4),'password2'))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
select hex(des_decrypt(des_encrypt("hello","hidden")));
|
||||
hex(des_decrypt(des_encrypt("hello","hidden")))
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1289 The 'des_decrypt' feature is disabled; you need MariaDB built with 'openssl des cipher (HAVE_des)' to have it working
|
||||
@@ -1,38 +0,0 @@
|
||||
-- source include/is_embedded.inc
|
||||
|
||||
#
|
||||
# Test output from des_encrypt and des_decrypt when server is
|
||||
# compiled without openssl support
|
||||
#
|
||||
select des_encrypt("test", 'akeystr');
|
||||
select des_encrypt("test", 1);
|
||||
select des_encrypt("test", 9);
|
||||
select des_encrypt("test", 100);
|
||||
select des_encrypt("test", NULL);
|
||||
select des_encrypt(NULL, NULL);
|
||||
select des_decrypt("test", 'anotherkeystr');
|
||||
select des_decrypt(1, 1);
|
||||
select des_decrypt(des_encrypt("test", 'thekey'));
|
||||
|
||||
|
||||
#
|
||||
# Test default keys
|
||||
#
|
||||
select hex(des_encrypt("hello")),des_decrypt(des_encrypt("hello"));
|
||||
select des_decrypt(des_encrypt("hello",4));
|
||||
select des_decrypt(des_encrypt("hello",'test'),'test');
|
||||
select hex(des_encrypt("hello")),hex(des_encrypt("hello",5)),hex(des_encrypt("hello",'default_password'));
|
||||
select des_decrypt(des_encrypt("hello"),'default_password');
|
||||
select des_decrypt(des_encrypt("hello",4),'password4');
|
||||
|
||||
# Test flush
|
||||
SET @a=des_decrypt(des_encrypt("hello"));
|
||||
flush des_key_file;
|
||||
select @a = des_decrypt(des_encrypt("hello"));
|
||||
|
||||
# Test usage of wrong password
|
||||
select hex("hello");
|
||||
select hex(des_decrypt(des_encrypt("hello",4),'password2'));
|
||||
select hex(des_decrypt(des_encrypt("hello","hidden")));
|
||||
|
||||
# End of 4.1 tests
|
||||
@@ -1,25 +0,0 @@
|
||||
#
|
||||
# Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
|
||||
#
|
||||
SELECT CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)));
|
||||
CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)))
|
||||
9
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
SELECT CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED);
|
||||
CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED)
|
||||
0
|
||||
Warnings:
|
||||
Warning 1287 'des_encrypt' is deprecated and will be removed in a future release
|
||||
Warning 1292 Truncated incorrect INTEGER value: '\xFFT\xDCiK\x92j\xE6\xFC'
|
||||
SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2))) as a;
|
||||
a
|
||||
4
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED) as a;
|
||||
a
|
||||
0
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'test'
|
||||
@@ -1,16 +0,0 @@
|
||||
-- source include/have_des.inc
|
||||
-- source include/have_ucs2.inc
|
||||
#double warning for view protocol
|
||||
--source include/no_view_protocol.inc
|
||||
|
||||
--echo #
|
||||
--echo # Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
|
||||
--echo #
|
||||
|
||||
SELECT CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)));
|
||||
SELECT CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED);
|
||||
|
||||
--disable_view_protocol
|
||||
SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2))) as a;
|
||||
SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED) as a;
|
||||
--enable_view_protocol
|
||||
@@ -1530,6 +1530,9 @@ DROP TABLE t1;
|
||||
#
|
||||
# Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
|
||||
#
|
||||
set old_mode=2_DIGIT_YEAR;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table t1 (f1 year(2), f2 year(4), f3 date, f4 datetime);
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
@@ -1775,6 +1778,7 @@ f1 f2 f3 f4 f1 = f2
|
||||
NULL NULL NULL NULL NULL
|
||||
71 1971 1971-01-01 1971-11-11 22:22:22 1
|
||||
drop table t1;
|
||||
set old_mode=DEFAULT;
|
||||
#
|
||||
# Bug #54465: assert: field_types == 0 || field_types[field_pos] ==
|
||||
# MYSQL_TYPE_LONGLONG
|
||||
|
||||
@@ -1069,6 +1069,7 @@ DROP TABLE t1;
|
||||
--echo #
|
||||
--echo # Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
|
||||
--echo #
|
||||
set old_mode=2_DIGIT_YEAR;
|
||||
--enable_prepare_warnings
|
||||
create table t1 (f1 year(2), f2 year(4), f3 date, f4 datetime);
|
||||
--disable_prepare_warnings
|
||||
@@ -1098,6 +1099,7 @@ select a.f1 as a, b.f4 as b, a.f1 > b.f4 as gt,
|
||||
from t1 a, t1 b;
|
||||
select *, f1 = f2 from t1;
|
||||
drop table t1;
|
||||
set old_mode=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # Bug #54465: assert: field_types == 0 || field_types[field_pos] ==
|
||||
|
||||
@@ -1109,8 +1109,8 @@ ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)))
|
||||
# BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN
|
||||
# GEOMETRY FUNCTION ARGUMENTS
|
||||
#
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
|
||||
ERROR HY000: Illegal parameter data type bigint for operation 'geometrycollection'
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD_MODE));
|
||||
ERROR HY000: Illegal parameter data type varchar for operation 'geometrycollection'
|
||||
#
|
||||
# MDEV-4252 geometry query crashes server
|
||||
#
|
||||
|
||||
@@ -844,7 +844,7 @@ SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)));
|
||||
--echo #
|
||||
--replace_regex /non geometric .* value/non geometric '' value/
|
||||
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD_MODE));
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-4252 geometry query crashes server
|
||||
|
||||
@@ -348,6 +348,8 @@ create user u7@h identified with 'mysql_old_password';
|
||||
set password for u7@h = 'pwd';
|
||||
ERROR HY000: Password hash should be a 41-digit hexadecimal number
|
||||
set password for u7@h = old_password('pwd');
|
||||
Warnings:
|
||||
Warning 1287 'OLD_PASSWORD()' is deprecated and will be removed in a future release. Please use 'PASSWORD()' instead
|
||||
create user u8@h identified with 'mysql_old_password';
|
||||
set password for u8@h = '78a302dd267f6044';
|
||||
select user as User,host as Host,plugin,authentication_string from mysql.user where host='h';
|
||||
|
||||
@@ -308,7 +308,9 @@ eval create user u6@h identified with 'mysql_old_password' using '$p';
|
||||
create user u7@h identified with 'mysql_old_password';
|
||||
error ER_PASSWD_LENGTH;
|
||||
set password for u7@h = 'pwd';
|
||||
--enable_prepare_warnings
|
||||
set password for u7@h = old_password('pwd');
|
||||
--disable_prepare_warnings
|
||||
create user u8@h identified with 'mysql_old_password';
|
||||
eval set password for u8@h = '$p';
|
||||
sorted_result;
|
||||
|
||||
@@ -479,8 +479,7 @@ The following specify which files/extra groups are read (specified before remain
|
||||
while even numbers are used for linked buffers
|
||||
--keep-files-on-create
|
||||
Don't overwrite stale .MYD and .MYI even if no directory
|
||||
is specified. Deprecated, will be removed in a future
|
||||
release.
|
||||
is specified
|
||||
--key-buffer-size=# The size of the buffer used for index blocks for MyISAM
|
||||
tables. Increase this to get faster index handling
|
||||
--key-cache-age-threshold=#
|
||||
@@ -863,19 +862,15 @@ The following specify which files/extra groups are read (specified before remain
|
||||
Verbosity level for note-warnings given to the user. See
|
||||
also @@sql_notes. Any combination of: basic,
|
||||
unusable_keys, explain, or ALL to set all combinations
|
||||
--old Use compatible behavior from previous MariaDB version.
|
||||
Deprecated, will be removed in a future release. Please
|
||||
use --old-mode instead.
|
||||
--old-mode=name Used to emulate old behavior from earlier MariaDB or
|
||||
MySQL versions. Any combination of:
|
||||
NO_DUP_KEY_WARNINGS_WITH_IGNORE, NO_PROGRESS_INFO,
|
||||
ZERO_DATE_TIME_CAST, UTF8_IS_UTF8MB3,
|
||||
IGNORE_INDEX_ONLY_FOR_JOIN, COMPAT_5_1_CHECKSUM,
|
||||
NO_NULL_COLLATION_IDS, LOCK_ALTER_TABLE_COPY,
|
||||
OLD_FLUSH_STATUS, SESSION_USER_IS_USER, or ALL to set all
|
||||
combinations
|
||||
--old-passwords Use old password encryption method (needed for 4.0 and
|
||||
older clients)
|
||||
OLD_FLUSH_STATUS, SESSION_USER_IS_USER, 2_DIGIT_YEAR, or
|
||||
ALL to set all combinations
|
||||
--old-passwords Unused. Deprecated, will be removed in a future release.
|
||||
--old-style-user-limits
|
||||
Enable old-style user limits (before 5.0.3, user
|
||||
resources were counted per each user+host vs. per
|
||||
@@ -1400,10 +1395,6 @@ The following specify which files/extra groups are read (specified before remain
|
||||
be removed in a future release.
|
||||
--safe-user-create Don't allow new user creation by the user who has no
|
||||
write privileges to the mysql.user table
|
||||
--secure-auth Disallow authentication for accounts that have old
|
||||
(pre-4.1) passwords. Deprecated, will be removed in a
|
||||
future release.
|
||||
(Defaults to on; use --skip-secure-auth to disable.)
|
||||
--secure-file-priv=name
|
||||
Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to
|
||||
files within specified directory
|
||||
@@ -1977,7 +1968,6 @@ net-retry-count 10
|
||||
net-write-timeout 60
|
||||
new-mode
|
||||
note-verbosity basic,explain
|
||||
old FALSE
|
||||
old-mode UTF8_IS_UTF8MB3
|
||||
old-passwords FALSE
|
||||
old-style-user-limits FALSE
|
||||
@@ -2113,7 +2103,6 @@ rpl-semi-sync-slave-enabled FALSE
|
||||
rpl-semi-sync-slave-kill-conn-timeout 5
|
||||
rpl-semi-sync-slave-trace-level 32
|
||||
safe-user-create FALSE
|
||||
secure-auth TRUE
|
||||
secure-file-priv (No default value)
|
||||
secure-timestamp NO
|
||||
server-id 1
|
||||
|
||||
@@ -440,6 +440,9 @@ NOT NOT NULLIF(2,3)
|
||||
#
|
||||
# MDEV-7146 NULLIF returns unexpected result with a YEAR field
|
||||
#
|
||||
set old_mode=2_DIGIT_YEAR;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1 (a YEAR(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
@@ -451,6 +454,7 @@ SELECT a,NULLIF(a,2001),NULLIF(2001,a) FROM t1;
|
||||
a NULLIF(a,2001) NULLIF(2001,a)
|
||||
00 0 2001
|
||||
DROP TABLE t1;
|
||||
set old_mode=DEFAULT;
|
||||
#
|
||||
# MDEV-7005 NULLIF does not work as documented
|
||||
#
|
||||
|
||||
@@ -317,6 +317,7 @@ SELECT NOT NOT NULLIF(2,3);
|
||||
--echo #
|
||||
--echo # MDEV-7146 NULLIF returns unexpected result with a YEAR field
|
||||
--echo #
|
||||
set old_mode=2_DIGIT_YEAR;
|
||||
--enable_prepare_warnings
|
||||
CREATE TABLE t1 (a YEAR(2));
|
||||
--disable_prepare_warnings
|
||||
@@ -327,6 +328,7 @@ SELECT a,NULLIF(a,2000),NULLIF(2000,a) FROM t1;
|
||||
SELECT a,NULLIF(a,2001),NULLIF(2001,a) FROM t1;
|
||||
--enable_cursor_protocol
|
||||
DROP TABLE t1;
|
||||
set old_mode=DEFAULT;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-7005 NULLIF does not work as documented
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
--old=1
|
||||
@@ -1,3 +1,6 @@
|
||||
set old_mode=COMPAT_5_1_CHECKSUM;
|
||||
Warnings:
|
||||
Warning 1287 'COMPAT_5_1_CHECKSUM' is deprecated and will be removed in a future release
|
||||
create table t1 (a int, b varchar(200), c text not null) checksum=1;
|
||||
create table t2 (a int, b varchar(200), c text not null) checksum=0;
|
||||
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
|
||||
@@ -15,6 +18,9 @@ Table Checksum
|
||||
test.t1 2948697075
|
||||
test.t2 2948697075
|
||||
drop table t1,t2;
|
||||
set old_mode=NO_PROGRESS_INFO;
|
||||
Warnings:
|
||||
Warning 1287 'NO_PROGRESS_INFO' is deprecated and will be removed in a future release
|
||||
SHOW PROCESSLIST;
|
||||
Id User Host db Command Time State Info
|
||||
<Id> root <Host> test Query <Time> <State> SHOW PROCESSLIST
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Test 'old' mode
|
||||
#
|
||||
|
||||
set old_mode=COMPAT_5_1_CHECKSUM;
|
||||
create table t1 (a int, b varchar(200), c text not null) checksum=1;
|
||||
create table t2 (a int, b varchar(200), c text not null) checksum=0;
|
||||
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
|
||||
@@ -17,6 +18,7 @@ drop table t1,t2;
|
||||
let $count_sessions= 1;
|
||||
source include/wait_until_count_sessions.inc;
|
||||
|
||||
set old_mode=NO_PROGRESS_INFO;
|
||||
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
|
||||
# Embedded server is hardcoded to show "Writing to net" as STATE.
|
||||
# ps-protocol will have Execute not Query
|
||||
|
||||
@@ -387,10 +387,6 @@ select encrypt();
|
||||
ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
|
||||
select encrypt(1, 2, 3);
|
||||
ERROR 42000: Incorrect parameter count in the call to native function 'encrypt'
|
||||
select des_encrypt("p1", "p2", "not expected");
|
||||
ERROR 42000: Incorrect parameter count in the call to native function 'des_encrypt'
|
||||
select des_decrypt("p1", "p2", "not expected");
|
||||
ERROR 42000: Incorrect parameter count in the call to native function 'des_decrypt'
|
||||
select elt();
|
||||
ERROR 42000: Incorrect parameter count in the call to native function 'elt'
|
||||
select elt(1);
|
||||
|
||||
@@ -490,11 +490,6 @@ select encrypt();
|
||||
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
|
||||
select encrypt(1, 2, 3);
|
||||
|
||||
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
|
||||
select des_encrypt("p1", "p2", "not expected");
|
||||
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
|
||||
select des_decrypt("p1", "p2", "not expected");
|
||||
|
||||
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
|
||||
select elt();
|
||||
-- error ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT
|
||||
|
||||
@@ -122,8 +122,8 @@ select @@global.example_ulong_var;
|
||||
@@global.example_ulong_var
|
||||
500
|
||||
set session sql_mode=@old_sql_mode;
|
||||
set session old=bla;
|
||||
ERROR 42000: Variable 'old' can't be set to the value of 'bla'
|
||||
set session old_mode=bla;
|
||||
ERROR 42000: Variable 'old_mode' can't be set to the value of 'bla'
|
||||
#legal values
|
||||
CREATE TABLE t1 ( a int complex='c,f,f,f' ) ENGINE=example ULL=10000 STR='dskj' one_or_two='one' YESNO=0;
|
||||
show create table t1;
|
||||
|
||||
@@ -117,7 +117,7 @@ set session sql_mode=@old_sql_mode;
|
||||
# finally, show that conditions that already raised an error are not
|
||||
# adversely affected (error was already sent, do nothing)
|
||||
--error ER_WRONG_VALUE_FOR_VAR
|
||||
set session old=bla;
|
||||
set session old_mode=bla;
|
||||
|
||||
###############################################################
|
||||
# engine-specific clauses in the CREATE TABLE:
|
||||
|
||||
@@ -2292,22 +2292,6 @@ drop function func_1;
|
||||
drop procedure proc_1;
|
||||
prepare abc from "flush master";
|
||||
deallocate prepare abc;
|
||||
create procedure proc_1() flush des_key_file;
|
||||
call proc_1();
|
||||
call proc_1();
|
||||
call proc_1();
|
||||
create function func_1() returns int begin flush des_key_file; return 1; end|
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||
select func_1(), func_1(), func_1() from dual;
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
drop function func_1;
|
||||
drop procedure proc_1;
|
||||
prepare abc from "flush des_key_file";
|
||||
execute abc;
|
||||
execute abc;
|
||||
execute abc;
|
||||
deallocate prepare abc;
|
||||
create procedure proc_1() flush user_resources;
|
||||
call proc_1();
|
||||
call proc_1();
|
||||
|
||||
@@ -2377,26 +2377,6 @@ prepare abc from "flush master";
|
||||
deallocate prepare abc;
|
||||
|
||||
|
||||
create procedure proc_1() flush des_key_file;
|
||||
call proc_1();
|
||||
call proc_1();
|
||||
call proc_1();
|
||||
delimiter |;
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
create function func_1() returns int begin flush des_key_file; return 1; end|
|
||||
create function func_1() returns int begin call proc_1(); return 1; end|
|
||||
delimiter ;|
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
select func_1(), func_1(), func_1() from dual;
|
||||
drop function func_1;
|
||||
drop procedure proc_1;
|
||||
prepare abc from "flush des_key_file";
|
||||
execute abc;
|
||||
execute abc;
|
||||
execute abc;
|
||||
deallocate prepare abc;
|
||||
|
||||
|
||||
create procedure proc_1() flush user_resources;
|
||||
call proc_1();
|
||||
call proc_1();
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
--old
|
||||
--old-mode=COMPAT_5_1_CHECKSUM
|
||||
--loose-innodb-strict-mode=0
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
set global secure_auth=0;
|
||||
Warnings:
|
||||
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
|
||||
create user natauth@localhost identified via 'mysql_native_password' using '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
|
||||
create user invalidauth@localhost identified via 'mysql_native_password' using 'invalid';
|
||||
create user newpass@localhost identified by password '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
|
||||
@@ -42,21 +39,9 @@ select current_user();
|
||||
current_user()
|
||||
newpassnat@localhost
|
||||
disconnect con;
|
||||
connect(localhost,oldauth,test,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect con,localhost,oldauth,test,,,,auth=mysql_old_password:mysql_native_password;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpass,test,,,,auth=mysql_old_password:mysql_native_password;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpassold,test,,,,auth=mysql_old_password:mysql_native_password;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpassold@localhost
|
||||
disconnect con;
|
||||
ERROR HY000: User 'oldauth'@'localhost' has a password in the old format; please change the password to the new format
|
||||
connection default;
|
||||
flush privileges;
|
||||
connect con,localhost,natauth,test,;
|
||||
@@ -74,21 +59,9 @@ select current_user();
|
||||
current_user()
|
||||
newpassnat@localhost
|
||||
disconnect con;
|
||||
connect(localhost,oldauth,test,test,MASTER_MYPORT,MASTER_MYSOCK);
|
||||
connect con,localhost,oldauth,test,,,,auth=mysql_old_password:mysql_native_password;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldauth@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpass,test,,,,auth=mysql_old_password:mysql_native_password;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpass@localhost
|
||||
disconnect con;
|
||||
connect con,localhost,oldpassold,test,,,,auth=mysql_old_password:mysql_native_password;
|
||||
select current_user();
|
||||
current_user()
|
||||
oldpassold@localhost
|
||||
disconnect con;
|
||||
ERROR HY000: User 'oldauth'@'localhost' has a password in the old format; please change the password to the new format
|
||||
connection default;
|
||||
set password for natauth@localhost = PASSWORD('test2');
|
||||
set password for newpass@localhost = PASSWORD('test2');
|
||||
@@ -187,9 +160,6 @@ connection default;
|
||||
drop user natauth@localhost, newpass@localhost, newpassnat@localhost;
|
||||
drop user invalidauth@localhost, invalidpass@localhost, invalidpassnat@localhost,invalidmysql57auth@localhost;
|
||||
drop user oldauth@localhost, oldpass@localhost, oldpassold@localhost;
|
||||
set global secure_auth=default;
|
||||
Warnings:
|
||||
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
|
||||
# switching from mysql.global_priv to mysql.user
|
||||
create user foo@localhost identified with mysql_native_password;
|
||||
update mysql.user set authentication_string=password('foo'), plugin='mysql_native_password' where user='foo' and host='localhost';
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
--enable_connect_log
|
||||
|
||||
set global secure_auth=0;
|
||||
|
||||
# The hash (old and new) is for 'test'
|
||||
create user natauth@localhost identified via 'mysql_native_password' using '*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29';
|
||||
|
||||
@@ -47,15 +45,9 @@ select current_user();
|
||||
--connect(con,localhost,newpassnat,test,)
|
||||
select current_user();
|
||||
--disconnect con
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK $MASTER_MYPORT MASTER_MYPORT
|
||||
--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
|
||||
--connect(con,localhost,oldauth,test,,,,auth=mysql_old_password:mysql_native_password)
|
||||
select current_user();
|
||||
--disconnect con
|
||||
--connect(con,localhost,oldpass,test,,,,auth=mysql_old_password:mysql_native_password)
|
||||
select current_user();
|
||||
--disconnect con
|
||||
--connect(con,localhost,oldpassold,test,,,,auth=mysql_old_password:mysql_native_password)
|
||||
select current_user();
|
||||
--disconnect con
|
||||
|
||||
--connection default
|
||||
|
||||
@@ -70,15 +62,9 @@ select current_user();
|
||||
--connect(con,localhost,newpassnat,test,)
|
||||
select current_user();
|
||||
--disconnect con
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK $MASTER_MYPORT MASTER_MYPORT
|
||||
--error ER_SERVER_IS_IN_SECURE_AUTH_MODE
|
||||
--connect(con,localhost,oldauth,test,,,,auth=mysql_old_password:mysql_native_password)
|
||||
select current_user();
|
||||
--disconnect con
|
||||
--connect(con,localhost,oldpass,test,,,,auth=mysql_old_password:mysql_native_password)
|
||||
select current_user();
|
||||
--disconnect con
|
||||
--connect(con,localhost,oldpassold,test,,,,auth=mysql_old_password:mysql_native_password)
|
||||
select current_user();
|
||||
--disconnect con
|
||||
|
||||
--connection default
|
||||
|
||||
@@ -153,7 +139,6 @@ select current_user();
|
||||
drop user natauth@localhost, newpass@localhost, newpassnat@localhost;
|
||||
drop user invalidauth@localhost, invalidpass@localhost, invalidpassnat@localhost,invalidmysql57auth@localhost;
|
||||
drop user oldauth@localhost, oldpass@localhost, oldpassold@localhost;
|
||||
set global secure_auth=default;
|
||||
|
||||
#
|
||||
# MDEV-16238 root/localhost authn prioritizes authentication_string over Password
|
||||
|
||||
@@ -1,30 +1,20 @@
|
||||
'# SET STATEMENT ..... FOR .... TEST'
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP FUNCTION IF EXISTS myProc;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
DROP PROCEDURE IF EXISTS p2;
|
||||
DROP PROCEDURE IF EXISTS p3;
|
||||
DROP PROCEDURE IF EXISTS p4;
|
||||
DROP PROCEDURE IF EXISTS p5;
|
||||
DROP PROCEDURE IF EXISTS p6;
|
||||
DROP VIEW IF EXISTS v1;
|
||||
DROP TABLE IF EXISTS STATEMENT;
|
||||
# SET STATEMENT ..... FOR .... TEST
|
||||
SET @save_binlog_format = @@binlog_format;
|
||||
SET @save_keep_files_on_create = @@keep_files_on_create;
|
||||
SET @save_max_join_size = @@max_join_size;
|
||||
SET @save_myisam_repair_threads = @@myisam_repair_threads;
|
||||
SET @save_myisam_sort_buffer_size = @@myisam_sort_buffer_size;
|
||||
SET @save_sort_buffer_size = @@sort_buffer_size;
|
||||
'# Setup database'
|
||||
# Setup database
|
||||
CREATE TABLE t1 (v1 INT, v2 INT);
|
||||
INSERT INTO t1 VALUES (1,2);
|
||||
INSERT INTO t1 VALUES (3,4);
|
||||
''
|
||||
'#------------------ STATEMENT Test 1 -----------------------#'
|
||||
'# Initialize variables to known setting'
|
||||
|
||||
#------------------ STATEMENT Test 1 -----------------------#
|
||||
# Initialize variables to known setting
|
||||
SET SESSION sort_buffer_size=100000;
|
||||
''
|
||||
'# Pre-STATEMENT variable value'
|
||||
|
||||
# Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
Variable_name Value
|
||||
sort_buffer_size 100000
|
||||
@@ -32,17 +22,17 @@ SET STATEMENT sort_buffer_size=150000 FOR SELECT *,@@sort_buffer_size FROM t1;
|
||||
v1 v2 @@sort_buffer_size
|
||||
1 2 150000
|
||||
3 4 150000
|
||||
''
|
||||
'# Post-STATEMENT variable value'
|
||||
|
||||
# Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
Variable_name Value
|
||||
sort_buffer_size 100000
|
||||
''
|
||||
'#------------------ STATEMENT Test 2 -----------------------#'
|
||||
'# Initialize variables to known setting'
|
||||
|
||||
#------------------ STATEMENT Test 2 -----------------------#
|
||||
# Initialize variables to known setting
|
||||
SET SESSION binlog_format=mixed;
|
||||
SET SESSION sort_buffer_size=100000;
|
||||
'# Pre-STATEMENT variable value'
|
||||
# Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
Variable_name Value
|
||||
sort_buffer_size 100000
|
||||
@@ -54,135 +44,128 @@ FOR SELECT *,@@sort_buffer_size,@@binlog_format FROM t1;
|
||||
v1 v2 @@sort_buffer_size @@binlog_format
|
||||
1 2 150000 ROW
|
||||
3 4 150000 ROW
|
||||
'# Post-STATEMENT variable value'
|
||||
# Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
Variable_name Value
|
||||
sort_buffer_size 100000
|
||||
SHOW SESSION VARIABLES LIKE 'binlog_format';
|
||||
Variable_name Value
|
||||
binlog_format MIXED
|
||||
''
|
||||
'#------------------ STATEMENT Test 3 -----------------------#'
|
||||
|
||||
#------------------ STATEMENT Test 3 -----------------------#
|
||||
'# set initial variable value, make prepared statement
|
||||
SET SESSION binlog_format=row;
|
||||
PREPARE stmt1 FROM 'SET STATEMENT binlog_format=row FOR SELECT *,@@binlog_format FROM t1';
|
||||
''
|
||||
'# Change variable setting'
|
||||
|
||||
# Change variable setting
|
||||
SET SESSION binlog_format=mixed;
|
||||
''
|
||||
'# Pre-STATEMENT variable value'
|
||||
''
|
||||
|
||||
# Pre-STATEMENT variable value
|
||||
|
||||
SHOW SESSION VARIABLES LIKE 'binlog_format';
|
||||
Variable_name Value
|
||||
binlog_format MIXED
|
||||
''
|
||||
|
||||
EXECUTE stmt1;
|
||||
v1 v2 @@binlog_format
|
||||
1 2 ROW
|
||||
3 4 ROW
|
||||
''
|
||||
'# Post-STATEMENT variable value'
|
||||
|
||||
# Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'binlog_format';
|
||||
Variable_name Value
|
||||
binlog_format MIXED
|
||||
''
|
||||
|
||||
DEALLOCATE PREPARE stmt1;
|
||||
'#------------------ STATEMENT Test 4 -----------------------#'
|
||||
#------------------ STATEMENT Test 4 -----------------------#
|
||||
'# set initial variable value, make prepared statement
|
||||
SET SESSION myisam_sort_buffer_size=500000, myisam_repair_threads=1;
|
||||
''
|
||||
'# Pre-STATEMENT variable value'
|
||||
|
||||
# Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_sort_buffer_size';
|
||||
Variable_name Value
|
||||
myisam_sort_buffer_size 500000
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_repair_threads';
|
||||
Variable_name Value
|
||||
myisam_repair_threads 1
|
||||
''
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=800000,
|
||||
myisam_repair_threads=2 FOR OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
''
|
||||
'# Post-STATEMENT variable value'
|
||||
|
||||
# Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_sort_buffer_size';
|
||||
Variable_name Value
|
||||
myisam_sort_buffer_size 500000
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_repair_threads';
|
||||
Variable_name Value
|
||||
myisam_repair_threads 1
|
||||
''
|
||||
'#------------------ STATEMENT Test 5 -----------------------#'
|
||||
'# Initialize variables to known setting'
|
||||
|
||||
#------------------ STATEMENT Test 5 -----------------------#
|
||||
# Initialize variables to known setting
|
||||
SET SESSION sort_buffer_size=100000;
|
||||
''
|
||||
'# Pre-STATEMENT variable value'
|
||||
|
||||
# Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
Variable_name Value
|
||||
sort_buffer_size 100000
|
||||
''
|
||||
|
||||
SET STATEMENT sort_buffer_size=150000 FOR SELECT * FROM t2;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
''
|
||||
'# Post-STATEMENT variable value'
|
||||
|
||||
# Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
Variable_name Value
|
||||
sort_buffer_size 100000
|
||||
''
|
||||
'#------------------ STATEMENT Test 6 -----------------------#'
|
||||
'# Initialize variables to known setting'
|
||||
|
||||
#------------------ STATEMENT Test 6 -----------------------#
|
||||
# Initialize variables to known setting
|
||||
SET SESSION keep_files_on_create=ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
'# Pre-STATEMENT variable value'
|
||||
|
||||
# Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
Variable_name Value
|
||||
keep_files_on_create ON
|
||||
''
|
||||
|
||||
SET STATEMENT keep_files_on_create=OFF FOR SELECT *,@@keep_files_on_create FROM t1;
|
||||
v1 v2 @@keep_files_on_create
|
||||
1 2 0
|
||||
3 4 0
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
'# Post-STATEMENT variable value'
|
||||
|
||||
# Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
Variable_name Value
|
||||
keep_files_on_create ON
|
||||
''
|
||||
'#------------------ STATEMENT Test 7 -----------------------#'
|
||||
'# Initialize variables to known setting'
|
||||
|
||||
#------------------ STATEMENT Test 7 -----------------------#
|
||||
# Initialize variables to known setting
|
||||
SET SESSION max_join_size=2222220000000;
|
||||
''
|
||||
'# Pre-STATEMENT variable value'
|
||||
|
||||
# Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'max_join_size';
|
||||
Variable_name Value
|
||||
max_join_size 2222220000000
|
||||
''
|
||||
|
||||
SET STATEMENT max_join_size=1000000000000 FOR SELECT *,@@max_join_size FROM t1;
|
||||
v1 v2 @@max_join_size
|
||||
1 2 1000000000000
|
||||
3 4 1000000000000
|
||||
''
|
||||
'# Post-STATEMENT variable value'
|
||||
|
||||
# Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'max_join_size';
|
||||
Variable_name Value
|
||||
max_join_size 2222220000000
|
||||
''
|
||||
'#------------------Test 8-----------------------#'
|
||||
'# Initialize test variables'
|
||||
|
||||
#------------------Test 8-----------------------#
|
||||
# Initialize test variables
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
sort_buffer_size = 200000,
|
||||
max_join_size=2222220000000,
|
||||
keep_files_on_create=ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
'# LONG '
|
||||
|
||||
# LONG
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
Variable_name Value
|
||||
sort_buffer_size 200000
|
||||
@@ -193,8 +176,8 @@ sort_buffer_size 100000
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
Variable_name Value
|
||||
sort_buffer_size 200000
|
||||
''
|
||||
'# MY_BOOL '
|
||||
|
||||
# MY_BOOL
|
||||
SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
Variable_name Value
|
||||
keep_files_on_create ON
|
||||
@@ -202,14 +185,11 @@ SET STATEMENT keep_files_on_create=OFF
|
||||
FOR SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
Variable_name Value
|
||||
keep_files_on_create OFF
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
Variable_name Value
|
||||
keep_files_on_create ON
|
||||
''
|
||||
'# INT/LONG '
|
||||
|
||||
# INT/LONG
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_repair_threads';
|
||||
Variable_name Value
|
||||
myisam_repair_threads 1
|
||||
@@ -220,8 +200,8 @@ myisam_repair_threads 2
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_repair_threads';
|
||||
Variable_name Value
|
||||
myisam_repair_threads 1
|
||||
''
|
||||
'# ULONGLONG '
|
||||
|
||||
# ULONGLONG
|
||||
SHOW SESSION VARIABLES LIKE 'max_join_size';
|
||||
Variable_name Value
|
||||
max_join_size 2222220000000
|
||||
@@ -232,8 +212,8 @@ max_join_size 2000000000000
|
||||
SHOW SESSION VARIABLES LIKE 'max_join_size';
|
||||
Variable_name Value
|
||||
max_join_size 2222220000000
|
||||
''
|
||||
'#------------------Test 9-----------------------#'
|
||||
|
||||
#------------------Test 9-----------------------#
|
||||
'# set initial variable values
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
@@ -241,10 +221,8 @@ sort_buffer_size=100000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
'# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -254,8 +232,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
CREATE FUNCTION myProc (cost DECIMAL(10,2))
|
||||
RETURNS DECIMAL(10,2)
|
||||
SQL SECURITY DEFINER
|
||||
@@ -264,7 +242,7 @@ DECLARE order_tax DECIMAL(10,2);
|
||||
SET order_tax = cost * .05 + @@sort_buffer_size;
|
||||
RETURN order_tax;
|
||||
END|
|
||||
''
|
||||
|
||||
'# During Execution values
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
@@ -275,9 +253,6 @@ max_join_size=4444440000000 FOR
|
||||
SELECT myProc(123.45);
|
||||
myProc(123.45)
|
||||
200006.17
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=300000,
|
||||
@@ -287,11 +262,8 @@ max_join_size=4444440000000 FOR
|
||||
SELECT myProc(123.45);
|
||||
myProc(123.45)
|
||||
300006.17
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
'# Post-STATEMENT No 1 variable value Pre-STATEMENT for No 2'
|
||||
|
||||
# Post-STATEMENT No 1 variable value Pre-STATEMENT for No 2
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@sort_buffer_size,
|
||||
@@ -300,7 +272,7 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -308,10 +280,7 @@ binlog_format=row,
|
||||
keep_files_on_create=OFF,
|
||||
max_join_size=4444440000000 FOR
|
||||
DROP FUNCTION myProc;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Post-STATEMENT No 2 variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -321,8 +290,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
'#------------------Test 11-----------------------#'
|
||||
|
||||
#------------------Test 11-----------------------#
|
||||
'# set initial variable values
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
@@ -330,10 +299,8 @@ sort_buffer_size=100000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
'# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -343,8 +310,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -352,11 +319,8 @@ keep_files_on_create=OFF,
|
||||
max_join_size=4444440000000 FOR
|
||||
PREPARE stmt1 FROM
|
||||
'SET STATEMENT binlog_format=row FOR SELECT *,@@binlog_format,@@sort_buffer_size FROM t1';
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
'Test No 1 Post Value & Test 2 Pre values'
|
||||
|
||||
Test No 1 Post Value & Test 2 Pre values
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@sort_buffer_size,
|
||||
@@ -365,8 +329,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -376,10 +340,7 @@ EXECUTE stmt1;
|
||||
v1 v2 @@binlog_format @@sort_buffer_size
|
||||
1 2 ROW 200000
|
||||
3 4 ROW 200000
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Post-STATEMENT No 2
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -389,9 +350,9 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
'#------------------Test 12-----------------------#'
|
||||
|
||||
|
||||
#------------------Test 12-----------------------#
|
||||
'# set initial variable values
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
@@ -399,10 +360,8 @@ sort_buffer_size=100000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
'# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -412,8 +371,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -428,11 +387,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
END|
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
'Test No 1 Post Value & Test 2 Pre values'
|
||||
|
||||
Test No 1 Post Value & Test 2 Pre values
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@sort_buffer_size,
|
||||
@@ -441,8 +397,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=400001,
|
||||
myisam_repair_threads=3,
|
||||
sort_buffer_size=200001,
|
||||
@@ -452,10 +408,7 @@ max_join_size=4444440000001 FOR
|
||||
CALL p1();
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
400001 3 200001 ROW 0 4444440000001
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Post-STATEMENT No 2
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -465,9 +418,9 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
'#------------------Test 13-----------------------#'
|
||||
|
||||
|
||||
#------------------Test 13-----------------------#
|
||||
'# set initial variable values
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
@@ -475,10 +428,8 @@ sort_buffer_size=100000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
CREATE PROCEDURE p2() BEGIN
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=3,
|
||||
@@ -488,7 +439,7 @@ keep_files_on_create=OFF,
|
||||
max_join_size=3333330000000 FOR
|
||||
CALL p1();
|
||||
END|
|
||||
''
|
||||
|
||||
'# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -498,8 +449,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -509,12 +460,7 @@ max_join_size=4444440000000 FOR
|
||||
CALL p2();
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
400000 3 300000 MIXED 0 3333330000000
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -524,9 +470,9 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
'#------------------Test 14-----------------------#'
|
||||
|
||||
|
||||
#------------------Test 14-----------------------#
|
||||
'# set initial variable values
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
@@ -534,10 +480,8 @@ sort_buffer_size=100000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
CREATE PROCEDURE p3() BEGIN
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -553,7 +497,7 @@ keep_files_on_create=ON,
|
||||
max_join_size=2222220000000 FOR
|
||||
CALL p2();
|
||||
END|
|
||||
''
|
||||
|
||||
'# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -563,8 +507,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -576,14 +520,7 @@ CALL p3();
|
||||
400000 2 200000 ROW 0 4444440000000
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
400000 3 300000 MIXED 0 3333330000000
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -593,11 +530,11 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
''
|
||||
''
|
||||
'#------------------Test 15-----------------------#'
|
||||
|
||||
|
||||
|
||||
|
||||
#------------------Test 15-----------------------#
|
||||
'# set initial variable values
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
@@ -605,10 +542,8 @@ sort_buffer_size=100000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
CREATE PROCEDURE p4() BEGIN
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -653,7 +588,7 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
END|
|
||||
''
|
||||
|
||||
'# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -663,8 +598,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -680,12 +615,7 @@ CALL p4();
|
||||
320000 2 220022 ROW 1 2222220000000
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
320000 2 220022 ROW 1 2222220000000
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -695,16 +625,16 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
'#------------------Test 16-----------------------#'
|
||||
''
|
||||
|
||||
|
||||
#------------------Test 16-----------------------#
|
||||
|
||||
'# Pre-STATEMENT variable value
|
||||
SELECT @@sql_mode;
|
||||
@@sql_mode
|
||||
STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT sql_mode='ansi' FOR PREPARE stmt FROM 'SELECT "t1".* FROM t1';
|
||||
execute stmt;
|
||||
v1 v2
|
||||
@@ -717,7 +647,7 @@ v1 v2 v3
|
||||
3 4 NULL
|
||||
ALTER TABLE t1 drop COLUMN v3;
|
||||
deallocate prepare stmt;
|
||||
''
|
||||
|
||||
'# Post-STATEMENT
|
||||
SELECT @@sql_mode;
|
||||
@@sql_mode
|
||||
@@ -818,9 +748,9 @@ v1 v2
|
||||
3 4
|
||||
@@sql_mode
|
||||
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
|
||||
''
|
||||
''
|
||||
'#------------------Test 17-----------------------#'
|
||||
|
||||
|
||||
#------------------Test 17-----------------------#
|
||||
'# set initial variable values
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
@@ -828,9 +758,7 @@ sort_buffer_size=100000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -840,8 +768,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=320000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=220022,
|
||||
@@ -855,11 +783,7 @@ sort_buffer_size=230013,
|
||||
binlog_format=row,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2323230000000;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -869,9 +793,9 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
'#------------------Test 18-----------------------#'
|
||||
|
||||
|
||||
#------------------Test 18-----------------------#
|
||||
'# set initial variable values
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
@@ -879,9 +803,7 @@ sort_buffer_size=100000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -891,8 +813,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
CREATE PROCEDURE p5() BEGIN
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -914,8 +836,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
END|
|
||||
''
|
||||
''
|
||||
|
||||
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -927,11 +849,7 @@ CALL p5();
|
||||
400000 2 200000 ROW 0 4444440000000
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
260000 3 230013 ROW 1 2323230000000
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
''
|
||||
|
||||
'# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -941,9 +859,9 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@max_join_size;
|
||||
@@myisam_sort_buffer_size @@myisam_repair_threads @@sort_buffer_size @@binlog_format @@keep_files_on_create @@max_join_size
|
||||
500000 1 100000 MIXED 1 2222220000000
|
||||
''
|
||||
''
|
||||
'#------------------Test 19-----------------------#'
|
||||
|
||||
|
||||
#------------------Test 19-----------------------#
|
||||
SET STATEMENT max_error_count=100 FOR;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
|
||||
SET STATEMENT max_error_count=100 INSERT t1 VALUES (1,2);
|
||||
@@ -956,14 +874,14 @@ SET STATEMENT GLOBAL max_error_count=100 FOR INSERT INTO t1 VALUES (1,2);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'max_error_count=100 FOR INSERT INTO t1 VALUES (1,2)' at line 1
|
||||
SET STATEMENT @@global.max_error_count=100 FOR INSERT INTO t1 VALUES (1,2);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@@global.max_error_count=100 FOR INSERT INTO t1 VALUES (1,2)' at line 1
|
||||
''
|
||||
''
|
||||
'#------------------Test 20-----------------------#'
|
||||
|
||||
|
||||
#------------------Test 20-----------------------#
|
||||
SET STATEMENT connect_timeout=100 FOR INSERT INTO t1 VALUES (1,2);
|
||||
ERROR HY000: Variable 'connect_timeout' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
''
|
||||
''
|
||||
'#------------------Test 21-----------------------#'
|
||||
|
||||
|
||||
#------------------Test 21-----------------------#
|
||||
SELECT @@myisam_sort_buffer_size, @@sort_buffer_size;
|
||||
@@myisam_sort_buffer_size @@sort_buffer_size
|
||||
500000 100000
|
||||
@@ -975,13 +893,13 @@ FOR SELECT @@myisam_sort_buffer_size, @@sort_buffer_size;
|
||||
SELECT @@myisam_sort_buffer_size, @@sort_buffer_size;
|
||||
@@myisam_sort_buffer_size @@sort_buffer_size
|
||||
500000 100000
|
||||
''
|
||||
''
|
||||
'#------------------Test 22-----------------------#'
|
||||
|
||||
|
||||
#------------------Test 22-----------------------#
|
||||
CREATE TABLE STATEMENT(a INT);
|
||||
DROP TABLE STATEMENT;
|
||||
''
|
||||
'# Cleanup'
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
DROP PROCEDURE p2;
|
||||
@@ -1042,8 +960,6 @@ SELECT @@binlog_format;
|
||||
ROW
|
||||
SET @@binlog_format = @save_binlog_format;
|
||||
SET @@keep_files_on_create = @save_keep_files_on_create;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SET @@max_join_size = @save_max_join_size;
|
||||
SET @@myisam_repair_threads = @save_myisam_repair_threads;
|
||||
SET @@myisam_sort_buffer_size = @save_myisam_sort_buffer_size;
|
||||
@@ -1260,43 +1176,8 @@ week(a)
|
||||
deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
set @@default_week_format=@save_week_format;
|
||||
set @save_old_passwords=@@old_passwords;
|
||||
set @@old_passwords=0;
|
||||
set statement OLD_PASSWORDS = 0 for select password('test');
|
||||
password('test')
|
||||
*94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29
|
||||
set statement OLD_PASSWORDS = 1 for select password('test');
|
||||
password('test')
|
||||
378b243e220ca493
|
||||
set statement OLD_PASSWORDS = 0 for explain extended select password('test');
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select password('test') AS `password('test')`
|
||||
set statement OLD_PASSWORDS = 1 for explain extended select password('test');
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Note 1003 select password('test') AS `password('test')`
|
||||
create table t1 (a char(10));
|
||||
insert t1 values ('qwertyuiop');
|
||||
prepare stmt1 from "select password(a) from t1";
|
||||
execute stmt1;
|
||||
password(a)
|
||||
*6063C78456BB048BAF36BE1104D12D547834DFEA
|
||||
set old_passwords=1;
|
||||
execute stmt1;
|
||||
password(a)
|
||||
2013610f6aac2950
|
||||
alter table t1 engine=myisam;
|
||||
execute stmt1;
|
||||
password(a)
|
||||
2013610f6aac2950
|
||||
deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
set @@old_passwords=@save_old_passwords;
|
||||
#
|
||||
#MDEV-6951:Erroneous SET STATEMENT produces two identical errors
|
||||
#MDEV-6951:Erroneous SET STATEMENT produces two identical errors
|
||||
#
|
||||
set statement non_existing=1 for select 1;
|
||||
ERROR HY000: Unknown system variable 'non_existing'
|
||||
@@ -1377,6 +1258,4 @@ set statement rand_seed2=5 for select 3, @@rand_seed1, @@rand_seed2 $
|
||||
2 4 2
|
||||
3 @@rand_seed1 @@rand_seed2
|
||||
3 1 5
|
||||
#
|
||||
# End of 10.4 tests
|
||||
#
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
--echo '# SET STATEMENT ..... FOR .... TEST'
|
||||
--echo # SET STATEMENT ..... FOR .... TEST
|
||||
############################ STATEMENT_SET #############################
|
||||
# #
|
||||
# Testing working functionality of SET STATEMENT #
|
||||
@@ -14,18 +14,6 @@
|
||||
# #
|
||||
########################################################################
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP FUNCTION IF EXISTS myProc;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
DROP PROCEDURE IF EXISTS p2;
|
||||
DROP PROCEDURE IF EXISTS p3;
|
||||
DROP PROCEDURE IF EXISTS p4;
|
||||
DROP PROCEDURE IF EXISTS p5;
|
||||
DROP PROCEDURE IF EXISTS p6;
|
||||
DROP VIEW IF EXISTS v1;
|
||||
DROP TABLE IF EXISTS STATEMENT;
|
||||
--enable_warnings
|
||||
SET @save_binlog_format = @@binlog_format;
|
||||
SET @save_keep_files_on_create = @@keep_files_on_create;
|
||||
SET @save_max_join_size = @@max_join_size;
|
||||
@@ -35,43 +23,43 @@ SET @save_sort_buffer_size = @@sort_buffer_size;
|
||||
####################################################################
|
||||
#Set up current database
|
||||
####################################################################
|
||||
--echo '# Setup database'
|
||||
--echo # Setup database
|
||||
CREATE TABLE t1 (v1 INT, v2 INT);
|
||||
INSERT INTO t1 VALUES (1,2);
|
||||
INSERT INTO t1 VALUES (3,4);
|
||||
--echo ''
|
||||
--echo '#------------------ STATEMENT Test 1 -----------------------#'
|
||||
--echo
|
||||
--echo #------------------ STATEMENT Test 1 -----------------------#
|
||||
####################################################################
|
||||
# Checks with variable value type ulong #
|
||||
####################################################################
|
||||
--echo '# Initialize variables to known setting'
|
||||
--echo # Initialize variables to known setting
|
||||
SET SESSION sort_buffer_size=100000;
|
||||
--echo ''
|
||||
--echo '# Pre-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
SET STATEMENT sort_buffer_size=150000 FOR SELECT *,@@sort_buffer_size FROM t1;
|
||||
--echo ''
|
||||
--echo '# Post-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
--echo ''
|
||||
--echo '#------------------ STATEMENT Test 2 -----------------------#'
|
||||
--echo
|
||||
--echo #------------------ STATEMENT Test 2 -----------------------#
|
||||
####################################################################
|
||||
# Checks for multiple set values inside STATEMENT ... FOR #
|
||||
####################################################################
|
||||
--echo '# Initialize variables to known setting'
|
||||
--echo # Initialize variables to known setting
|
||||
SET SESSION binlog_format=mixed;
|
||||
SET SESSION sort_buffer_size=100000;
|
||||
--echo '# Pre-STATEMENT variable value'
|
||||
--echo # Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
SHOW SESSION VARIABLES LIKE 'binlog_format';
|
||||
SET STATEMENT sort_buffer_size=150000, binlog_format=row
|
||||
FOR SELECT *,@@sort_buffer_size,@@binlog_format FROM t1;
|
||||
--echo '# Post-STATEMENT variable value'
|
||||
--echo # Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
SHOW SESSION VARIABLES LIKE 'binlog_format';
|
||||
|
||||
--echo ''
|
||||
--echo '#------------------ STATEMENT Test 3 -----------------------#'
|
||||
--echo
|
||||
--echo #------------------ STATEMENT Test 3 -----------------------#
|
||||
####################################################################
|
||||
# Check current variable value is stored in using stored #
|
||||
# statements. #
|
||||
@@ -79,22 +67,22 @@ SHOW SESSION VARIABLES LIKE 'binlog_format';
|
||||
--echo '# set initial variable value, make prepared statement
|
||||
SET SESSION binlog_format=row;
|
||||
PREPARE stmt1 FROM 'SET STATEMENT binlog_format=row FOR SELECT *,@@binlog_format FROM t1';
|
||||
--echo ''
|
||||
--echo '# Change variable setting'
|
||||
--echo
|
||||
--echo # Change variable setting
|
||||
SET SESSION binlog_format=mixed;
|
||||
--echo ''
|
||||
--echo '# Pre-STATEMENT variable value'
|
||||
--echo ''
|
||||
--echo
|
||||
--echo # Pre-STATEMENT variable value
|
||||
--echo
|
||||
SHOW SESSION VARIABLES LIKE 'binlog_format';
|
||||
--echo ''
|
||||
--echo
|
||||
EXECUTE stmt1;
|
||||
--echo ''
|
||||
--echo '# Post-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'binlog_format';
|
||||
|
||||
--echo ''
|
||||
--echo
|
||||
DEALLOCATE PREPARE stmt1;
|
||||
--echo '#------------------ STATEMENT Test 4 -----------------------#'
|
||||
--echo #------------------ STATEMENT Test 4 -----------------------#
|
||||
####################################################################
|
||||
# Check works with OPTIMIZE TABLE command #
|
||||
# Checks works with a variable value of type INT #
|
||||
@@ -102,108 +90,108 @@ DEALLOCATE PREPARE stmt1;
|
||||
####################################################################
|
||||
--echo '# set initial variable value, make prepared statement
|
||||
SET SESSION myisam_sort_buffer_size=500000, myisam_repair_threads=1;
|
||||
--echo ''
|
||||
--echo '# Pre-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_sort_buffer_size';
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_repair_threads';
|
||||
--echo ''
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=800000,
|
||||
myisam_repair_threads=2 FOR OPTIMIZE TABLE t1;
|
||||
--echo ''
|
||||
--echo '# Post-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_sort_buffer_size';
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_repair_threads';
|
||||
|
||||
--echo ''
|
||||
--echo '#------------------ STATEMENT Test 5 -----------------------#'
|
||||
--echo
|
||||
--echo #------------------ STATEMENT Test 5 -----------------------#
|
||||
####################################################################
|
||||
# Checks if variable reset after error in statement after FOR #
|
||||
####################################################################
|
||||
--echo '# Initialize variables to known setting'
|
||||
--echo # Initialize variables to known setting
|
||||
SET SESSION sort_buffer_size=100000;
|
||||
--echo ''
|
||||
--echo '# Pre-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
--echo ''
|
||||
--echo
|
||||
--error ER_NO_SUCH_TABLE
|
||||
SET STATEMENT sort_buffer_size=150000 FOR SELECT * FROM t2;
|
||||
--echo ''
|
||||
--echo '# Post-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
|
||||
--echo ''
|
||||
--echo '#------------------ STATEMENT Test 6 -----------------------#'
|
||||
--echo
|
||||
--echo #------------------ STATEMENT Test 6 -----------------------#
|
||||
####################################################################
|
||||
# Checks works with variable type MY_BOOL #
|
||||
####################################################################
|
||||
--echo '# Initialize variables to known setting'
|
||||
--echo # Initialize variables to known setting
|
||||
SET SESSION keep_files_on_create=ON;
|
||||
--echo ''
|
||||
--echo '# Pre-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
--echo ''
|
||||
--echo
|
||||
SET STATEMENT keep_files_on_create=OFF FOR SELECT *,@@keep_files_on_create FROM t1;
|
||||
--echo ''
|
||||
--echo '# Post-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
|
||||
--echo ''
|
||||
--echo '#------------------ STATEMENT Test 7 -----------------------#'
|
||||
--echo
|
||||
--echo #------------------ STATEMENT Test 7 -----------------------#
|
||||
####################################################################
|
||||
# Checks works with variable type HA_ROWS #
|
||||
####################################################################
|
||||
--echo '# Initialize variables to known setting'
|
||||
--echo # Initialize variables to known setting
|
||||
SET SESSION max_join_size=2222220000000;
|
||||
--echo ''
|
||||
--echo '# Pre-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Pre-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'max_join_size';
|
||||
--echo ''
|
||||
--echo
|
||||
SET STATEMENT max_join_size=1000000000000 FOR SELECT *,@@max_join_size FROM t1;
|
||||
--echo ''
|
||||
--echo '# Post-STATEMENT variable value'
|
||||
--echo
|
||||
--echo # Post-STATEMENT variable value
|
||||
SHOW SESSION VARIABLES LIKE 'max_join_size';
|
||||
|
||||
--echo ''
|
||||
--echo '#------------------Test 8-----------------------#'
|
||||
--echo
|
||||
--echo #------------------Test 8-----------------------#
|
||||
####################################################################
|
||||
# Ensure variable of each type is set to proper value during #
|
||||
# statement after FOR execution #
|
||||
####################################################################
|
||||
--echo '# Initialize test variables'
|
||||
--echo # Initialize test variables
|
||||
SET SESSION myisam_sort_buffer_size=500000,
|
||||
myisam_repair_threads=1,
|
||||
sort_buffer_size = 200000,
|
||||
max_join_size=2222220000000,
|
||||
keep_files_on_create=ON;
|
||||
|
||||
--echo ''
|
||||
--echo '# LONG '
|
||||
--echo
|
||||
--echo # LONG
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
SET STATEMENT sort_buffer_size = 100000
|
||||
FOR SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
SHOW SESSION VARIABLES LIKE 'sort_buffer_size';
|
||||
--echo ''
|
||||
--echo '# MY_BOOL '
|
||||
--echo
|
||||
--echo # MY_BOOL
|
||||
SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
SET STATEMENT keep_files_on_create=OFF
|
||||
FOR SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
SHOW SESSION VARIABLES LIKE 'keep_files_on_create';
|
||||
|
||||
--echo ''
|
||||
--echo '# INT/LONG '
|
||||
--echo
|
||||
--echo # INT/LONG
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_repair_threads';
|
||||
SET STATEMENT myisam_repair_threads=2
|
||||
FOR SHOW SESSION VARIABLES LIKE 'myisam_repair_threads';
|
||||
SHOW SESSION VARIABLES LIKE 'myisam_repair_threads';
|
||||
--echo ''
|
||||
--echo '# ULONGLONG '
|
||||
--echo
|
||||
--echo # ULONGLONG
|
||||
SHOW SESSION VARIABLES LIKE 'max_join_size';
|
||||
SET STATEMENT max_join_size=2000000000000
|
||||
FOR SHOW SESSION VARIABLES LIKE 'max_join_size';
|
||||
SHOW SESSION VARIABLES LIKE 'max_join_size';
|
||||
|
||||
--echo ''
|
||||
--echo '#------------------Test 9-----------------------#'
|
||||
--echo
|
||||
--echo #------------------Test 9-----------------------#
|
||||
####################################################################
|
||||
# No 1 - Check works with CREATE ... BEGIN ... END command #
|
||||
# Display variables during execution #
|
||||
@@ -216,8 +204,8 @@ SET SESSION myisam_sort_buffer_size=500000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
--echo '# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -225,8 +213,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
DELIMITER |;
|
||||
CREATE FUNCTION myProc (cost DECIMAL(10,2))
|
||||
RETURNS DECIMAL(10,2)
|
||||
@@ -239,7 +227,7 @@ CREATE FUNCTION myProc (cost DECIMAL(10,2))
|
||||
RETURN order_tax;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# During Execution values
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
@@ -255,15 +243,15 @@ SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
keep_files_on_create=OFF,
|
||||
max_join_size=4444440000000 FOR
|
||||
SELECT myProc(123.45);
|
||||
--echo ''
|
||||
--echo '# Post-STATEMENT No 1 variable value Pre-STATEMENT for No 2'
|
||||
--echo
|
||||
--echo # Post-STATEMENT No 1 variable value Pre-STATEMENT for No 2
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -271,7 +259,7 @@ SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
keep_files_on_create=OFF,
|
||||
max_join_size=4444440000000 FOR
|
||||
DROP FUNCTION myProc;
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Post-STATEMENT No 2 variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -280,8 +268,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
|
||||
--echo ''
|
||||
--echo '#------------------Test 11-----------------------#'
|
||||
--echo
|
||||
--echo #------------------Test 11-----------------------#
|
||||
####################################################################
|
||||
# No 1 - Check with PREPARE statement #
|
||||
# check with different variable on inside PREPARE #
|
||||
@@ -294,8 +282,8 @@ SET SESSION myisam_sort_buffer_size=500000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
--echo '# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -303,8 +291,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -312,23 +300,23 @@ SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
max_join_size=4444440000000 FOR
|
||||
PREPARE stmt1 FROM
|
||||
'SET STATEMENT binlog_format=row FOR SELECT *,@@binlog_format,@@sort_buffer_size FROM t1';
|
||||
--echo ''
|
||||
--echo 'Test No 1 Post Value & Test 2 Pre values'
|
||||
--echo
|
||||
--echo Test No 1 Post Value & Test 2 Pre values
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
keep_files_on_create=OFF,
|
||||
max_join_size=4444440000000 FOR
|
||||
EXECUTE stmt1;
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Post-STATEMENT No 2
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -336,9 +324,9 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 12-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 12-----------------------#
|
||||
####################################################################
|
||||
# No 1 - Check with PROCEDURE (show variables in procedure) #
|
||||
# No 2 - Check with CALL statement show variables in PROCEDURE #
|
||||
@@ -350,8 +338,8 @@ SET SESSION myisam_sort_buffer_size=500000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
--echo '# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -359,8 +347,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
DELIMITER |;
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
@@ -377,16 +365,16 @@ SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
@@max_join_size;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
--echo ''
|
||||
--echo 'Test No 1 Post Value & Test 2 Pre values'
|
||||
--echo
|
||||
--echo Test No 1 Post Value & Test 2 Pre values
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=400001,
|
||||
myisam_repair_threads=3,
|
||||
sort_buffer_size=200001,
|
||||
@@ -394,7 +382,7 @@ SET STATEMENT myisam_sort_buffer_size=400001,
|
||||
keep_files_on_create=OFF,
|
||||
max_join_size=4444440000001 FOR
|
||||
CALL p1();
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Post-STATEMENT No 2
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -402,10 +390,10 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
|
||||
--echo '#------------------Test 13-----------------------#'
|
||||
--echo #------------------Test 13-----------------------#
|
||||
####################################################################
|
||||
# Check PROCEDURE containing SET STATEMENT FOR #
|
||||
# p1() from test 12 will be used to display variables #
|
||||
@@ -417,8 +405,8 @@ SET SESSION myisam_sort_buffer_size=500000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE p2() BEGIN
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
@@ -430,7 +418,7 @@ CREATE PROCEDURE p2() BEGIN
|
||||
CALL p1();
|
||||
END|
|
||||
DELIMITER ;|
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -438,8 +426,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -447,7 +435,7 @@ SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
keep_files_on_create=OFF,
|
||||
max_join_size=4444440000000 FOR
|
||||
CALL p2();
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -455,9 +443,9 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 14-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 14-----------------------#
|
||||
####################################################################
|
||||
# Check PROCEDURE containing compound SET STATEMENT FOR #
|
||||
# p2() will be used as compounding statement from test 13 #
|
||||
@@ -469,8 +457,8 @@ SET SESSION myisam_sort_buffer_size=500000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE p3() BEGIN
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@ -488,7 +476,7 @@ CREATE PROCEDURE p3() BEGIN
|
||||
CALL p2();
|
||||
END|
|
||||
DELIMITER ;|
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -496,8 +484,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -505,7 +493,7 @@ SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
keep_files_on_create=OFF,
|
||||
max_join_size=4444440000000 FOR
|
||||
CALL p3();
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -513,12 +501,12 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 15-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 15-----------------------#
|
||||
####################################################################
|
||||
# Check PROCEDURE containing compound SET STATEMENT FOR #
|
||||
# call multiple SET STATEMENT .. FOR showing SELECT #
|
||||
@@ -530,8 +518,8 @@ SET SESSION myisam_sort_buffer_size=500000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE p4() BEGIN
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@ -578,7 +566,7 @@ CREATE PROCEDURE p4() BEGIN
|
||||
@@max_join_size;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -586,8 +574,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -595,7 +583,7 @@ SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
keep_files_on_create=OFF,
|
||||
max_join_size=4444440000000 FOR
|
||||
CALL p4();
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -604,17 +592,17 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 16-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 16-----------------------#
|
||||
####################################################################
|
||||
# Test Effect on parsing #
|
||||
####################################################################
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Pre-STATEMENT variable value
|
||||
SELECT @@sql_mode;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
SET STATEMENT sql_mode='ansi' FOR PREPARE stmt FROM 'SELECT "t1".* FROM t1';
|
||||
execute stmt;
|
||||
ALTER TABLE t1 ADD COLUMN v3 int;
|
||||
@@ -622,7 +610,7 @@ ALTER TABLE t1 ADD COLUMN v3 int;
|
||||
execute stmt;
|
||||
ALTER TABLE t1 drop COLUMN v3;
|
||||
deallocate prepare stmt;
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Post-STATEMENT
|
||||
SELECT @@sql_mode;
|
||||
--echo check the same behaviour in normal set
|
||||
@@ -703,9 +691,9 @@ BEGIN NOT ATOMIC
|
||||
SELECT @@sql_mode;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 17-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 17-----------------------#
|
||||
####################################################################
|
||||
# Test effect of SET STATEMENT FOR with SET SESSION modifying #
|
||||
# the same variables as the SET STATEMENT #
|
||||
@@ -717,7 +705,7 @@ SET SESSION myisam_sort_buffer_size=500000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -725,8 +713,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=320000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=220022,
|
||||
@@ -741,7 +729,7 @@ SET STATEMENT myisam_sort_buffer_size=320000,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2323230000000;
|
||||
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -750,9 +738,9 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 18-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 18-----------------------#
|
||||
####################################################################
|
||||
# Test effect of SET SESSION inside a stored procedure with #
|
||||
# with a SET STATEMENT on outside variables #
|
||||
@@ -764,7 +752,7 @@ SET SESSION myisam_sort_buffer_size=500000,
|
||||
binlog_format=mixed,
|
||||
keep_files_on_create=ON,
|
||||
max_join_size=2222220000000;
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Pre-STATEMENT variable value
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -772,8 +760,8 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@binlog_format,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE p5() BEGIN
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@ -797,8 +785,8 @@ CREATE PROCEDURE p5() BEGIN
|
||||
@@max_join_size;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo
|
||||
--echo
|
||||
SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
myisam_repair_threads=2,
|
||||
sort_buffer_size=200000,
|
||||
@@ -807,7 +795,7 @@ SET STATEMENT myisam_sort_buffer_size=400000,
|
||||
max_join_size=4444440000000 FOR
|
||||
CALL p5();
|
||||
|
||||
--echo ''
|
||||
--echo
|
||||
--echo '# Post-STATEMENT
|
||||
SELECT @@myisam_sort_buffer_size,
|
||||
@@myisam_repair_threads,
|
||||
@@ -816,11 +804,11 @@ SELECT @@myisam_sort_buffer_size,
|
||||
@@keep_files_on_create,
|
||||
@@max_join_size;
|
||||
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 19-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 19-----------------------#
|
||||
#Test for bad syntax
|
||||
--error ER_PARSE_ERROR
|
||||
--error ER_PARSE_ERROR
|
||||
SET STATEMENT max_error_count=100 FOR;
|
||||
--error ER_PARSE_ERROR
|
||||
SET STATEMENT max_error_count=100 INSERT t1 VALUES (1,2);
|
||||
@@ -833,16 +821,16 @@ SET STATEMENT GLOBAL max_error_count=100 FOR INSERT INTO t1 VALUES (1,2);
|
||||
--error ER_PARSE_ERROR
|
||||
SET STATEMENT @@global.max_error_count=100 FOR INSERT INTO t1 VALUES (1,2);
|
||||
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 20-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 20-----------------------#
|
||||
#Test for global-only variables
|
||||
--error ER_GLOBAL_VARIABLE
|
||||
SET STATEMENT connect_timeout=100 FOR INSERT INTO t1 VALUES (1,2);
|
||||
SET STATEMENT connect_timeout=100 FOR INSERT INTO t1 VALUES (1,2);
|
||||
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 21-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 21-----------------------#
|
||||
#Test for recursion
|
||||
SELECT @@myisam_sort_buffer_size, @@sort_buffer_size;
|
||||
SET STATEMENT myisam_sort_buffer_size = 700000, sort_buffer_size = 3000000
|
||||
@@ -850,15 +838,15 @@ SET STATEMENT myisam_sort_buffer_size = 700000, sort_buffer_size = 3000000
|
||||
FOR SELECT @@myisam_sort_buffer_size, @@sort_buffer_size;
|
||||
SELECT @@myisam_sort_buffer_size, @@sort_buffer_size;
|
||||
|
||||
--echo ''
|
||||
--echo ''
|
||||
--echo '#------------------Test 22-----------------------#'
|
||||
--echo
|
||||
--echo
|
||||
--echo #------------------Test 22-----------------------#
|
||||
#Test for STATEMENT keyword
|
||||
CREATE TABLE STATEMENT(a INT);
|
||||
DROP TABLE STATEMENT;
|
||||
|
||||
--echo ''
|
||||
--echo '# Cleanup'
|
||||
--echo
|
||||
--echo # Cleanup
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
DROP PROCEDURE p2;
|
||||
@@ -1102,27 +1090,8 @@ deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
set @@default_week_format=@save_week_format;
|
||||
|
||||
# MDEV-7015: SET STATEMENT old_passwords has no effect
|
||||
set @save_old_passwords=@@old_passwords;
|
||||
set @@old_passwords=0;
|
||||
set statement OLD_PASSWORDS = 0 for select password('test');
|
||||
set statement OLD_PASSWORDS = 1 for select password('test');
|
||||
set statement OLD_PASSWORDS = 0 for explain extended select password('test');
|
||||
set statement OLD_PASSWORDS = 1 for explain extended select password('test');
|
||||
create table t1 (a char(10));
|
||||
insert t1 values ('qwertyuiop');
|
||||
prepare stmt1 from "select password(a) from t1";
|
||||
execute stmt1;
|
||||
set old_passwords=1;
|
||||
execute stmt1;
|
||||
alter table t1 engine=myisam;
|
||||
execute stmt1;
|
||||
deallocate prepare stmt1;
|
||||
drop table t1;
|
||||
set @@old_passwords=@save_old_passwords;
|
||||
|
||||
--echo #
|
||||
--echo #MDEV-6951:Erroneous SET STATEMENT produces two identical errors
|
||||
--echo #MDEV-6951:Erroneous SET STATEMENT produces two identical errors
|
||||
--echo #
|
||||
|
||||
--error ER_UNKNOWN_SYSTEM_VARIABLE
|
||||
@@ -1211,6 +1180,4 @@ set statement rand_seed2=5 for select 3, @@rand_seed1, @@rand_seed2 $
|
||||
--delimiter ;
|
||||
--enable_ps_protocol
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
@@ -647,9 +647,6 @@ ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
create function bug8409() returns int begin flush master;
|
||||
return 1; end|
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
create function bug8409() returns int begin flush des_key_file;
|
||||
return 1; end|
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
create function bug8409() returns int begin flush user_resources;
|
||||
return 1; end|
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
|
||||
@@ -885,9 +885,6 @@ return 1; end|
|
||||
create function bug8409() returns int begin flush master;
|
||||
return 1; end|
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
create function bug8409() returns int begin flush des_key_file;
|
||||
return 1; end|
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
create function bug8409() returns int begin flush user_resources;
|
||||
return 1; end|
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
CREATE TABLE t1(a int) engine=innodb;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SELECT DISTINCT
|
||||
convert((SELECT des_decrypt(2,1) AS a FROM t1 WHERE @a:=1), signed) as d
|
||||
FROM t1 ;
|
||||
d
|
||||
2
|
||||
Warnings:
|
||||
Warning 1287 'des_decrypt' is deprecated and will be removed in a future release
|
||||
DROP TABLE t1;
|
||||
@@ -1,11 +0,0 @@
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_des.inc
|
||||
|
||||
CREATE TABLE t1(a int) engine=innodb;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
SELECT DISTINCT
|
||||
convert((SELECT des_decrypt(2,1) AS a FROM t1 WHERE @a:=1), signed) as d
|
||||
FROM t1 ;
|
||||
|
||||
DROP TABLE t1;
|
||||
@@ -157,13 +157,9 @@ a
|
||||
drop table t1;
|
||||
End of 4.1 tests
|
||||
SET SESSION keep_files_on_create = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1 (a INT) ENGINE MYISAM;
|
||||
Got one of the listed errors
|
||||
SET SESSION keep_files_on_create = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1 (a INT) ENGINE MYISAM;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
||||
@@ -653,8 +653,6 @@ create trigger t1_ai after insert on t1 for each row flush slave;
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
create trigger t1_ai after insert on t1 for each row flush master;
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
create trigger t1_ai after insert on t1 for each row flush des_key_file;
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
create trigger t1_ai after insert on t1 for each row flush user_resources;
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
create trigger t1_ai after insert on t1 for each row flush tables;
|
||||
@@ -711,10 +709,6 @@ create procedure p1() flush master;
|
||||
insert into t1 values (0);
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
drop procedure p1;
|
||||
create procedure p1() flush des_key_file;
|
||||
insert into t1 values (0);
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
drop procedure p1;
|
||||
create procedure p1() flush user_resources;
|
||||
insert into t1 values (0);
|
||||
ERROR 0A000: FLUSH is not allowed in stored function or trigger
|
||||
|
||||
@@ -667,8 +667,6 @@ create trigger t1_ai after insert on t1 for each row flush slave;
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
create trigger t1_ai after insert on t1 for each row flush master;
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
create trigger t1_ai after insert on t1 for each row flush des_key_file;
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
create trigger t1_ai after insert on t1 for each row flush user_resources;
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
create trigger t1_ai after insert on t1 for each row flush tables;
|
||||
@@ -738,11 +736,6 @@ create procedure p1() flush master;
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
insert into t1 values (0);
|
||||
|
||||
drop procedure p1;
|
||||
create procedure p1() flush des_key_file;
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
insert into t1 values (0);
|
||||
|
||||
drop procedure p1;
|
||||
create procedure p1() flush user_resources;
|
||||
--error ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7;
|
||||
CREATE TABLE t1 (a blob, b text, c blob(250), d text(70000), e text(70000000));
|
||||
show columns from t1;
|
||||
Field Type Null Key Default Extra
|
||||
@@ -899,6 +898,9 @@ CREATE TABLE b15776 (a char(4294967295));
|
||||
ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
|
||||
CREATE TABLE b15776 (a char(4294967296));
|
||||
ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
|
||||
set old_mode=2_DIGIT_YEAR;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
CREATE TABLE b15776 (a year(?));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(?)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
@@ -922,6 +924,7 @@ Warning 1287 'YEAR(0)' is deprecated and will be removed in a future release. Pl
|
||||
DROP TABLE b15776;
|
||||
CREATE TABLE b15776 (a year(-2));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-2))' at line 1
|
||||
set old_mode=default;
|
||||
CREATE TABLE b15776 (a timestamp(4294967294));
|
||||
ERROR 42000: Too big precision specified for 'a'. Maximum is 6
|
||||
CREATE TABLE b15776 (a timestamp(4294967295));
|
||||
@@ -937,14 +940,7 @@ ERROR 42000: Display width out of range for 'a' (max = 255)
|
||||
CREATE TABLE b15776 (a char(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
|
||||
ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
|
||||
CREATE TABLE b15776 (a year(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(4294967295)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SHOW CREATE TABLE b15776;
|
||||
Table Create Table
|
||||
b15776 CREATE TABLE `b15776` (
|
||||
`a` year(4) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||
DROP TABLE b15776;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
|
||||
CREATE TABLE b15776 select cast(null as char(4294967295));
|
||||
show columns from b15776;
|
||||
Field Type Null Key Default Extra
|
||||
|
||||
@@ -3,14 +3,6 @@
|
||||
#
|
||||
--source include/have_innodb.inc
|
||||
|
||||
#
|
||||
# Basic cleanup
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7;
|
||||
--enable_warnings
|
||||
|
||||
|
||||
#
|
||||
# Check syntax for creating BLOB/TEXT
|
||||
#
|
||||
@@ -525,6 +517,7 @@ CREATE TABLE b15776 (a char(4294967296));
|
||||
## For year, widths not "2" or "4" are silently rewritten to "4". But
|
||||
## When we complain about it, we say that the max is 255. We may be
|
||||
## talking about different things. It's confusing.
|
||||
set old_mode=2_DIGIT_YEAR;
|
||||
--replace_result 4294967295 ? 0 ?
|
||||
--enable_prepare_warnings
|
||||
CREATE TABLE b15776 (a year(4294967295));
|
||||
@@ -543,6 +536,7 @@ CREATE TABLE b15776 (a year(0)); # 0 is special case, means default size
|
||||
DROP TABLE b15776;
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE b15776 (a year(-2));
|
||||
set old_mode=default;
|
||||
|
||||
## For timestamp, we silently rewrite widths to 14 or 19.
|
||||
--error ER_TOO_BIG_PRECISION
|
||||
@@ -562,11 +556,8 @@ CREATE TABLE b15776 (a timestamp(-2));
|
||||
CREATE TABLE b15776 (a int(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
|
||||
--error ER_TOO_BIG_FIELDLENGTH
|
||||
CREATE TABLE b15776 (a char(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
|
||||
--enable_prepare_warnings
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE b15776 (a year(999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999));
|
||||
--disable_prepare_warnings
|
||||
SHOW CREATE TABLE b15776;
|
||||
DROP TABLE b15776;
|
||||
|
||||
## Do not select, too much memory needed.
|
||||
CREATE TABLE b15776 select cast(null as char(4294967295));
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
set old_mode=2_DIGIT_YEAR;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table t1 (y year,y2 year(2));
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
@@ -378,7 +381,16 @@ ALTER TABLE t1 MODIFY COLUMN c2 YEAR(2);
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SET OLD_MODE='';
|
||||
ALTER TABLE t1 MODIFY COLUMN c2 INT;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' c2 YEAR(4))' at line 1
|
||||
SET OLD_MODE=2_DIGIT_YEAR;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
|
||||
--enable_prepare_warnings
|
||||
set old_mode=2_DIGIT_YEAR;
|
||||
|
||||
create table t1 (y year,y2 year(2));
|
||||
insert into t1 values (0,0),(1999,1999),(2000,2000),(2001,2001),(70,70),(69,69);
|
||||
@@ -174,7 +175,12 @@ DROP TABLE t1;
|
||||
|
||||
CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4));
|
||||
ALTER TABLE t1 MODIFY COLUMN c2 YEAR(2);
|
||||
SET OLD_MODE='';
|
||||
ALTER TABLE t1 MODIFY COLUMN c2 INT;
|
||||
DROP TABLE t1;
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE t1 (c1 YEAR(2), c2 YEAR(4));
|
||||
SET OLD_MODE=2_DIGIT_YEAR;
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
||||
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
||||
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
||||
CREATE TABLE t2(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2));
|
||||
CREATE TABLE t3(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2));
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
||||
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
||||
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
set old_mode=2_digit_year;
|
||||
# Create tables
|
||||
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
||||
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
set old_mode=2_digit_year;
|
||||
######## Running INSERT tests for YEAR(4) ########
|
||||
|
||||
# Create tables
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
set old_mode=2_digit_year;
|
||||
# Create tables
|
||||
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
||||
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
##### suite/funcs_1/include/innodb_tb2.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb2 ;
|
||||
--enable_warnings
|
||||
--enable_prepare_warnings
|
||||
set old_mode=2_digit_year;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -57,6 +55,7 @@ f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
set old_mode=default;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
|
||||
eval
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
##### suite/funcs_1/include/innodb_tb4.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb4;
|
||||
--enable_warnings
|
||||
--enable_prepare_warnings
|
||||
set old_mode=2_digit_year;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
@@ -64,6 +62,7 @@ f239 varchar(20000) binary,
|
||||
f240 varchar(2000),
|
||||
f241 char(100)
|
||||
) engine = innodb;
|
||||
set old_mode=default;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
|
||||
eval
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
##### suite/funcs_1/include/memory_tb2.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb2 ;
|
||||
--enable_warnings
|
||||
|
||||
--enable_prepare_warnings
|
||||
|
||||
set old_mode=2_digit_year;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -59,6 +56,7 @@ f107 year(4) not null default 2000,
|
||||
f108 enum("1enum","2enum") not null default "1enum",
|
||||
f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
set old_mode=default;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
|
||||
eval
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
##### suite/funcs_1/include/memory_tb4.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb4 ;
|
||||
--enable_warnings
|
||||
--enable_prepare_warnings
|
||||
set old_mode=2_digit_year;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
@@ -63,6 +61,7 @@ f238 varchar(25000) binary,
|
||||
f239 varbinary(0),
|
||||
f240 varchar(1200)
|
||||
) engine = memory;
|
||||
set old_mode=default;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
|
||||
eval
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
###### suite/funcs_1/include/myisam_tb2.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb2 ;
|
||||
--enable_warnings
|
||||
set old_mode=2_digit_year;
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -64,6 +62,7 @@ f115 VARBINARY(27) null ,
|
||||
f116 VARBINARY(64) null,
|
||||
f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
set old_mode=default;
|
||||
|
||||
# The original columns. They are replaced by varbinary, because the funcs_1 tests should
|
||||
# not depend on the optional availability of the geometry feature.
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
##### suite/funcs_1/include/myisam_tb4.inc
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists tb4 ;
|
||||
--enable_warnings
|
||||
set old_mode=2_digit_year;
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
@@ -72,6 +70,7 @@ f240 varchar(120),
|
||||
f241 char(100),
|
||||
f242 bit(30)
|
||||
) engine = myisam;
|
||||
set old_mode=default;
|
||||
|
||||
# The original columns. They are replaced by varbinary, because the funcs_1 tests should
|
||||
# not depend on the optional availability of the geometry feature.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
ALTER DATABASE test CHARACTER SET latin1 COLLATE latin1_swedish_ci;
|
||||
USE test;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -56,12 +58,15 @@ f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
CREATE DATABASE test1;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -117,6 +122,7 @@ f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
||||
@@ -79,7 +79,9 @@ Note 1265 Data truncated for column 'f49' at row 0
|
||||
Note 1265 Data truncated for column 'f51' at row 0
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -135,6 +137,7 @@ f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
@@ -204,7 +207,9 @@ Note 1265 Data truncated for column 'f151' at row 0
|
||||
Note 1265 Data truncated for column 'f152' at row 0
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
@@ -267,10 +272,13 @@ f241 char(100)
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -326,6 +334,7 @@ f109 set("1set","2set") not null default "1set"
|
||||
) engine = innodb;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/innodb_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
||||
@@ -75,7 +75,9 @@ Note 1265 Data truncated for column 'f49' at row 0
|
||||
Note 1265 Data truncated for column 'f51' at row 0
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -131,6 +133,7 @@ f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
drop table if exists tb3;
|
||||
@@ -194,7 +197,9 @@ Note 1265 Data truncated for column 'f151' at row 0
|
||||
Note 1265 Data truncated for column 'f152' at row 0
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
@@ -256,10 +261,13 @@ f240 varchar(1200)
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -315,6 +323,7 @@ f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
USE test;
|
||||
|
||||
@@ -83,7 +83,9 @@ Note 1265 Data truncated for column 'f49' at row 0
|
||||
Note 1265 Data truncated for column 'f51' at row 0
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -147,6 +149,7 @@ f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
@@ -216,7 +219,9 @@ Note 1265 Data truncated for column 'f151' at row 0
|
||||
Note 1265 Data truncated for column 'f152' at row 0
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
@@ -288,10 +293,13 @@ f242 bit(30)
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -355,6 +363,7 @@ f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
||||
@@ -83,7 +83,9 @@ Note 1265 Data truncated for column 'f49' at row 0
|
||||
Note 1265 Data truncated for column 'f51' at row 0
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb1.txt'
|
||||
into table tb1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -147,6 +149,7 @@ f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
drop table if exists tb3 ;
|
||||
@@ -216,7 +219,9 @@ Note 1265 Data truncated for column 'f151' at row 0
|
||||
Note 1265 Data truncated for column 'f152' at row 0
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb3.txt'
|
||||
into table tb3;
|
||||
drop table if exists tb4 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb4 (
|
||||
f176 numeric (0) unsigned not null DEFAULT 9,
|
||||
f177 numeric (64) unsigned not null DEFAULT 9,
|
||||
@@ -288,10 +293,13 @@ f242 bit(30)
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb4.txt'
|
||||
into table tb4;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -355,6 +363,7 @@ f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
ALTER DATABASE test CHARACTER SET latin1 COLLATE latin1_swedish_ci;
|
||||
USE test;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -57,12 +59,15 @@ f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
CREATE DATABASE test1;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -118,6 +123,7 @@ f109 set("1set","2set") not null default "1set"
|
||||
) engine = memory;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/memory_tb2.txt'
|
||||
into table tb2 ;
|
||||
USE test;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
SET @@session.sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
ALTER DATABASE test CHARACTER SET latin1 COLLATE latin1_swedish_ci;
|
||||
USE test;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -65,12 +67,15 @@ f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
DROP DATABASE IF EXISTS test1;
|
||||
CREATE DATABASE test1;
|
||||
USE test1;
|
||||
drop table if exists tb2 ;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
create table tb2 (
|
||||
f59 numeric (0) unsigned,
|
||||
f60 numeric (64) unsigned,
|
||||
@@ -134,6 +139,7 @@ f117 VARBINARY(192) null
|
||||
) engine = myisam;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
set old_mode=default;
|
||||
load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/myisam_tb2.txt'
|
||||
into table tb2;
|
||||
USE test;
|
||||
|
||||
@@ -3120,10 +3120,6 @@ DROP FUNCTION timestamp;
|
||||
CREATE FUNCTION year(f1 year) returns year
|
||||
return f1;
|
||||
DROP FUNCTION year;
|
||||
CREATE FUNCTION year(3)(f1 year(3)) returns year(3)
|
||||
return f1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '3)(f1 year(3)) returns year(3)
|
||||
return f1' at line 1
|
||||
CREATE FUNCTION year(4)(f1 year(4)) returns year(4)
|
||||
return f1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '4)(f1 year(4)) returns year(4)
|
||||
@@ -3397,13 +3393,6 @@ DROP FUNCTION IF EXISTS fn1;
|
||||
CREATE FUNCTION fn1(f1 year ) returns year
|
||||
return f1;
|
||||
DROP FUNCTION IF EXISTS fn1;
|
||||
CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3)
|
||||
return f1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'f1 3) ) returns year(3)
|
||||
return f1' at line 1
|
||||
DROP FUNCTION IF EXISTS fn1;
|
||||
Warnings:
|
||||
Note 1305 FUNCTION db_storedproc.fn1 does not exist
|
||||
CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4)
|
||||
return f1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'f1 4) ) returns year(4)
|
||||
@@ -7500,19 +7489,6 @@ x y z
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
declare x, y, z year(3) default 2005;
|
||||
SELECT x, y, z;
|
||||
END//
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
CALL sp1();
|
||||
x y z
|
||||
2005 2005 2005
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(3)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
declare x, y, z year(4) default 2005;
|
||||
SELECT x, y, z;
|
||||
END//
|
||||
@@ -14296,13 +14272,6 @@ CALL sp1();
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1()
|
||||
BEGIN
|
||||
declare x year(3);
|
||||
SELECT f1 into x from t2 limit 1;
|
||||
END//
|
||||
CALL sp1();
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE PROCEDURE sp1()
|
||||
BEGIN
|
||||
declare x year(4);
|
||||
SELECT f1 into x from t2 limit 1;
|
||||
END//
|
||||
|
||||
@@ -2163,10 +2163,6 @@ CREATE FUNCTION year(f1 year) returns year
|
||||
return f1;
|
||||
DROP FUNCTION year;
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE FUNCTION year(3)(f1 year(3)) returns year(3)
|
||||
return f1;
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE FUNCTION year(4)(f1 year(4)) returns year(4)
|
||||
return f1;
|
||||
@@ -2472,11 +2468,6 @@ DROP FUNCTION IF EXISTS fn1;
|
||||
CREATE FUNCTION fn1(f1 year ) returns year
|
||||
return f1;
|
||||
|
||||
DROP FUNCTION IF EXISTS fn1;
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE FUNCTION fn1(f1 year(f1 3) ) returns year(3)
|
||||
return f1;
|
||||
|
||||
DROP FUNCTION IF EXISTS fn1;
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE FUNCTION fn1(f1 year(f1 4) ) returns year(4)
|
||||
@@ -8446,20 +8437,6 @@ CALL sp1();
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
--enable_warnings
|
||||
|
||||
delimiter //;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
declare x, y, z year(3) default 2005;
|
||||
SELECT x, y, z;
|
||||
END//
|
||||
delimiter ;//
|
||||
|
||||
CALL sp1();
|
||||
|
||||
--disable_warnings
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
--enable_warnings
|
||||
|
||||
delimiter //;
|
||||
CREATE PROCEDURE sp1( )
|
||||
BEGIN
|
||||
@@ -17135,18 +17112,6 @@ CALL sp1();
|
||||
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
|
||||
delimiter //;
|
||||
CREATE PROCEDURE sp1()
|
||||
BEGIN
|
||||
declare x year(3);
|
||||
SELECT f1 into x from t2 limit 1;
|
||||
END//
|
||||
delimiter ;//
|
||||
|
||||
CALL sp1();
|
||||
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
|
||||
delimiter //;
|
||||
CREATE PROCEDURE sp1()
|
||||
BEGIN
|
||||
|
||||
@@ -13,7 +13,6 @@ INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4;
|
||||
INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
FLUSH LOCAL DES_KEY_FILE;
|
||||
FLUSH LOCAL HOSTS;
|
||||
FLUSH LOCAL QUERY CACHE;
|
||||
FLUSH LOCAL STATUS;
|
||||
@@ -90,7 +89,6 @@ INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
set wsrep_on=0;
|
||||
FLUSH DES_KEY_FILE;
|
||||
FLUSH HOSTS;
|
||||
FLUSH QUERY CACHE;
|
||||
FLUSH STATUS;
|
||||
|
||||
@@ -26,7 +26,6 @@ INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
--connection node_2
|
||||
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||
--connection node_1
|
||||
FLUSH LOCAL DES_KEY_FILE;
|
||||
FLUSH LOCAL HOSTS;
|
||||
FLUSH LOCAL QUERY CACHE;
|
||||
FLUSH LOCAL STATUS;
|
||||
@@ -89,7 +88,6 @@ INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||
--let $wsrep_last_committed_before2 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||
--connection node_1
|
||||
set wsrep_on=0;
|
||||
FLUSH DES_KEY_FILE;
|
||||
FLUSH HOSTS;
|
||||
FLUSH QUERY CACHE;
|
||||
FLUSH STATUS;
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
# Change: #
|
||||
################################################################################
|
||||
|
||||
--source include/have_des.inc
|
||||
|
||||
set time_zone="+03:00";
|
||||
--echo #
|
||||
--echo # NUMERIC FUNCTIONS
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
ALTER DATABASE test CHARACTER SET latin1 COLLATE latin1_swedish_ci;
|
||||
SET OLD_MODE=2_DIGIT_YEAR;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1
|
||||
(
|
||||
t1_BIGINT BIGINT,
|
||||
@@ -84,6 +87,7 @@ t1_VARMYSQL_0 VARCHAR(0) CHARACTER SET utf8
|
||||
) ENGINE=InnoDB;
|
||||
Warnings:
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SET OLD_MODE=DEFAULT;
|
||||
INSERT INTO t1 () VALUES ();
|
||||
SELECT
|
||||
name,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/test_db_charset_latin1.inc
|
||||
--enable_prepare_warnings
|
||||
|
||||
SET OLD_MODE=2_DIGIT_YEAR;
|
||||
CREATE TABLE t1
|
||||
(
|
||||
t1_BIGINT BIGINT,
|
||||
@@ -96,7 +96,7 @@ CREATE TABLE t1
|
||||
t1_VARCHAR_0 VARCHAR(0),
|
||||
t1_VARMYSQL_0 VARCHAR(0) CHARACTER SET utf8
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
SET OLD_MODE=DEFAULT;
|
||||
--disable_prepare_warnings
|
||||
|
||||
INSERT INTO t1 () VALUES ();
|
||||
|
||||
@@ -1091,8 +1091,8 @@ ST_ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)))
|
||||
# BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN
|
||||
# GEOMETRY FUNCTION ARGUMENTS
|
||||
#
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
|
||||
ERROR HY000: Illegal parameter data type bigint for operation 'geometrycollection'
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD_MODE));
|
||||
ERROR HY000: Illegal parameter data type varchar for operation 'geometrycollection'
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE
|
||||
|
||||
@@ -1086,8 +1086,8 @@ ST_ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)))
|
||||
# BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN
|
||||
# GEOMETRY FUNCTION ARGUMENTS
|
||||
#
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
|
||||
ERROR HY000: Illegal parameter data type bigint for operation 'geometrycollection'
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD_MODE));
|
||||
ERROR HY000: Illegal parameter data type varchar for operation 'geometrycollection'
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE
|
||||
|
||||
@@ -861,7 +861,7 @@ SELECT ST_ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)));
|
||||
--echo #
|
||||
--replace_regex /non geometric .* value/non geometric '' value/
|
||||
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD_MODE));
|
||||
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
@@ -854,7 +854,7 @@ SELECT ST_ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)));
|
||||
--echo #
|
||||
--replace_regex /non geometric .* value/non geometric '' value/
|
||||
--error ER_ILLEGAL_PARAMETER_DATA_TYPE_FOR_OPERATION
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
|
||||
SELECT GEOMETRYCOLLECTION((SELECT @@OLD_MODE));
|
||||
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
||||
@@ -161,7 +161,7 @@ show warnings;
|
||||
Level Code Message
|
||||
Warning 1819 simple_password_check: Not enough digits (< 3)
|
||||
Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
|
||||
set password for foo1 = old_password('4we:123:ASD!');
|
||||
set password for foo1 = password('4we:123:ASD!');
|
||||
ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
|
||||
set password for foo1 = password('qwe:123:4SD!');
|
||||
ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
|
||||
@@ -169,7 +169,7 @@ show warnings;
|
||||
Level Code Message
|
||||
Warning 1819 simple_password_check: Not enough upper case letters (< 3)
|
||||
Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
|
||||
set password for foo1 = old_password('qwe:123:ASD4');
|
||||
set password for foo1 = password('qwe:123:ASD4');
|
||||
ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
|
||||
show warnings;
|
||||
Level Code Message
|
||||
|
||||
@@ -66,12 +66,12 @@ create user foo1 identified by '123:qwe:ASD!';
|
||||
set password for foo1 = password('qwe:-23:ASD!');
|
||||
show warnings;
|
||||
--error ER_NOT_VALID_PASSWORD
|
||||
set password for foo1 = old_password('4we:123:ASD!');
|
||||
set password for foo1 = password('4we:123:ASD!');
|
||||
--error ER_NOT_VALID_PASSWORD
|
||||
set password for foo1 = password('qwe:123:4SD!');
|
||||
show warnings;
|
||||
--error ER_NOT_VALID_PASSWORD
|
||||
set password for foo1 = old_password('qwe:123:ASD4');
|
||||
set password for foo1 = password('qwe:123:ASD4');
|
||||
show warnings;
|
||||
set password for foo1 = password('qwe:123:ASD!');
|
||||
|
||||
|
||||
@@ -728,7 +728,9 @@ DROP TABLE t1;
|
||||
#
|
||||
# date and time columns
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1 (d DATE <CUSTOM_COL_OPTIONS> NOT NULL,
|
||||
dt DATETIME <CUSTOM_COL_OPTIONS> NOT NULL,
|
||||
ts TIMESTAMP <CUSTOM_COL_OPTIONS> NOT NULL,
|
||||
@@ -738,7 +740,7 @@ y4 YEAR(4) <CUSTOM_COL_OPTIONS> NOT NULL,
|
||||
y2 YEAR(2) <CUSTOM_COL_OPTIONS> NOT NULL
|
||||
) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
|
||||
Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SHOW COLUMNS IN t1;
|
||||
Field Type Null Key Default Extra
|
||||
d date # # #
|
||||
@@ -914,7 +916,7 @@ DROP TABLE t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c YEAR(2) <CUSTOM_COL_OPTIONS> NOT NULL) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
|
||||
Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SHOW COLUMNS IN t1;
|
||||
Field Type Null Key Default Extra
|
||||
c year(2) NO NULL
|
||||
@@ -925,8 +927,8 @@ CREATE TABLE t1 (c YEAR(2) <CUSTOM_COL_OPTIONS> NOT NULL,
|
||||
c2 YEAR(2) <CUSTOM_COL_OPTIONS> NOT NULL DEFAULT '12'
|
||||
) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
|
||||
Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SHOW COLUMNS IN t1;
|
||||
Field Type Null Key Default Extra
|
||||
c year(2) NO NULL
|
||||
|
||||
@@ -712,7 +712,9 @@ DROP TABLE t1;
|
||||
#
|
||||
# date and time columns
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1 (d DATE <CUSTOM_COL_OPTIONS> NULL,
|
||||
dt DATETIME <CUSTOM_COL_OPTIONS> NULL,
|
||||
ts TIMESTAMP <CUSTOM_COL_OPTIONS> NULL,
|
||||
@@ -722,7 +724,7 @@ y4 YEAR(4) <CUSTOM_COL_OPTIONS> NULL,
|
||||
y2 YEAR(2) <CUSTOM_COL_OPTIONS> NULL
|
||||
) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
|
||||
Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SHOW COLUMNS IN t1;
|
||||
Field Type Null Key Default Extra
|
||||
d date # # #
|
||||
@@ -885,7 +887,7 @@ DROP TABLE t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c YEAR(2) <CUSTOM_COL_OPTIONS> NULL) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
|
||||
Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SHOW COLUMNS IN t1;
|
||||
Field Type Null Key Default Extra
|
||||
c year(2) YES NULL
|
||||
@@ -899,9 +901,9 @@ c1 YEAR(2) <CUSTOM_COL_OPTIONS> NULL DEFAULT NULL,
|
||||
c2 YEAR(2) <CUSTOM_COL_OPTIONS> NULL DEFAULT '12'
|
||||
) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
|
||||
Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SHOW COLUMNS IN t1;
|
||||
Field Type Null Key Default Extra
|
||||
c year(2) YES NULL
|
||||
|
||||
@@ -2,10 +2,7 @@
|
||||
# Date and time column types
|
||||
# (DATE, DATETIME, TIMESTAMP, TIME, YEAR)
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
set old_mode=2_digit_year;
|
||||
|
||||
let $create_definition =
|
||||
d DATE $col_opts,
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
set old_mode=2_digit_year;
|
||||
Warnings:
|
||||
Warning 1287 '2_DIGIT_YEAR' is deprecated and will be removed in a future release
|
||||
CREATE TABLE t1 (d DATE <CUSTOM_COL_OPTIONS>,
|
||||
dt DATETIME <CUSTOM_COL_OPTIONS>,
|
||||
ts TIMESTAMP <CUSTOM_COL_OPTIONS>,
|
||||
@@ -8,7 +10,7 @@ y4 YEAR(4) <CUSTOM_COL_OPTIONS>,
|
||||
y2 YEAR(2) <CUSTOM_COL_OPTIONS>
|
||||
) ENGINE=<STORAGE_ENGINE> <CUSTOM_TABLE_OPTIONS>;
|
||||
Warnings:
|
||||
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
|
||||
Warning 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use 'YEAR(4)' instead
|
||||
SHOW COLUMNS IN t1;
|
||||
Field Type Null Key Default Extra
|
||||
d date # # #
|
||||
|
||||
@@ -8,35 +8,23 @@ SELECT @start_session_value;
|
||||
0
|
||||
'#--------------------FN_DYNVARS_054_01-------------------------#'
|
||||
SET @@global.keep_files_on_create = ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SET @@global.keep_files_on_create = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@global.keep_files_on_create;
|
||||
@@global.keep_files_on_create
|
||||
0
|
||||
SET @@session.keep_files_on_create = ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SET @@session.keep_files_on_create = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@session.keep_files_on_create;
|
||||
@@session.keep_files_on_create
|
||||
0
|
||||
'#--------------------FN_DYNVARS_054_02-------------------------#'
|
||||
SET @@global.keep_files_on_create = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@global.keep_files_on_create = 'OFF';
|
||||
@@global.keep_files_on_create = 'OFF'
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'OFF'
|
||||
SET @@session.keep_files_on_create = DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@session.keep_files_on_create = 'OFF';
|
||||
@@session.keep_files_on_create = 'OFF'
|
||||
1
|
||||
@@ -44,75 +32,51 @@ Warnings:
|
||||
Warning 1292 Truncated incorrect DECIMAL value: 'OFF'
|
||||
'#--------------------FN_DYNVARS_054_03-------------------------#'
|
||||
SET @@global.keep_files_on_create = ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@global.keep_files_on_create;
|
||||
@@global.keep_files_on_create
|
||||
1
|
||||
SET @@global.keep_files_on_create = OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@global.keep_files_on_create;
|
||||
@@global.keep_files_on_create
|
||||
0
|
||||
SET @@global.keep_files_on_create = 0;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@global.keep_files_on_create;
|
||||
@@global.keep_files_on_create
|
||||
0
|
||||
SET @@global.keep_files_on_create = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@global.keep_files_on_create;
|
||||
@@global.keep_files_on_create
|
||||
1
|
||||
SET @@global.keep_files_on_create = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@global.keep_files_on_create;
|
||||
@@global.keep_files_on_create
|
||||
1
|
||||
SET @@global.keep_files_on_create = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@global.keep_files_on_create;
|
||||
@@global.keep_files_on_create
|
||||
0
|
||||
'#--------------------FN_DYNVARS_054_04-------------------------#'
|
||||
SET @@session.keep_files_on_create = ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@session.keep_files_on_create;
|
||||
@@session.keep_files_on_create
|
||||
1
|
||||
SET @@session.keep_files_on_create = OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@session.keep_files_on_create;
|
||||
@@session.keep_files_on_create
|
||||
0
|
||||
SET @@session.keep_files_on_create = 0;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@session.keep_files_on_create;
|
||||
@@session.keep_files_on_create
|
||||
0
|
||||
SET @@session.keep_files_on_create = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@session.keep_files_on_create;
|
||||
@@session.keep_files_on_create
|
||||
1
|
||||
SET @@session.keep_files_on_create = TRUE;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@session.keep_files_on_create;
|
||||
@@session.keep_files_on_create
|
||||
1
|
||||
SET @@session.keep_files_on_create = FALSE;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@session.keep_files_on_create;
|
||||
@@session.keep_files_on_create
|
||||
0
|
||||
@@ -166,18 +130,12 @@ IF(@@session.keep_files_on_create, "ON", "OFF") = VARIABLE_VALUE
|
||||
1
|
||||
'#---------------------FN_DYNVARS_001_08----------------------#'
|
||||
SET @@keep_files_on_create = OFF;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SET @@global.keep_files_on_create = ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@keep_files_on_create = @@global.keep_files_on_create;
|
||||
@@keep_files_on_create = @@global.keep_files_on_create
|
||||
0
|
||||
'#---------------------FN_DYNVARS_001_09----------------------#'
|
||||
SET @@keep_files_on_create = ON;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@keep_files_on_create = @@local.keep_files_on_create;
|
||||
@@keep_files_on_create = @@local.keep_files_on_create
|
||||
1
|
||||
@@ -186,8 +144,6 @@ SELECT @@local.keep_files_on_create = @@session.keep_files_on_create;
|
||||
1
|
||||
'#---------------------FN_DYNVARS_001_10----------------------#'
|
||||
SET keep_files_on_create = 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@keep_files_on_create;
|
||||
@@keep_files_on_create
|
||||
1
|
||||
@@ -198,14 +154,10 @@ ERROR 42S02: Unknown table 'session' in SELECT
|
||||
SELECT keep_files_on_create = @@session.keep_files_on_create;
|
||||
ERROR 42S22: Unknown column 'keep_files_on_create' in 'SELECT'
|
||||
SET @@global.keep_files_on_create = @start_global_value;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@global.keep_files_on_create;
|
||||
@@global.keep_files_on_create
|
||||
0
|
||||
SET @@session.keep_files_on_create = @start_session_value;
|
||||
Warnings:
|
||||
Warning 1287 '@@keep_files_on_create' is deprecated and will be removed in a future release
|
||||
SELECT @@session.keep_files_on_create;
|
||||
@@session.keep_files_on_create
|
||||
0
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
select @@global.old;
|
||||
@@global.old
|
||||
0
|
||||
select @@session.old;
|
||||
@@session.old
|
||||
0
|
||||
show global variables like 'old';
|
||||
Variable_name Value
|
||||
old OFF
|
||||
show session variables like 'old';
|
||||
Variable_name Value
|
||||
old OFF
|
||||
select * from information_schema.global_variables where variable_name='old';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
OLD OFF
|
||||
select * from information_schema.session_variables where variable_name='old';
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
OLD OFF
|
||||
set global old=1;
|
||||
Warnings:
|
||||
Warning 1287 '@@old' is deprecated and will be removed in a future release. Please use '@@old_mode' instead
|
||||
set session old=1;
|
||||
Warnings:
|
||||
Warning 1287 '@@old' is deprecated and will be removed in a future release. Please use '@@old_mode' instead
|
||||
select @@global.old;
|
||||
@@global.old
|
||||
1
|
||||
select @@session.old;
|
||||
@@session.old
|
||||
1
|
||||
set @@global.old=DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@old' is deprecated and will be removed in a future release. Please use '@@old_mode' instead
|
||||
@@ -296,46 +296,3 @@ SET @@collation_database = @save_collation_database;
|
||||
#
|
||||
# End of 10.6 test
|
||||
#
|
||||
#
|
||||
# Beginning of 10.9 test
|
||||
#
|
||||
#
|
||||
# MDEV-24920: Merge "old" SQL variable to "old_mode" sql variable
|
||||
#
|
||||
# Checking that setting old will also set old_mode
|
||||
SELECT @@OLD_MODE;
|
||||
@@OLD_MODE
|
||||
UTF8_IS_UTF8MB3
|
||||
SET old= 1;
|
||||
Warnings:
|
||||
Warning 1287 '@@old' is deprecated and will be removed in a future release. Please use '@@old_mode' instead
|
||||
SELECT @@OLD_MODE;
|
||||
@@OLD_MODE
|
||||
NO_PROGRESS_INFO,UTF8_IS_UTF8MB3,IGNORE_INDEX_ONLY_FOR_JOIN,COMPAT_5_1_CHECKSUM
|
||||
SET old= DEFAULT;
|
||||
Warnings:
|
||||
Warning 1287 '@@old' is deprecated and will be removed in a future release. Please use '@@old_mode' instead
|
||||
SELECT @@OLD_MODE;
|
||||
@@OLD_MODE
|
||||
UTF8_IS_UTF8MB3
|
||||
# Checking that old_mode can be set independently as well
|
||||
SELECT @@OLD_MODE;
|
||||
@@OLD_MODE
|
||||
UTF8_IS_UTF8MB3
|
||||
SET @save_old_mode = @@OLD_MODE;
|
||||
SET @@OLD_MODE= IGNORE_INDEX_ONLY_FOR_JOIN;
|
||||
Warnings:
|
||||
Warning 1287 'IGNORE_INDEX_ONLY_FOR_JOIN' is deprecated and will be removed in a future release
|
||||
SELECT @@OLD_MODE;
|
||||
@@OLD_MODE
|
||||
IGNORE_INDEX_ONLY_FOR_JOIN
|
||||
SET @@OLD_MODE= COMPAT_5_1_CHECKSUM;
|
||||
Warnings:
|
||||
Warning 1287 'COMPAT_5_1_CHECKSUM' is deprecated and will be removed in a future release
|
||||
SELECT @@OLD_MODE;
|
||||
@@OLD_MODE
|
||||
COMPAT_5_1_CHECKSUM
|
||||
SET @@OLD_MODE= @save_old_mode;
|
||||
#
|
||||
# End of 10.9 test
|
||||
#
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user