Commit f877d924 authored by Michael Widenius's avatar Michael Widenius

Increased the version number to 10.0

- Fixed code that was not ready for a major version number > 9
- Fixed test cases that assumed max major version number could be 9
Updated version number for depricated options (will be removed in a later commit)

VERSION:
  Version number 10.0.0
client/mysqlbinlog.cc:
  Added support for major version numbers > 9
cmake/mysql_version.cmake:
  Added support for version numbers that is 0
mysql-test/r/comments.result:
  Modified test to handle version number 100000
mysql-test/r/func_system.result:
  Modified test to handle version number 100000
mysql-test/r/log_state.result:
  Updated depricated error message
mysql-test/r/sp.result:
  Modified test to handle version number 100000
mysql-test/r/subselect4.result:
  Updated depricated error message
mysql-test/r/variables.result:
  Updated depricated error message
mysql-test/suite/rpl/r/rpl_conditional_comments.result:
  Modified test to handle version number 100000
mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Modified test to handle version number 100000
mysql-test/suite/rpl/t/rpl_conditional_comments.test:
  Modified test to handle version number 100000
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
  Modified test to handle version number 100000
mysql-test/suite/sys_vars/r/debug_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/engine_condition_pushdown_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/log_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/log_slow_queries_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/multi_range_count_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/rpl_recovery_rank_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_big_selects_func.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_max_join_size_basic.result:
  Updated depricated error message
mysql-test/suite/sys_vars/r/sql_max_join_size_func.result:
  Updated depricated error message
mysql-test/t/comments.test:
  Modified test to handle version number 100000
mysql-test/t/file_contents.test:
  Modified test to handle version number 100000
mysql-test/t/func_system.test:
  Modified test to handle version number 100000
mysql-test/t/parser_not_embedded.test:
  Modified test to handle version number 100000
mysql-test/t/sp.test:
  Modified test to handle version number 100000
sql/mysqld.cc:
  Updated version number for depricated options (will be removed in a later commit)
sql/slave.cc:
  Modified test to handle version number 100000
  Better error messages
sql/sql_lex.cc:
  Modified test to handle version number 100000 in comment syntax
sql/sys_vars.cc:
  Updated version number for depricated options (will be removed in a later commit)
