Commit 42cdc37f authored by Kentoku SHIBA's avatar Kentoku SHIBA

MDEV-22265 Connect string character limit too small for full 64 character...

MDEV-22265 Connect string character limit too small for full 64 character InnoDB table-name limit when using ad-hoc Spider server definitions.

Fix length for getting default table name.
parent e8b9d8d3
--disable_warnings
--disable_query_log
--disable_result_log
--source ../t/test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
--disable_warnings
--disable_query_log
--disable_result_log
--source ../t/test_init.inc
--enable_result_log
--enable_query_log
--enable_warnings
for master_1
for child2
for child3
this test is for MDEV-22265
drop and create databases
connection master_1;
CREATE DATABASE auto_test_local;
USE auto_test_local;
create table
connection master_1;
create table t2345678911234567892123456789312345678941234567895123(id int) ENGINE=SPIDER DEFAULT CHARSET=latin1 COMMENT='host "h114", user "spider", password "spider", port "3306", database "test32738"';
deinit
connection master_1;
DROP DATABASE IF EXISTS auto_test_local;
for master_1
for child2
for child3
end of test
!include include/default_mysqld.cnf
!include ../my_1_1.cnf
--source ../include/mdev_22265_init.inc
--echo
--echo this test is for MDEV-22265
--echo
--echo drop and create databases
--connection master_1
--disable_warnings
CREATE DATABASE auto_test_local;
USE auto_test_local;
--enable_warnings
--echo
--echo create table
--connection master_1
create table t2345678911234567892123456789312345678941234567895123(id int) ENGINE=SPIDER DEFAULT CHARSET=latin1 COMMENT='host "h114", user "spider", password "spider", port "3306", database "test32738"';
--echo
--echo deinit
--disable_warnings
--connection master_1
DROP DATABASE IF EXISTS auto_test_local;
--enable_warnings
--source ../include/mdev_22265_deinit.inc
--echo
--echo end of test
...@@ -3737,7 +3737,8 @@ int spider_set_connect_info_default( ...@@ -3737,7 +3737,8 @@ int spider_set_connect_info_default(
if (!share->tgt_table_names[roop_count] && table_share) if (!share->tgt_table_names[roop_count] && table_share)
{ {
DBUG_PRINT("info",("spider create default tgt_table_names")); DBUG_PRINT("info",("spider create default tgt_table_names"));
share->tgt_table_names_lengths[roop_count] = share->table_name_length; share->tgt_table_names_lengths[roop_count] =
table_share->table_name.length;
if ( if (
!(share->tgt_table_names[roop_count] = spider_create_table_name_string( !(share->tgt_table_names[roop_count] = spider_create_table_name_string(
table_share->table_name.str, table_share->table_name.str,
......
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