Commit 5bc12ca9 authored by Alexey Botchkov's avatar Alexey Botchkov

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.

The name of the table sent as an argument to the handler::init() has the
database name in front of it. So we should use
table_share->table_name.length.
parent 90a306a7
...@@ -717,6 +717,10 @@ TRUNCATE TABLE ta_l; ...@@ -717,6 +717,10 @@ TRUNCATE TABLE ta_l;
connection master_1; connection master_1;
SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a; SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
a b date_format(c, '%Y-%m-%d %H:%i:%s') a b date_format(c, '%Y-%m-%d %H:%i:%s')
connection master_1;
create table t2345678911234567892123456789312345678941234567895123234234(id int) ENGINE=SPIDER
COMMENT='host "192.168.21.1", user "spider", password "password", database "test32738123123123"';
drop table t2345678911234567892123456789312345678941234567895123234234;
deinit deinit
connection master_1; connection master_1;
......
...@@ -2677,6 +2677,11 @@ if ($USE_CHILD_GROUP2) ...@@ -2677,6 +2677,11 @@ if ($USE_CHILD_GROUP2)
--connection master_1 --connection master_1
SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a; SELECT a, b, date_format(c, '%Y-%m-%d %H:%i:%s') FROM ta_l ORDER BY a;
--connection master_1
create table t2345678911234567892123456789312345678941234567895123234234(id int) ENGINE=SPIDER
COMMENT='host "192.168.21.1", user "spider", password "password", database "test32738123123123"';
drop table t2345678911234567892123456789312345678941234567895123234234;
--echo --echo
--echo deinit --echo deinit
--disable_warnings --disable_warnings
...@@ -2689,6 +2694,7 @@ if ($USE_CHILD_GROUP2) ...@@ -2689,6 +2694,7 @@ if ($USE_CHILD_GROUP2)
--connection child2_2 --connection child2_2
DROP DATABASE IF EXISTS auto_test_remote2; DROP DATABASE IF EXISTS auto_test_remote2;
} }
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
--source test_deinit.inc --source test_deinit.inc
......
...@@ -3552,7 +3552,8 @@ int spider_set_connect_info_default( ...@@ -3552,7 +3552,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