parent 50ce7318
MYSQL_VERSION_MAJOR=5 # Version number for MariaDB is maintained here.
MYSQL_VERSION_MINOR=5 # The version string is created from:
MYSQL_VERSION_PATCH=24 # MYSQL_VERSION_MAJOR.MYSQL_VERSION_MINOR.MYSQL_VERSION_PATCH-MYSQL_VERSION_EXTRA
#
MYSQL_VERSION_MAJOR=10
MYSQL_VERSION_MINOR=0
MYSQL_VERSION_PATCH=0
MYSQL_VERSION_EXTRA= MYSQL_VERSION_EXTRA=
/* /*
Copyright (c) 2000, 2011, Oracle and/or its affiliates. Copyright (c) 2000, 2011, Oracle and/or its affiliates.
Copyright (c) 2012, Monty Program Ab
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -1750,7 +1751,7 @@ static Exit_status check_master_version() ...@@ -1750,7 +1751,7 @@ static Exit_status check_master_version()
{ {
MYSQL_RES* res = 0; MYSQL_RES* res = 0;
MYSQL_ROW row; MYSQL_ROW row;
const char* version; uint version;
if (mysql_query(mysql, "SELECT VERSION()") || if (mysql_query(mysql, "SELECT VERSION()") ||
!(res = mysql_store_result(mysql))) !(res = mysql_store_result(mysql)))
...@@ -1766,7 +1767,7 @@ static Exit_status check_master_version() ...@@ -1766,7 +1767,7 @@ static Exit_status check_master_version()
goto err; goto err;
} }
if (!(version = row[0])) if (!(version = atoi(row[0])))
{ {
error("Could not find server version: " error("Could not find server version: "
"Master reported NULL for the version."); "Master reported NULL for the version.");
...@@ -1785,14 +1786,15 @@ static Exit_status check_master_version() ...@@ -1785,14 +1786,15 @@ static Exit_status check_master_version()
goto err; goto err;
} }
delete glob_description_event; delete glob_description_event;
switch (*version) { switch (version) {
case '3': case 3:
glob_description_event= new Format_description_log_event(1); glob_description_event= new Format_description_log_event(1);
break; break;
case '4': case 4:
glob_description_event= new Format_description_log_event(3); glob_description_event= new Format_description_log_event(3);
break; break;
case '5': case 5:
case 10:
/* /*
The server is soon going to send us its Format_description log The server is soon going to send us its Format_description log
event, unless it is a 5.0 server with 3.23 or 4.0 binlogs. event, unless it is a 5.0 server with 3.23 or 4.0 binlogs.
...@@ -1804,7 +1806,7 @@ static Exit_status check_master_version() ...@@ -1804,7 +1806,7 @@ static Exit_status check_master_version()
default: default:
glob_description_event= NULL; glob_description_event= NULL;
error("Could not find server version: " error("Could not find server version: "
"Master reported unrecognized MySQL version '%s'.", version); "Master reported unrecognized MySQL version '%s'.", row[0]);
goto err; goto err;
} }
if (!glob_description_event || !glob_description_event->is_valid()) if (!glob_description_event || !glob_description_event->is_valid())
......
...@@ -49,7 +49,9 @@ MACRO(GET_MYSQL_VERSION) ...@@ -49,7 +49,9 @@ MACRO(GET_MYSQL_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_PATCH" PATCH_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_PATCH" PATCH_VERSION)
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION)
IF(NOT MAJOR_VERSION OR NOT MINOR_VERSION OR NOT PATCH_VERSION) IF(NOT "${MAJOR_VERSION}" MATCHES "[0-9]+" OR
NOT "${MINOR_VERSION}" MATCHES "[0-9]+" OR
NOT "${PATCH_VERSION}" MATCHES "[0-9]+")
MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.") MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.")
ENDIF() ENDIF()
......
...@@ -10,7 +10,7 @@ ERROR 42000: Query was empty ...@@ -10,7 +10,7 @@ ERROR 42000: Query was empty
select 1 /*!32301 +1 */; select 1 /*!32301 +1 */;
1 +1 1 +1
2 2
select 1 /*!52301 +1 */; select 1 /*!952301 +1 */;
1 1
1 1
select 1--1; select 1--1;
...@@ -35,19 +35,19 @@ select 1 /*M!50000 +1 */; ...@@ -35,19 +35,19 @@ select 1 /*M!50000 +1 */;
select 1 /*M!50300 +1 */; select 1 /*M!50300 +1 */;
1 +1 1 +1
2 2
select 2 /*M!99999 +1 */; select 2 /*M!999999 +1 */;
2 2
2 2
select 2 /*M!0000 +1 */; select 2 /*M!0000 +1 */;
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 '0000 +1 */' at line 1 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 '0000 +1 */' at line 1
select 1/*!2*/; select 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 '2*/' at line 1 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
select 1/*!000002*/; select 1/*!0000002*/;
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 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
select 1/*!999992*/; select 1/*!999992*/;
1 1
1 1
select 1 + /*!00000 2 */ + 3 /*!99999 noise*/ + 4; select 1 + /*!00000 2 */ + 3 /*!999999 noise*/ + 4;
1 + 2 + 3 + 4 1 + 2 + 3 + 4
10 10
drop table if exists table_28779; drop table if exists table_28779;
...@@ -60,8 +60,8 @@ prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;"; ...@@ -60,8 +60,8 @@ prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=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 '' at line 1 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
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;*"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=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 '*' at line 1 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
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!998765' AND b = 'bar';";
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 '/*!98765' AND b = 'bar'' at line 1 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 '/*!998765' AND b = 'bar'' at line 1
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';*"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!998765' AND b = 'bar';*";
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 '/*!98765' AND b = 'bar';*' at line 1 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 '/*!998765' AND b = 'bar';*' at line 1
drop table table_28779; drop table table_28779;
...@@ -25,14 +25,14 @@ user() like _latin1"%@%" ...@@ -25,14 +25,14 @@ user() like _latin1"%@%"
select charset(user()); select charset(user());
charset(user()) charset(user())
utf8 utf8
select version()>="3.23.29"; select version()>="03.23.29";
version()>="3.23.29" version()>="03.23.29"
1 1
select version()>=_utf8"3.23.29"; select version()>=_utf8"03.23.29";
version()>=_utf8"3.23.29" version()>=_utf8"03.23.29"
1 1
select version()>=_latin1"3.23.29"; select version()>=_latin1"03.23.29";
version()>=_latin1"3.23.29" version()>=_latin1"03.23.29"
1 1
select charset(version()); select charset(version());
charset(version()) charset(version())
......
...@@ -199,7 +199,7 @@ SELECT @@general_log, @@log; ...@@ -199,7 +199,7 @@ SELECT @@general_log, @@log;
1 1 1 1
SET GLOBAL log = 0; SET GLOBAL log = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 10.1. Please use '@@general_log' instead
SHOW VARIABLES LIKE 'general_log'; SHOW VARIABLES LIKE 'general_log';
Variable_name Value Variable_name Value
general_log OFF general_log OFF
...@@ -230,7 +230,7 @@ SELECT @@slow_query_log, @@log_slow_queries; ...@@ -230,7 +230,7 @@ SELECT @@slow_query_log, @@log_slow_queries;
0 0 0 0
SET GLOBAL log_slow_queries = 0; SET GLOBAL log_slow_queries = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SHOW VARIABLES LIKE 'slow_query_log'; SHOW VARIABLES LIKE 'slow_query_log';
Variable_name Value Variable_name Value
slow_query_log OFF slow_query_log OFF
...@@ -283,16 +283,16 @@ SET GLOBAL slow_query_log_file = @old_slow_query_log_file; ...@@ -283,16 +283,16 @@ SET GLOBAL slow_query_log_file = @old_slow_query_log_file;
deprecated: deprecated:
SET GLOBAL log = 0; SET GLOBAL log = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 10.1. Please use '@@general_log' instead
SET GLOBAL log_slow_queries = 0; SET GLOBAL log_slow_queries = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SET GLOBAL log = DEFAULT; SET GLOBAL log = DEFAULT;
Warnings: Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 10.1. Please use '@@general_log' instead
SET GLOBAL log_slow_queries = DEFAULT; SET GLOBAL log_slow_queries = DEFAULT;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
not deprecated: not deprecated:
SELECT @@global.general_log_file INTO @my_glf; SELECT @@global.general_log_file INTO @my_glf;
SELECT @@global.slow_query_log_file INTO @my_sqlf; SELECT @@global.slow_query_log_file INTO @my_sqlf;
......
...@@ -6403,14 +6403,14 @@ select 1; ...@@ -6403,14 +6403,14 @@ select 1;
/*! select 2; */ /*! select 2; */
select 3; select 3;
/*!00000 select 4; */ /*!00000 select 4; */
/*!99999 select 5; */ /*!999999 select 5; */
end end
$$ $$
create procedure proc_25411_b( create procedure proc_25411_b(
/* real comment */ /* real comment */
/*! p1 int, */ /*! p1 int, */
/*!00000 p2 int */ /*!00000 p2 int */
/*!99999 ,p3 int */ /*!999999 ,p3 int */
) )
begin begin
select p1, p2; select p1, p2;
...@@ -6418,11 +6418,11 @@ end ...@@ -6418,11 +6418,11 @@ end
$$ $$
create procedure proc_25411_c() create procedure proc_25411_c()
begin begin
select 1/*!,2*//*!00000,3*//*!99999,4*/; select 1/*!,2*//*!00000,3*//*!999999,4*/;
select 1/*! ,2*//*!00000 ,3*//*!99999 ,4*/; select 1/*! ,2*//*!00000 ,3*//*!999999 ,4*/;
select 1/*!,2 *//*!00000,3 *//*!99999,4 */; select 1/*!,2 *//*!00000,3 *//*!999999,4 */;
select 1/*! ,2 *//*!00000 ,3 *//*!99999 ,4 */; select 1/*! ,2 *//*!00000 ,3 *//*!999999 ,4 */;
select 1 /*!,2*/ /*!00000,3*/ /*!99999,4*/ ; select 1 /*!,2*/ /*!00000,3*/ /*!999999,4*/ ;
end end
$$ $$
show create procedure proc_25411_a; show create procedure proc_25411_a;
......
...@@ -271,7 +271,7 @@ set @old_optimizer_switch = @@session.optimizer_switch, ...@@ -271,7 +271,7 @@ set @old_optimizer_switch = @@session.optimizer_switch,
SET SESSION OPTIMIZER_SWITCH = 'materialization=off,semijoin=off,loosescan=off,firstmatch=off,mrr=on'; SET SESSION OPTIMIZER_SWITCH = 'materialization=off,semijoin=off,loosescan=off,firstmatch=off,mrr=on';
SET SESSION engine_condition_pushdown = 1; SET SESSION engine_condition_pushdown = 1;
Warnings: Warnings:
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 10.1. Please use '@@optimizer_switch' instead
SELECT `time_nokey` G1 FROM t1 WHERE ( `varchar_nokey` , `varchar_key` ) IN ( SELECT `time_nokey` G1 FROM t1 WHERE ( `varchar_nokey` , `varchar_key` ) IN (
SELECT `varchar_nokey` , `varchar_nokey` ) AND `varchar_key` >= 'c' HAVING G1 ORDER SELECT `varchar_nokey` , `varchar_nokey` ) AND `varchar_key` >= 'c' HAVING G1 ORDER
BY `pk` ; BY `pk` ;
...@@ -279,7 +279,7 @@ G1 ...@@ -279,7 +279,7 @@ G1
set @@session.optimizer_switch = @old_optimizer_switch, set @@session.optimizer_switch = @old_optimizer_switch,
@@session.engine_condition_pushdown = @old_engine_condition_pushdown; @@session.engine_condition_pushdown = @old_engine_condition_pushdown;
Warnings: Warnings:
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 10.1. Please use '@@optimizer_switch' instead
DROP TABLE t1; DROP TABLE t1;
# #
# During work with BUG#45863 I had problems with a query that was # During work with BUG#45863 I had problems with a query that was
...@@ -466,7 +466,7 @@ SELECT @old_icp:=@@engine_condition_pushdown; ...@@ -466,7 +466,7 @@ SELECT @old_icp:=@@engine_condition_pushdown;
# #
SET SESSION engine_condition_pushdown = 'ON'; SET SESSION engine_condition_pushdown = 'ON';
Warnings: Warnings:
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 10.1. Please use '@@optimizer_switch' instead
SELECT pk SELECT pk
FROM t2 FROM t2
...@@ -481,7 +481,7 @@ pk ...@@ -481,7 +481,7 @@ pk
# Restore old value for Index condition pushdown # Restore old value for Index condition pushdown
SET SESSION engine_condition_pushdown=@old_icp; SET SESSION engine_condition_pushdown=@old_icp;
Warnings: Warnings:
Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 7.0. Please use '@@optimizer_switch' instead Warning 1287 The syntax '@@engine_condition_pushdown' is deprecated and will be removed in MariaDB 10.1. Please use '@@optimizer_switch' instead
DROP TABLE t1,t2; DROP TABLE t1,t2;
# #
# End of 5.3 tests. # End of 5.3 tests.
......
...@@ -538,7 +538,7 @@ Warning 1292 Truncated incorrect read_buffer_size value: '100' ...@@ -538,7 +538,7 @@ Warning 1292 Truncated incorrect read_buffer_size value: '100'
set read_rnd_buffer_size=100; set read_rnd_buffer_size=100;
set global rpl_recovery_rank=100; set global rpl_recovery_rank=100;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
set global server_id=100; set global server_id=100;
set global slow_launch_time=100; set global slow_launch_time=100;
set sort_buffer_size=100; set sort_buffer_size=100;
...@@ -1060,7 +1060,7 @@ set global net_write_timeout =@my_net_write_timeout; ...@@ -1060,7 +1060,7 @@ set global net_write_timeout =@my_net_write_timeout;
set global net_read_timeout =@my_net_read_timeout; set global net_read_timeout =@my_net_read_timeout;
set global rpl_recovery_rank =@my_rpl_recovery_rank; set global rpl_recovery_rank =@my_rpl_recovery_rank;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
set global server_id =@my_server_id; set global server_id =@my_server_id;
set global slow_launch_time =@my_slow_launch_time; set global slow_launch_time =@my_slow_launch_time;
set global default_storage_engine =@my_storage_engine; set global default_storage_engine =@my_storage_engine;
......
...@@ -9,11 +9,11 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) ...@@ -9,11 +9,11 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
# ------------------------------------------------------------------ # ------------------------------------------------------------------
# In a statement, some CCs are applied while others are not. The CCs # In a statement, some CCs are applied while others are not. The CCs
# which are not applied on master will be binlogged as common comments. # which are not applied on master will be binlogged as common comments.
/*!99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /*!99999 ,(11)*/; /*!999999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /*!999999 ,(11)*/;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; /* 99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 99999 ,(11)*/ master-bin.000001 # Query # # use `test`; /* 999999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /* 999999 ,(11)*/
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
include/diff_tables.inc [master:t1,slave:t1] include/diff_tables.inc [master:t1,slave:t1]
...@@ -21,7 +21,7 @@ include/diff_tables.inc [master:t1,slave:t1] ...@@ -21,7 +21,7 @@ include/diff_tables.inc [master:t1,slave:t1]
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# Verify whether it can be binlogged correctly when executing prepared # Verify whether it can be binlogged correctly when executing prepared
# statement. # statement.
PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/'; PREPARE stmt FROM 'INSERT INTO /*!999999 blabla*/ t1 VALUES(60) /*!999999 ,(61)*/';
EXECUTE stmt; EXECUTE stmt;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1(c1 INT); CREATE TABLE t1(c1 INT);
...@@ -29,7 +29,7 @@ EXECUTE stmt; ...@@ -29,7 +29,7 @@ EXECUTE stmt;
include/diff_tables.inc [master:t1,slave:t1] include/diff_tables.inc [master:t1,slave:t1]
SET @value=62; SET @value=62;
PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; PREPARE stmt FROM 'INSERT INTO /*!999999 blabla */ t1 VALUES(?) /*!999999 ,(63)*/';
EXECUTE stmt USING @value; EXECUTE stmt USING @value;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1(c1 INT); CREATE TABLE t1(c1 INT);
...@@ -37,20 +37,20 @@ EXECUTE stmt USING @value; ...@@ -37,20 +37,20 @@ EXECUTE stmt USING @value;
show binlog events from <binlog_start>; show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla*/ t1 VALUES(60) /* 99999 ,(61)*/ master-bin.000001 # Query # # use `test`; INSERT INTO /* 999999 blabla*/ t1 VALUES(60) /* 999999 ,(61)*/
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla*/ t1 VALUES(60) /* 99999 ,(61)*/ master-bin.000001 # Query # # use `test`; INSERT INTO /* 999999 blabla*/ t1 VALUES(60) /* 999999 ,(61)*/
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/ master-bin.000001 # Query # # use `test`; INSERT INTO /* 999999 blabla */ t1 VALUES(62) /* 999999 ,(63)*/
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT) master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
master-bin.000001 # Query # # BEGIN master-bin.000001 # Query # # BEGIN
master-bin.000001 # Query # # use `test`; INSERT INTO /* 99999 blabla */ t1 VALUES(62) /* 99999 ,(63)*/ master-bin.000001 # Query # # use `test`; INSERT INTO /* 999999 blabla */ t1 VALUES(62) /* 999999 ,(63)*/
master-bin.000001 # Query # # COMMIT master-bin.000001 # Query # # COMMIT
include/diff_tables.inc [master:t1,slave:t1] include/diff_tables.inc [master:t1,slave:t1]
...@@ -58,7 +58,7 @@ include/diff_tables.inc [master:t1,slave:t1] ...@@ -58,7 +58,7 @@ include/diff_tables.inc [master:t1,slave:t1]
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# Verify it can restore the '!', if the it is an uncomplete conditional # Verify it can restore the '!', if the it is an uncomplete conditional
# comments # comments
SELECT c1 FROM /*!99999 t1 WHEREN; SELECT c1 FROM /*!999999 t1 WHEREN;
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 '/*!99999 t1 WHEREN' at line 1 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 '/*!999999 t1 WHEREN' at line 1
DROP TABLE t1; DROP TABLE t1;
include/rpl_end.inc include/rpl_end.inc
...@@ -70,7 +70,7 @@ LOAD DATA /*!10000 LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO TABLE */ t1; ...@@ -70,7 +70,7 @@ LOAD DATA /*!10000 LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO TABLE */ t1;
LOAD DATA/*!10000 LOCAL */INFILE 'MYSQLD_DATADIR/bug43746.sql'/*!10000 INTO*/TABLE t1; LOAD DATA/*!10000 LOCAL */INFILE 'MYSQLD_DATADIR/bug43746.sql'/*!10000 INTO*/TABLE t1;
LOAD DATA/*!10000 LOCAL */INFILE 'MYSQLD_DATADIR/bug43746.sql'/* empty */INTO TABLE t1; LOAD DATA/*!10000 LOCAL */INFILE 'MYSQLD_DATADIR/bug43746.sql'/* empty */INTO TABLE t1;
LOAD DATA/*!10000 LOCAL */INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO/* empty */TABLE t1; LOAD DATA/*!10000 LOCAL */INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO/* empty */TABLE t1;
LOAD/*!99999 special comments that do not expand */DATA/*!99999 code from the future */LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql'/*!99999 have flux capacitor */INTO/*!99999 will travel */TABLE t1; LOAD/*!999999 special comments that do not expand */DATA/*!999999 code from the future */LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql'/*!999999 have flux capacitor */INTO/*!999999 will travel */TABLE t1;
SET sql_mode='PIPES_AS_CONCAT,ANSI_QUOTES,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER'; SET sql_mode='PIPES_AS_CONCAT,ANSI_QUOTES,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER';
LOAD DATA LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO TABLE t1; LOAD DATA LOCAL INFILE 'MYSQLD_DATADIR/bug43746.sql' INTO TABLE t1;
[slave] [slave]
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# master. So they become common comments and will not be applied on slave. # master. So they become common comments and will not be applied on slave.
# #
# - Example: # - Example:
# 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /*!99999 ,(3)*/ # 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /*!999999 ,(3)*/
# will be binlogged as # will be binlogged as
# 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/'. # 'INSERT INTO t1 VALUES (1) /*!10000, (2)*/ /* 99999 ,(3)*/'.
############################################################################### ###############################################################################
...@@ -21,7 +21,7 @@ let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); ...@@ -21,7 +21,7 @@ let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
--echo # In a statement, some CCs are applied while others are not. The CCs --echo # In a statement, some CCs are applied while others are not. The CCs
--echo # which are not applied on master will be binlogged as common comments. --echo # which are not applied on master will be binlogged as common comments.
/*!99999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /*!99999 ,(11)*/; /*!999999 --- */INSERT /*!INTO*/ /*!10000 t1 */ VALUES(10) /*!999999 ,(11)*/;
source include/show_binlog_events.inc; source include/show_binlog_events.inc;
let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1); let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
...@@ -35,7 +35,7 @@ sync_slave_with_master; ...@@ -35,7 +35,7 @@ sync_slave_with_master;
--echo # Verify whether it can be binlogged correctly when executing prepared --echo # Verify whether it can be binlogged correctly when executing prepared
--echo # statement. --echo # statement.
--connection master --connection master
PREPARE stmt FROM 'INSERT INTO /*!99999 blabla*/ t1 VALUES(60) /*!99999 ,(61)*/'; PREPARE stmt FROM 'INSERT INTO /*!999999 blabla*/ t1 VALUES(60) /*!999999 ,(61)*/';
EXECUTE stmt; EXECUTE stmt;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1(c1 INT); CREATE TABLE t1(c1 INT);
...@@ -48,7 +48,7 @@ sync_slave_with_master; ...@@ -48,7 +48,7 @@ sync_slave_with_master;
--connection master --connection master
--echo --echo
SET @value=62; SET @value=62;
PREPARE stmt FROM 'INSERT INTO /*!99999 blabla */ t1 VALUES(?) /*!99999 ,(63)*/'; PREPARE stmt FROM 'INSERT INTO /*!999999 blabla */ t1 VALUES(?) /*!999999 ,(63)*/';
EXECUTE stmt USING @value; EXECUTE stmt USING @value;
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1(c1 INT); CREATE TABLE t1(c1 INT);
...@@ -68,7 +68,7 @@ sync_slave_with_master; ...@@ -68,7 +68,7 @@ sync_slave_with_master;
--echo # comments --echo # comments
--connection master --connection master
--error 1064 --error 1064
SELECT c1 FROM /*!99999 t1 WHEREN; SELECT c1 FROM /*!999999 t1 WHEREN;
DROP TABLE t1; DROP TABLE t1;
--source include/rpl_end.inc --source include/rpl_end.inc
...@@ -141,7 +141,7 @@ eval LOAD DATA/*!10000 LOCAL */INFILE '$MYSQLD_DATADIR/bug43746.sql'/* empty */I ...@@ -141,7 +141,7 @@ eval LOAD DATA/*!10000 LOCAL */INFILE '$MYSQLD_DATADIR/bug43746.sql'/* empty */I
eval LOAD DATA/*!10000 LOCAL */INFILE '$MYSQLD_DATADIR/bug43746.sql' INTO/* empty */TABLE t1; eval LOAD DATA/*!10000 LOCAL */INFILE '$MYSQLD_DATADIR/bug43746.sql' INTO/* empty */TABLE t1;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR --replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
eval LOAD/*!99999 special comments that do not expand */DATA/*!99999 code from the future */LOCAL INFILE '$MYSQLD_DATADIR/bug43746.sql'/*!99999 have flux capacitor */INTO/*!99999 will travel */TABLE t1; eval LOAD/*!999999 special comments that do not expand */DATA/*!999999 code from the future */LOCAL INFILE '$MYSQLD_DATADIR/bug43746.sql'/*!999999 have flux capacitor */INTO/*!999999 will travel */TABLE t1;
SET sql_mode='PIPES_AS_CONCAT,ANSI_QUOTES,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER'; SET sql_mode='PIPES_AS_CONCAT,ANSI_QUOTES,NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER';
......
set session debug="L"; set session debug="L";
Warnings: Warnings:
Warning 1287 The syntax '@@debug' is deprecated and will be removed in MariaDB 5.6. Please use '@@debug_dbug' instead Warning 1287 The syntax '@@debug' is deprecated and will be removed in MariaDB 10.1. Please use '@@debug_dbug' instead
select @@global.debug="1"; select @@global.debug="1";
@@global.debug="1" @@global.debug="1"
0 0
......
...@@ -8,10 +8,10 @@ INIT_VALUE ...@@ -8,10 +8,10 @@ INIT_VALUE
1 1
SET @@global.log = ON; SET @@global.log = ON;
Warnings: Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 10.1. Please use '@@general_log' instead
SET global log = 0; SET global log = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 10.1. Please use '@@general_log' instead
'#--------------------FN_DYNVARS_062_02-------------------------#' '#--------------------FN_DYNVARS_062_02-------------------------#'
SELECT VARIABLE_VALUE SELECT VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
...@@ -20,4 +20,4 @@ VARIABLE_VALUE ...@@ -20,4 +20,4 @@ VARIABLE_VALUE
OFF OFF
SET @@global.log= @start_log; SET @@global.log= @start_log;
Warnings: Warnings:
Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 7.0. Please use '@@general_log' instead Warning 1287 The syntax '@@log' is deprecated and will be removed in MariaDB 10.1. Please use '@@general_log' instead
...@@ -5,20 +5,20 @@ SELECT @start_value; ...@@ -5,20 +5,20 @@ SELECT @start_value;
'#---------------------FN_DYNVARS_004_01-------------------------#' '#---------------------FN_DYNVARS_004_01-------------------------#'
SET @@global.log_slow_queries = DEFAULT; SET @@global.log_slow_queries = DEFAULT;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries = 0; SELECT @@global.log_slow_queries = 0;
@@global.log_slow_queries = 0 @@global.log_slow_queries = 0
1 1
'#--------------------FN_DYNVARS_004_02------------------------#' '#--------------------FN_DYNVARS_004_02------------------------#'
SET @@global.log_slow_queries = ON; SET @@global.log_slow_queries = ON;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries; SELECT @@global.log_slow_queries;
@@global.log_slow_queries @@global.log_slow_queries
1 1
SET @@global.log_slow_queries = OFF; SET @@global.log_slow_queries = OFF;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries; SELECT @@global.log_slow_queries;
@@global.log_slow_queries @@global.log_slow_queries
0 0
...@@ -61,7 +61,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE ...@@ -61,7 +61,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
'#---------------------FN_DYNVARS_004_06----------------------#' '#---------------------FN_DYNVARS_004_06----------------------#'
SET @@global.log_slow_queries = 0; SET @@global.log_slow_queries = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries; SELECT @@global.log_slow_queries;
@@global.log_slow_queries @@global.log_slow_queries
0 0
...@@ -72,7 +72,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE ...@@ -72,7 +72,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1 1
SET @@global.log_slow_queries = 1; SET @@global.log_slow_queries = 1;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries; SELECT @@global.log_slow_queries;
@@global.log_slow_queries @@global.log_slow_queries
1 1
...@@ -84,7 +84,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE ...@@ -84,7 +84,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
'#---------------------FN_DYNVARS_004_07----------------------#' '#---------------------FN_DYNVARS_004_07----------------------#'
SET @@global.log_slow_queries = TRUE; SET @@global.log_slow_queries = TRUE;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries; SELECT @@global.log_slow_queries;
@@global.log_slow_queries @@global.log_slow_queries
1 1
...@@ -95,7 +95,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE ...@@ -95,7 +95,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
1 1
SET @@global.log_slow_queries = FALSE; SET @@global.log_slow_queries = FALSE;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries; SELECT @@global.log_slow_queries;
@@global.log_slow_queries @@global.log_slow_queries
0 0
...@@ -107,7 +107,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE ...@@ -107,7 +107,7 @@ IF(@@global.log_slow_queries, "ON", "OFF") = VARIABLE_VALUE
'#---------------------FN_DYNVARS_004_08----------------------#' '#---------------------FN_DYNVARS_004_08----------------------#'
SET @@global.log_slow_queries = ON; SET @@global.log_slow_queries = ON;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SELECT @@log_slow_queries = @@global.log_slow_queries; SELECT @@log_slow_queries = @@global.log_slow_queries;
@@log_slow_queries = @@global.log_slow_queries @@log_slow_queries = @@global.log_slow_queries
1 1
...@@ -126,7 +126,7 @@ SELECT log_slow_queries = @@session.log_slow_queries; ...@@ -126,7 +126,7 @@ SELECT log_slow_queries = @@session.log_slow_queries;
ERROR 42S22: Unknown column 'log_slow_queries' in 'field list' ERROR 42S22: Unknown column 'log_slow_queries' in 'field list'
SET @@global.log_slow_queries = @start_value; SET @@global.log_slow_queries = @start_value;
Warnings: Warnings:
Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 7.0. Please use '@@slow_query_log' instead Warning 1287 The syntax '@@log_slow_queries' is deprecated and will be removed in MariaDB 10.1. Please use '@@slow_query_log' instead
SELECT @@global.log_slow_queries; SELECT @@global.log_slow_queries;
@@global.log_slow_queries @@global.log_slow_queries
1 1
...@@ -5,29 +5,29 @@ SELECT @start_global_value; ...@@ -5,29 +5,29 @@ SELECT @start_global_value;
'#--------------------FN_DYNVARS_142_01-------------------------#' '#--------------------FN_DYNVARS_142_01-------------------------#'
SET @@global.rpl_recovery_rank = 500000; SET @@global.rpl_recovery_rank = 500000;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SET @@global.rpl_recovery_rank = DEFAULT; SET @@global.rpl_recovery_rank = DEFAULT;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
0 0
'#--------------------FN_DYNVARS_142_02-------------------------#' '#--------------------FN_DYNVARS_142_02-------------------------#'
SET @@global.rpl_recovery_rank = 0; SET @@global.rpl_recovery_rank = 0;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
0 0
SET @@global.rpl_recovery_rank = 1024; SET @@global.rpl_recovery_rank = 1024;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
1024 1024
SET @@global.rpl_recovery_rank = 123456789; SET @@global.rpl_recovery_rank = 123456789;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
123456789 123456789
...@@ -53,21 +53,21 @@ ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set ...@@ -53,21 +53,21 @@ ERROR HY000: Variable 'rpl_recovery_rank' is a GLOBAL variable and should be set
'#------------------FN_DYNVARS_142_04-----------------------#' '#------------------FN_DYNVARS_142_04-----------------------#'
SET @@global.rpl_recovery_rank = -1; SET @@global.rpl_recovery_rank = -1;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1' Warning 1292 Truncated incorrect rpl_recovery_rank value: '-1'
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
0 0
SET @@global.rpl_recovery_rank = -2147483648; SET @@global.rpl_recovery_rank = -2147483648;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648' Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483648'
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
0 0
SET @@global.rpl_recovery_rank = -2147483649; SET @@global.rpl_recovery_rank = -2147483649;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649' Warning 1292 Truncated incorrect rpl_recovery_rank value: '-2147483649'
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
...@@ -81,7 +81,7 @@ ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank' ...@@ -81,7 +81,7 @@ ERROR 42000: Incorrect argument type to variable 'rpl_recovery_rank'
'#------------------FN_DYNVARS_142_05-----------------------#' '#------------------FN_DYNVARS_142_05-----------------------#'
SET @@global.rpl_recovery_rank = 3000; SET @@global.rpl_recovery_rank = 3000;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE SELECT @@global.rpl_recovery_rank = VARIABLE_VALUE
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='rpl_recovery_rank'; WHERE VARIABLE_NAME='rpl_recovery_rank';
...@@ -96,20 +96,20 @@ count(VARIABLE_VALUE) ...@@ -96,20 +96,20 @@ count(VARIABLE_VALUE)
'#------------------FN_DYNVARS_142_07-----------------------#' '#------------------FN_DYNVARS_142_07-----------------------#'
SET @@global.rpl_recovery_rank = TRUE; SET @@global.rpl_recovery_rank = TRUE;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
1 1
SET @@global.rpl_recovery_rank = FALSE; SET @@global.rpl_recovery_rank = FALSE;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
0 0
'#---------------------FN_DYNVARS_001_08----------------------#' '#---------------------FN_DYNVARS_001_08----------------------#'
SET @@global.rpl_recovery_rank = 512; SET @@global.rpl_recovery_rank = 512;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank; SELECT @@rpl_recovery_rank = @@global.rpl_recovery_rank;
@@rpl_recovery_rank = @@global.rpl_recovery_rank @@rpl_recovery_rank = @@global.rpl_recovery_rank
1 1
...@@ -123,10 +123,10 @@ SELECT @@rpl_recovery_rank; ...@@ -123,10 +123,10 @@ SELECT @@rpl_recovery_rank;
512 512
SET global rpl_recovery_rank = 64; SET global rpl_recovery_rank = 64;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SET @@global.rpl_recovery_rank = @start_global_value; SET @@global.rpl_recovery_rank = @start_global_value;
Warnings: Warnings:
Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 7.0. Warning 1287 The syntax '@@rpl_recovery_rank' is deprecated and will be removed in MariaDB 10.1.
SELECT @@global.rpl_recovery_rank; SELECT @@global.rpl_recovery_rank;
@@global.rpl_recovery_rank @@global.rpl_recovery_rank
0 0
...@@ -5,7 +5,7 @@ SET @session_max_join_size = @@SESSION.max_join_size; ...@@ -5,7 +5,7 @@ SET @session_max_join_size = @@SESSION.max_join_size;
SET @global_max_join_size = @@GLOBAL.max_join_size; SET @global_max_join_size = @@GLOBAL.max_join_size;
SET SQL_MAX_JOIN_SIZE=9; SET SQL_MAX_JOIN_SIZE=9;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
CREATE TEMPORARY TABLE t1(a varchar(20) not null, b varchar(20)); CREATE TEMPORARY TABLE t1(a varchar(20) not null, b varchar(20));
CREATE TEMPORARY TABLE t2(a varchar(20) null, b varchar(20)); CREATE TEMPORARY TABLE t2(a varchar(20) null, b varchar(20));
INSERT INTO t1 VALUES('aa','bb'); INSERT INTO t1 VALUES('aa','bb');
......
...@@ -22,10 +22,10 @@ VARIABLE_NAME VARIABLE_VALUE ...@@ -22,10 +22,10 @@ VARIABLE_NAME VARIABLE_VALUE
SQL_MAX_JOIN_SIZE 18446744073709551615 SQL_MAX_JOIN_SIZE 18446744073709551615
set global sql_max_join_size=10; set global sql_max_join_size=10;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
set session sql_max_join_size=20; set session sql_max_join_size=20;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
select @@global.sql_max_join_size; select @@global.sql_max_join_size;
@@global.sql_max_join_size @@global.sql_max_join_size
10 10
...@@ -55,20 +55,20 @@ select @@sql_big_selects; ...@@ -55,20 +55,20 @@ select @@sql_big_selects;
0 0
set sql_max_join_size=cast(-1 as unsigned int); set sql_max_join_size=cast(-1 as unsigned int);
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
Note 1105 Cast to unsigned converted negative integer to it's positive complement Note 1105 Cast to unsigned converted negative integer to it's positive complement
select @@sql_big_selects; select @@sql_big_selects;
@@sql_big_selects @@sql_big_selects
1 1
set sql_max_join_size=100; set sql_max_join_size=100;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
select @@sql_big_selects; select @@sql_big_selects;
@@sql_big_selects @@sql_big_selects
0 0
SET @@global.sql_max_join_size = @start_global_value; SET @@global.sql_max_join_size = @start_global_value;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
SELECT @@global.sql_max_join_size; SELECT @@global.sql_max_join_size;
@@global.sql_max_join_size @@global.sql_max_join_size
18446744073709551615 18446744073709551615
...@@ -17,7 +17,7 @@ INSERT INTO t2 VALUES('aa4','bb'); ...@@ -17,7 +17,7 @@ INSERT INTO t2 VALUES('aa4','bb');
'#--------------------FN_DYNVARS_161_01-------------------------#' '#--------------------FN_DYNVARS_161_01-------------------------#'
SET SESSION sql_max_join_size=9; SET SESSION sql_max_join_size=9;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a; SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
Expected error The SELECT would examine more than MAX_JOIN_SIZE rows. Expected error The SELECT would examine more than MAX_JOIN_SIZE rows.
...@@ -33,7 +33,7 @@ aa4 bb aa4 bb ...@@ -33,7 +33,7 @@ aa4 bb aa4 bb
This should work This should work
SET SESSION sql_max_join_size=DEFAULT; SET SESSION sql_max_join_size=DEFAULT;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
DELETE FROM t2 WHERE a = 'aa4'; DELETE FROM t2 WHERE a = 'aa4';
SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a; SELECT * FROM t1 INNER JOIN t2 ON t1.a = t2.a;
a b a b a b a b
...@@ -45,7 +45,7 @@ This should work ...@@ -45,7 +45,7 @@ This should work
'#----------------------------FN_DYNVARS_136_05-------------------------#' '#----------------------------FN_DYNVARS_136_05-------------------------#'
SET GLOBAL sql_max_join_size = 4; SET GLOBAL sql_max_join_size = 4;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
** Connecting con_int1 using root ** ** Connecting con_int1 using root **
** Connection con_int1 ** ** Connection con_int1 **
SELECT @@SESSION.sql_max_join_size; SELECT @@SESSION.sql_max_join_size;
...@@ -54,7 +54,7 @@ SELECT @@SESSION.sql_max_join_size; ...@@ -54,7 +54,7 @@ SELECT @@SESSION.sql_max_join_size;
4 Expected 4 Expected
SET SESSION sql_max_join_size = 2; SET SESSION sql_max_join_size = 2;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
** Connecting con_int2 using root ** ** Connecting con_int2 using root **
** Connection con_int2 ** ** Connection con_int2 **
SELECT @@SESSION.sql_max_join_size; SELECT @@SESSION.sql_max_join_size;
...@@ -63,7 +63,7 @@ SELECT @@SESSION.sql_max_join_size; ...@@ -63,7 +63,7 @@ SELECT @@SESSION.sql_max_join_size;
4 Expected 4 Expected
SET SESSION sql_max_join_size = 10; SET SESSION sql_max_join_size = 10;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
** Connection con_int2 ** ** Connection con_int2 **
SELECT @@SESSION.sql_max_join_size; SELECT @@SESSION.sql_max_join_size;
@@SESSION.sql_max_join_size @@SESSION.sql_max_join_size
...@@ -82,10 +82,10 @@ SELECT @@GLOBAL.sql_max_join_size; ...@@ -82,10 +82,10 @@ SELECT @@GLOBAL.sql_max_join_size;
Disconnecting Connections con_int1, con_int2 Disconnecting Connections con_int1, con_int2
SET @@SESSION.sql_max_join_size = @session_max_join_size; SET @@SESSION.sql_max_join_size = @session_max_join_size;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
SET @@GLOBAL.sql_max_join_size = @global_max_join_size ; SET @@GLOBAL.sql_max_join_size = @global_max_join_size ;
Warnings: Warnings:
Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 7.0. Please use '@@max_join_size' instead Warning 1287 The syntax '@@sql_max_join_size' is deprecated and will be removed in MariaDB 10.1. Please use '@@max_join_size' instead
SET @@SESSION.sql_big_selects = @session_sql_big_selects; SET @@SESSION.sql_big_selects = @session_sql_big_selects;
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
...@@ -8,7 +8,7 @@ multi line comment */; ...@@ -8,7 +8,7 @@ multi line comment */;
--error 1065 --error 1065
; ;
select 1 /*!32301 +1 */; select 1 /*!32301 +1 */;
select 1 /*!52301 +1 */; select 1 /*!952301 +1 */;
select 1--1; select 1--1;
# Note that the following returns 4 while it should return 2 # Note that the following returns 4 while it should return 2
# This is because the mysqld server doesn't parse -- comments # This is because the mysqld server doesn't parse -- comments
...@@ -27,7 +27,7 @@ select 1 # The rest of the row will be ignored ...@@ -27,7 +27,7 @@ select 1 # The rest of the row will be ignored
select 1 /*M! +1 */; select 1 /*M! +1 */;
select 1 /*M!50000 +1 */; select 1 /*M!50000 +1 */;
select 1 /*M!50300 +1 */; select 1 /*M!50300 +1 */;
select 2 /*M!99999 +1 */; select 2 /*M!999999 +1 */;
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
select 2 /*M!0000 +1 */; select 2 /*M!0000 +1 */;
...@@ -39,11 +39,11 @@ select 2 /*M!0000 +1 */; ...@@ -39,11 +39,11 @@ select 2 /*M!0000 +1 */;
select 1/*!2*/; select 1/*!2*/;
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
select 1/*!000002*/; select 1/*!0000002*/;
select 1/*!999992*/; select 1/*!999992*/;
select 1 + /*!00000 2 */ + 3 /*!99999 noise*/ + 4; select 1 + /*!00000 2 */ + 3 /*!999999 noise*/ + 4;
# #
# Bug#28779 (mysql_query() allows execution of statements with unbalanced # Bug#28779 (mysql_query() allows execution of statements with unbalanced
...@@ -69,10 +69,10 @@ prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;"; ...@@ -69,10 +69,10 @@ prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;";
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;*"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*! AND 2=2;*";
--error 1064 --error 1064
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!998765' AND b = 'bar';";
--error 1064 --error 1064
prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!98765' AND b = 'bar';*"; prepare bar from "DELETE FROM table_28779 WHERE a = 7 OR 1=1/*!998765' AND b = 'bar';*";
drop table table_28779; drop table table_28779;
...@@ -46,7 +46,7 @@ $found_version = "No line 'MySQL source #.#.#'"; ...@@ -46,7 +46,7 @@ $found_version = "No line 'MySQL source #.#.#'";
$found_revision = "No line 'revision-id: .....'"; $found_revision = "No line 'revision-id: .....'";
open(I_SRC,"<","$dir_docs/INFO_SRC") or print "Cannot open 'INFO_SRC' in '$dir_docs' (starting from bindir '$dir_bin')\n"; open(I_SRC,"<","$dir_docs/INFO_SRC") or print "Cannot open 'INFO_SRC' in '$dir_docs' (starting from bindir '$dir_bin')\n";
while(defined ($line = <I_SRC>)) { while(defined ($line = <I_SRC>)) {
if ($line =~ m|^MySQL source \d\.\d\.\d+|) {$found_version = "Found MySQL version number";} if ($line =~ m|^MySQL source \d+\.\d\.\d+|) {$found_version = "Found MySQL version number";}
if ($line =~ m|^revision-id: .*@.*-2\d{13}-\w+$|) {$found_revision = "Found BZR revision id";} if ($line =~ m|^revision-id: .*@.*-2\d{13}-\w+$|) {$found_revision = "Found BZR revision id";}
} }
close I_SRC; close I_SRC;
......
...@@ -13,9 +13,9 @@ select user() like _utf8"%@%"; ...@@ -13,9 +13,9 @@ select user() like _utf8"%@%";
select user() like _latin1"%@%"; select user() like _latin1"%@%";
select charset(user()); select charset(user());
select version()>="3.23.29"; select version()>="03.23.29";
select version()>=_utf8"3.23.29"; select version()>=_utf8"03.23.29";
select version()>=_latin1"3.23.29"; select version()>=_latin1"03.23.29";
select charset(version()); select charset(version());
explain extended select database(), user(); explain extended select database(), user();
......
...@@ -8,15 +8,15 @@ ...@@ -8,15 +8,15 @@
--write_file $MYSQLTEST_VARDIR/tmp/bug39559.sql --write_file $MYSQLTEST_VARDIR/tmp/bug39559.sql
select 2 as expected, /*!01000/**/*/ 2 as result; select 2 as expected, /*!01000/**/*/ 2 as result;
select 1 as expected, /*!99998/**/*/ 1 as result; select 1 as expected, /*!999998/**/*/ 1 as result;
select 3 as expected, /*!01000 1 + */ 2 as result; select 3 as expected, /*!01000 1 + */ 2 as result;
select 2 as expected, /*!99990 1 + */ 2 as result; select 2 as expected, /*!999990 1 + */ 2 as result;
select 7 as expected, /*!01000 1 + /* 8 + */ 2 + */ 4 as result; select 7 as expected, /*!01000 1 + /* 8 + */ 2 + */ 4 as result;
select 8 as expected, /*!99998 1 + /* 2 + */ 4 + */ 8 as result; select 8 as expected, /*!999998 1 + /* 2 + */ 4 + */ 8 as result;
select 7 as expected, /*!01000 1 + /*!01000 8 + */ 2 + */ 4 as result; select 7 as expected, /*!01000 1 + /*!01000 8 + */ 2 + */ 4 as result;
select 7 as expected, /*!01000 1 + /*!99998 8 + */ 2 + */ 4 as result; select 7 as expected, /*!01000 1 + /*!999998 8 + */ 2 + */ 4 as result;
select 4 as expected, /*!99998 1 + /*!99998 8 + */ 2 + */ 4 as result; select 4 as expected, /*!999998 1 + /*!999998 8 + */ 2 + */ 4 as result;
select 4 as expected, /*!99998 1 + /*!01000 8 + */ 2 + */ 4 as result; select 4 as expected, /*!999998 1 + /*!01000 8 + */ 2 + */ 4 as result;
select 7 as expected, /*!01000 1 + /*!01000 8 + /*!01000 error */ 16 + */ 2 + */ 4 as result; select 7 as expected, /*!01000 1 + /*!01000 8 + /*!01000 error */ 16 + */ 2 + */ 4 as result;
select 4 as expected, /* 1 + /*!01000 8 + */ 2 + */ 4; select 4 as expected, /* 1 + /*!01000 8 + */ 2 + */ 4;
EOF EOF
......
...@@ -7394,7 +7394,7 @@ begin ...@@ -7394,7 +7394,7 @@ begin
/*! select 2; */ /*! select 2; */
select 3; select 3;
/*!00000 select 4; */ /*!00000 select 4; */
/*!99999 select 5; */ /*!999999 select 5; */
end end
$$ $$
...@@ -7402,7 +7402,7 @@ create procedure proc_25411_b( ...@@ -7402,7 +7402,7 @@ create procedure proc_25411_b(
/* real comment */ /* real comment */
/*! p1 int, */ /*! p1 int, */
/*!00000 p2 int */ /*!00000 p2 int */
/*!99999 ,p3 int */ /*!999999 ,p3 int */
) )
begin begin
select p1, p2; select p1, p2;
...@@ -7411,11 +7411,11 @@ $$ ...@@ -7411,11 +7411,11 @@ $$
create procedure proc_25411_c() create procedure proc_25411_c()
begin begin
select 1/*!,2*//*!00000,3*//*!99999,4*/; select 1/*!,2*//*!00000,3*//*!999999,4*/;
select 1/*! ,2*//*!00000 ,3*//*!99999 ,4*/; select 1/*! ,2*//*!00000 ,3*//*!999999 ,4*/;
select 1/*!,2 *//*!00000,3 *//*!99999,4 */; select 1/*!,2 *//*!00000,3 *//*!999999,4 */;
select 1/*! ,2 *//*!00000 ,3 *//*!99999 ,4 */; select 1/*! ,2 *//*!00000 ,3 *//*!999999 ,4 */;
select 1 /*!,2*/ /*!00000,3*/ /*!99999,4*/ ; select 1 /*!,2*/ /*!00000,3*/ /*!999999,4*/ ;
end end
$$ $$
......
...@@ -7429,7 +7429,7 @@ mysqld_get_one_option(int optid, ...@@ -7429,7 +7429,7 @@ mysqld_get_one_option(int optid,
default_collation_name= 0; default_collation_name= 0;
break; break;
case 'l': case 'l':
WARN_DEPRECATED(NULL, 7, 0, "--log", "'--general-log'/'--general-log-file'"); WARN_DEPRECATED(NULL, 10, 1, "--log", "'--general-log'/'--general-log-file'");
opt_log=1; opt_log=1;
break; break;
case 'h': case 'h':
...@@ -7594,7 +7594,7 @@ mysqld_get_one_option(int optid, ...@@ -7594,7 +7594,7 @@ mysqld_get_one_option(int optid,
} }
#endif /* HAVE_REPLICATION */ #endif /* HAVE_REPLICATION */
case (int) OPT_SLOW_QUERY_LOG: case (int) OPT_SLOW_QUERY_LOG:
WARN_DEPRECATED(NULL, 7, 0, "--log-slow-queries", "'--slow-query-log'/'--slow-query-log-file'"); WARN_DEPRECATED(NULL, 10, 1, "--log-slow-queries", "'--slow-query-log'/'--slow-query-log-file'");
opt_slow_log= 1; opt_slow_log= 1;
break; break;
case (int) OPT_SAFE: case (int) OPT_SAFE:
...@@ -7609,7 +7609,7 @@ mysqld_get_one_option(int optid, ...@@ -7609,7 +7609,7 @@ mysqld_get_one_option(int optid,
case (int) OPT_SKIP_PRIOR: case (int) OPT_SKIP_PRIOR:
opt_specialflag|= SPECIAL_NO_PRIOR; opt_specialflag|= SPECIAL_NO_PRIOR;
sql_print_warning("The --skip-thread-priority startup option is deprecated " sql_print_warning("The --skip-thread-priority startup option is deprecated "
"and will be removed in MySQL 7.0. This option has no effect " "and will be removed in MySQL 11.0. This option has no effect "
"as the implied behavior is already the default."); "as the implied behavior is already the default.");
break; break;
case (int) OPT_SKIP_HOST_CACHE: case (int) OPT_SKIP_HOST_CACHE:
......
...@@ -1211,11 +1211,12 @@ bool is_network_error(uint errorno) ...@@ -1211,11 +1211,12 @@ bool is_network_error(uint errorno)
static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi) static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
{ {
char err_buff[MAX_SLAVE_ERRMSG]; char err_buff[MAX_SLAVE_ERRMSG], err_buff2[MAX_SLAVE_ERRMSG];
const char* errmsg= 0; const char* errmsg= 0;
int err_code= 0; int err_code= 0;
MYSQL_RES *master_res= 0; MYSQL_RES *master_res= 0;
MYSQL_ROW master_row; MYSQL_ROW master_row;
uint version= mysql_get_server_version(mysql) / 10000;
DBUG_ENTER("get_master_version_and_clock"); DBUG_ENTER("get_master_version_and_clock");
/* /*
...@@ -1227,29 +1228,34 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi) ...@@ -1227,29 +1228,34 @@ static int get_master_version_and_clock(MYSQL* mysql, Master_info* mi)
if (!my_isdigit(&my_charset_bin,*mysql->server_version)) if (!my_isdigit(&my_charset_bin,*mysql->server_version))
{ {
errmsg = "Master reported unrecognized MySQL version"; errmsg= err_buff2;
snprintf(err_buff2, sizeof(err_buff2),
"Master reported unrecognized MySQL version: %s",
mysql->server_version);
err_code= ER_SLAVE_FATAL_ERROR; err_code= ER_SLAVE_FATAL_ERROR;
sprintf(err_buff, ER(err_code), errmsg); sprintf(err_buff, ER(err_code), err_buff2);
} }
else else
{ {
/* /*
Note the following switch will bug when we have MySQL branch 30 ;) Note the following switch will bug when we have MySQL branch 30 ;)
*/ */
switch (*mysql->server_version) switch (version) {
{ case 0:
case '0': case 1:
case '1': case 2:
case '2': errmsg= err_buff2;
errmsg = "Master reported unrecognized MySQL version"; snprintf(err_buff2, sizeof(err_buff2),
"Master reported unrecognized MySQL version: %s",
mysql->server_version);
err_code= ER_SLAVE_FATAL_ERROR; err_code= ER_SLAVE_FATAL_ERROR;
sprintf(err_buff, ER(err_code), errmsg); sprintf(err_buff, ER(err_code), err_buff2);
break; break;
case '3': case 3:
mi->rli.relay_log.description_event_for_queue= new mi->rli.relay_log.description_event_for_queue= new
Format_description_log_event(1, mysql->server_version); Format_description_log_event(1, mysql->server_version);
break; break;
case '4': case 4:
mi->rli.relay_log.description_event_for_queue= new mi->rli.relay_log.description_event_for_queue= new
Format_description_log_event(3, mysql->server_version); Format_description_log_event(3, mysql->server_version);
break; break;
...@@ -1466,10 +1472,10 @@ maybe it is a *VERY OLD MASTER*."); ...@@ -1466,10 +1472,10 @@ maybe it is a *VERY OLD MASTER*.");
*/ */
/* redundant with rest of code but safer against later additions */ /* redundant with rest of code but safer against later additions */
if (*mysql->server_version == '3') if (version == 3)
goto err; goto err;
if (*mysql->server_version == '4') if (version == 4)
{ {
master_res= NULL; master_res= NULL;
if (!mysql_real_query(mysql, if (!mysql_real_query(mysql,
...@@ -1532,7 +1538,7 @@ inconsistency if replicated data deals with collation."); ...@@ -1532,7 +1538,7 @@ inconsistency if replicated data deals with collation.");
This check is only necessary for 4.x masters (and < 5.0.4 masters but This check is only necessary for 4.x masters (and < 5.0.4 masters but
those were alpha). those were alpha).
*/ */
if (*mysql->server_version == '4') if (version == 4)
{ {
master_res= NULL; master_res= NULL;
if (!mysql_real_query(mysql, STRING_WITH_LEN("SELECT @@GLOBAL.TIME_ZONE")) && if (!mysql_real_query(mysql, STRING_WITH_LEN("SELECT @@GLOBAL.TIME_ZONE")) &&
......
...@@ -1537,14 +1537,21 @@ int lex_one_token(void *arg, void *yythd) ...@@ -1537,14 +1537,21 @@ int lex_one_token(void *arg, void *yythd)
) )
{ {
ulong version; ulong version;
char *end_ptr= (char*) lip->get_ptr()+5; uint length= 5;
char *end_ptr= (char*) lip->get_ptr()+length;
int error; int error;
if (my_isdigit(cs, lip->yyPeekn(5)))
{
end_ptr++; // 6 digit number
length++;
}
version= (ulong) my_strtoll10(lip->get_ptr(), &end_ptr, &error); version= (ulong) my_strtoll10(lip->get_ptr(), &end_ptr, &error);
if (version <= MYSQL_VERSION_ID) if (version <= MYSQL_VERSION_ID)
{ {
/* Accept 'M' 'm' 'm' 'd' 'd' */ /* Accept 'M' 'm' 'm' 'd' 'd' */
lip->yySkipn(5); lip->yySkipn(length);
/* Expand the content of the special comment as real code */ /* Expand the content of the special comment as real code */
lip->set_echo(TRUE); lip->set_echo(TRUE);
state=MY_LEX_START; state=MY_LEX_START;
......
...@@ -573,7 +573,7 @@ static Sys_var_dbug Sys_dbug( ...@@ -573,7 +573,7 @@ static Sys_var_dbug Sys_dbug(
"debug", "Built-in DBUG debugger", sys_var::SESSION, "debug", "Built-in DBUG debugger", sys_var::SESSION,
CMD_LINE(OPT_ARG, '#'), DEFAULT(""), NO_MUTEX_GUARD, NOT_IN_BINLOG, CMD_LINE(OPT_ARG, '#'), DEFAULT(""), NO_MUTEX_GUARD, NOT_IN_BINLOG,
ON_CHECK(check_has_super), ON_UPDATE(0), ON_CHECK(check_has_super), ON_UPDATE(0),
DEPRECATED(50600, "'@@debug_dbug'")); DEPRECATED(100100, "'@@debug_dbug'"));
static Sys_var_dbug Sys_debug_dbug( static Sys_var_dbug Sys_debug_dbug(
"debug_dbug", "Built-in DBUG debugger", sys_var::SESSION, "debug_dbug", "Built-in DBUG debugger", sys_var::SESSION,
...@@ -1205,7 +1205,7 @@ static Sys_var_harows Sys_sql_max_join_size( ...@@ -1205,7 +1205,7 @@ static Sys_var_harows Sys_sql_max_join_size(
SESSION_VAR(max_join_size), NO_CMD_LINE, SESSION_VAR(max_join_size), NO_CMD_LINE,
VALID_RANGE(1, HA_POS_ERROR), DEFAULT(HA_POS_ERROR), BLOCK_SIZE(1), VALID_RANGE(1, HA_POS_ERROR), DEFAULT(HA_POS_ERROR), BLOCK_SIZE(1),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_max_join_size), DEPRECATED(70000, "'@@max_join_size'")); ON_UPDATE(fix_max_join_size), DEPRECATED(100100, "'@@max_join_size'"));
static Sys_var_ulong Sys_max_long_data_size( static Sys_var_ulong Sys_max_long_data_size(
"max_long_data_size", "max_long_data_size",
...@@ -1417,7 +1417,7 @@ static bool fix_optimizer_search_depth(sys_var *self, THD *thd, ...@@ -1417,7 +1417,7 @@ static bool fix_optimizer_search_depth(sys_var *self, THD *thd,
{ {
SV *sv= type == OPT_GLOBAL ? &global_system_variables : &thd->variables; SV *sv= type == OPT_GLOBAL ? &global_system_variables : &thd->variables;
if (sv->optimizer_search_depth == MAX_TABLES+2) if (sv->optimizer_search_depth == MAX_TABLES+2)
WARN_DEPRECATED(thd, 6, 0, "optimizer-search-depth=63", WARN_DEPRECATED(thd, 10, 1, "optimizer-search-depth=63",
"a search depth less than 63"); "a search depth less than 63");
return false; return false;
} }
...@@ -1678,7 +1678,7 @@ static Sys_var_ulong Sys_rpl_recovery_rank( ...@@ -1678,7 +1678,7 @@ static Sys_var_ulong Sys_rpl_recovery_rank(
GLOBAL_VAR(rpl_recovery_rank), CMD_LINE(REQUIRED_ARG), GLOBAL_VAR(rpl_recovery_rank), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1), VALID_RANGE(0, ULONG_MAX), DEFAULT(0), BLOCK_SIZE(1),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0),
DEPRECATED(70000, 0)); DEPRECATED(100100, 0));
static Sys_var_ulong Sys_range_alloc_block_size( static Sys_var_ulong Sys_range_alloc_block_size(
"range_alloc_block_size", "range_alloc_block_size",
...@@ -1692,7 +1692,7 @@ static Sys_var_ulong Sys_multi_range_count( ...@@ -1692,7 +1692,7 @@ static Sys_var_ulong Sys_multi_range_count(
SESSION_VAR(multi_range_count), CMD_LINE(REQUIRED_ARG), SESSION_VAR(multi_range_count), CMD_LINE(REQUIRED_ARG),
VALID_RANGE(1, ULONG_MAX), DEFAULT(256), BLOCK_SIZE(1), VALID_RANGE(1, ULONG_MAX), DEFAULT(256), BLOCK_SIZE(1),
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), ON_UPDATE(0),
DEPRECATED(50700, "'@@mrr_buffer_size'")); DEPRECATED(100100, "'@@mrr_buffer_size'"));
static bool fix_thd_mem_root(sys_var *self, THD *thd, enum_var_type type) static bool fix_thd_mem_root(sys_var *self, THD *thd, enum_var_type type)
{ {
...@@ -2456,7 +2456,7 @@ static Sys_var_mybool Sys_engine_condition_pushdown( ...@@ -2456,7 +2456,7 @@ static Sys_var_mybool Sys_engine_condition_pushdown(
CMD_LINE(OPT_ARG, OPT_ENGINE_CONDITION_PUSHDOWN), CMD_LINE(OPT_ARG, OPT_ENGINE_CONDITION_PUSHDOWN),
DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL), DEFAULT(TRUE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(NULL),
ON_UPDATE(fix_engine_condition_pushdown), ON_UPDATE(fix_engine_condition_pushdown),
DEPRECATED(70000, "'@@optimizer_switch'")); DEPRECATED(100100, "'@@optimizer_switch'"));
static Sys_var_plugin Sys_default_storage_engine( static Sys_var_plugin Sys_default_storage_engine(
"default_storage_engine", "The default storage engine for new tables", "default_storage_engine", "The default storage engine for new tables",
...@@ -3138,7 +3138,7 @@ static Sys_var_mybool Sys_log( ...@@ -3138,7 +3138,7 @@ static Sys_var_mybool Sys_log(
"log", "Alias for --general-log. Deprecated", "log", "Alias for --general-log. Deprecated",
GLOBAL_VAR(opt_log), NO_CMD_LINE, GLOBAL_VAR(opt_log), NO_CMD_LINE,
DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_log_state), DEPRECATED(70000, "'@@general_log'")); ON_UPDATE(fix_log_state), DEPRECATED(100100, "'@@general_log'"));
static Sys_var_mybool Sys_slow_query_log( static Sys_var_mybool Sys_slow_query_log(
"slow_query_log", "slow_query_log",
...@@ -3155,7 +3155,7 @@ static Sys_var_mybool Sys_log_slow( ...@@ -3155,7 +3155,7 @@ static Sys_var_mybool Sys_log_slow(
"Alias for --slow-query-log. Deprecated", "Alias for --slow-query-log. Deprecated",
GLOBAL_VAR(opt_slow_log), NO_CMD_LINE, GLOBAL_VAR(opt_slow_log), NO_CMD_LINE,
DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0), DEFAULT(FALSE), NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
ON_UPDATE(fix_log_state), DEPRECATED(70000, "'@@slow_query_log'")); ON_UPDATE(fix_log_state), DEPRECATED(100100, "'@@slow_query_log'"));
static bool fix_log_state(sys_var *self, THD *thd, enum_var_type type) static bool fix_log_state(sys_var *self, THD *thd, enum_var_type type)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment