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.
This commit is contained in:
parent
90a306a7ab
commit
5bc12ca9c2
@ -717,6 +717,10 @@ TRUNCATE TABLE ta_l;
|
||||
connection master_1;
|
||||
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')
|
||||
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
|
||||
connection master_1;
|
||||
|
@ -2677,6 +2677,11 @@ if ($USE_CHILD_GROUP2)
|
||||
--connection master_1
|
||||
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 deinit
|
||||
--disable_warnings
|
||||
@ -2689,6 +2694,7 @@ if ($USE_CHILD_GROUP2)
|
||||
--connection child2_2
|
||||
DROP DATABASE IF EXISTS auto_test_remote2;
|
||||
}
|
||||
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
--source test_deinit.inc
|
||||
|
@ -3552,7 +3552,8 @@ int spider_set_connect_info_default(
|
||||
if (!share->tgt_table_names[roop_count] && table_share)
|
||||
{
|
||||
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 (
|
||||
!(share->tgt_table_names[roop_count] = spider_create_table_name_string(
|
||||
table_share->table_name.str,
|
||||
|
Loading…
x
Reference in New Issue
Block a user