Commit 681976ed authored by Sergei Golubchik's avatar Sergei Golubchik

spider fixes for 11.0+

spider_rewrite plugin is not in 11.0. spider initialization code used
"11.0" for "in the distant future", but suddenly it's now

spider tests didn't expect anything beyond 10.x
parent 71a72dd7
...@@ -5,21 +5,7 @@ ...@@ -5,21 +5,7 @@
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
--enable_warnings --enable_warnings
--let $SQL_MODES= real_as_float,pipes_as_concat,ansi_quotes,ignore_space,ignore_bad_table_options,only_full_group_by,no_unsigned_subtraction,no_dir_in_create,postgresql,oracle,mssql,db2,maxdb,no_key_options,no_table_options,no_field_options,mysql323,mysql40,ansi,no_auto_value_on_zero,no_backslash_escapes,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,traditional,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length --let $SQL_MODES= real_as_float,pipes_as_concat,ansi_quotes,ignore_space,ignore_bad_table_options,only_full_group_by,no_unsigned_subtraction,no_dir_in_create,postgresql,oracle,mssql,db2,maxdb,no_key_options,no_table_options,no_field_options,mysql323,mysql40,ansi,no_auto_value_on_zero,no_backslash_escapes,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,traditional,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length,empty_string_is_null,simultaneous_assignment,time_round_fractional
if (`SELECT IF(STRCMP('$SERVER_NAME', 'MariaDB') = 0, 1, 0)`)
{
if (`SELECT IF($SERVER_MAJOR_VERSION = 10, 1, 0)`)
{
if (`SELECT IF($SERVER_MINOR_VERSION >= 3, 1, 0)`)
{
--let $SQL_MODES= $SQL_MODES,empty_string_is_null,simultaneous_assignment
}
if (`SELECT IF($SERVER_MINOR_VERSION >= 4, 1, 0)`)
{
--let $SQL_MODES= $SQL_MODES,time_round_fractional
}
}
}
--connection master_1 --connection master_1
set @old_sql_mode= @@sql_mode; set @old_sql_mode= @@sql_mode;
eval set session sql_mode= '$SQL_MODES'; eval set session sql_mode= '$SQL_MODES';
......
...@@ -538,6 +538,10 @@ static LEX_STRING spider_init_queries[] = { ...@@ -538,6 +538,10 @@ static LEX_STRING spider_init_queries[] = {
" engine=Aria transactional=1;" " engine=Aria transactional=1;"
" end if;" " end if;"
" end if;" " end if;"
/*
tables for ddl pushdown
*/
/*
" if @server_name = 'MariaDB' and" " if @server_name = 'MariaDB' and"
" (" " ("
" @server_major_version > 10 or" " @server_major_version > 10 or"
...@@ -547,7 +551,6 @@ static LEX_STRING spider_init_queries[] = { ...@@ -547,7 +551,6 @@ static LEX_STRING spider_init_queries[] = {
" )" " )"
" )" " )"
" then" " then"
" /* table for ddl pushdown */"
" create table if not exists mysql.spider_rewrite_tables(" " create table if not exists mysql.spider_rewrite_tables("
" table_id bigint unsigned not null auto_increment," " table_id bigint unsigned not null auto_increment,"
" db_name char(64) not null default ''," " db_name char(64) not null default '',"
...@@ -602,6 +605,7 @@ static LEX_STRING spider_init_queries[] = { ...@@ -602,6 +605,7 @@ static LEX_STRING spider_init_queries[] = {
" primary key (db_name, table_name, table_id, partition_id)" " primary key (db_name, table_name, table_id, partition_id)"
" ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin;" " ) engine=Aria transactional=1 default charset=utf8 collate=utf8_bin;"
" end if;" " end if;"
*/
/* /*
Fix for version 3.4 Fix for version 3.4
*/ */
...@@ -798,6 +802,10 @@ static LEX_STRING spider_init_queries[] = { ...@@ -798,6 +802,10 @@ static LEX_STRING spider_init_queries[] = {
" soname 'ha_spider.dll';" " soname 'ha_spider.dll';"
" end if;" " end if;"
" end if;" " end if;"
/*
Install spider_rewrite plugin
*/
/*
" if @server_name = 'MariaDB' and" " if @server_name = 'MariaDB' and"
" (" " ("
" @server_major_version > 10 or" " @server_major_version > 10 or"
...@@ -807,9 +815,6 @@ static LEX_STRING spider_init_queries[] = { ...@@ -807,9 +815,6 @@ static LEX_STRING spider_init_queries[] = {
" )" " )"
" )" " )"
" then" " then"
/*
Install spider_rewrite plugin
*/
" set @have_spider_i_s_rewrite_plugin := 0;" " set @have_spider_i_s_rewrite_plugin := 0;"
" select @have_spider_i_s_rewrite_plugin := 1" " select @have_spider_i_s_rewrite_plugin := 1"
" from INFORMATION_SCHEMA.plugins" " from INFORMATION_SCHEMA.plugins"
...@@ -819,11 +824,6 @@ static LEX_STRING spider_init_queries[] = { ...@@ -819,11 +824,6 @@ static LEX_STRING spider_init_queries[] = {
" where name = 'spider_rewrite';" " where name = 'spider_rewrite';"
" if @have_spider_i_s_rewrite_plugin = 0 then" " if @have_spider_i_s_rewrite_plugin = 0 then"
" if @have_spider_rewrite_plugin = 1 then" " if @have_spider_rewrite_plugin = 1 then"
" /*"
" spider_rewrite plugin is present in mysql.plugin but not in"
" information_schema.plugins. Remove spider_rewrite plugin entry"
" in mysql.plugin first."
" */"
" delete from mysql.plugin where name = 'spider_rewrite';" " delete from mysql.plugin where name = 'spider_rewrite';"
" end if;" " end if;"
" if @win_plugin = 0 then " " if @win_plugin = 0 then "
...@@ -845,6 +845,7 @@ static LEX_STRING spider_init_queries[] = { ...@@ -845,6 +845,7 @@ static LEX_STRING spider_init_queries[] = {
" end if;" " end if;"
" end if;" " end if;"
" end if;" " end if;"
*/
"end;" "end;"
)}, )},
{C_STRING_WITH_LEN( {C_STRING_WITH_LEN(
......
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