mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Bug #31470 ndb table with special characters in name are not discovered correctly
This commit is contained in:
parent
0bf788057d
commit
7453382acf
3 changed files with 49 additions and 2 deletions
|
@ -121,3 +121,24 @@ show tables;
|
|||
Tables_in_db
|
||||
t2
|
||||
drop database db;
|
||||
use test;
|
||||
create table `test`.`t1$EX`
|
||||
(server_id int unsigned,
|
||||
master_server_id int unsigned,
|
||||
master_epoch bigint unsigned,
|
||||
count int unsigned,
|
||||
primary key(server_id, master_server_id,
|
||||
master_epoch, count))
|
||||
engine ndb;
|
||||
show tables like '%$%';
|
||||
Tables_in_test (%$%)
|
||||
t1$EX
|
||||
use test;
|
||||
show tables like '%$%';
|
||||
Tables_in_test (%$%)
|
||||
t1$EX
|
||||
drop table `test`.`t1$EX`;
|
||||
show tables like '%$%';
|
||||
Tables_in_test (%$%)
|
||||
show tables like '%$%';
|
||||
Tables_in_test (%$%)
|
||||
|
|
|
@ -122,4 +122,31 @@ connection server2;
|
|||
show tables;
|
||||
drop database db;
|
||||
|
||||
|
||||
#
|
||||
# bug#31470, ndb table with special characters in name
|
||||
# are not discovered correctly
|
||||
connection server1;
|
||||
use test;
|
||||
create table `test`.`t1$EX`
|
||||
(server_id int unsigned,
|
||||
master_server_id int unsigned,
|
||||
master_epoch bigint unsigned,
|
||||
count int unsigned,
|
||||
primary key(server_id, master_server_id,
|
||||
master_epoch, count))
|
||||
engine ndb;
|
||||
|
||||
# check that table shows up ok on both servers
|
||||
# before bugfix table would not show up on server2
|
||||
show tables like '%$%';
|
||||
connection server2;
|
||||
use test;
|
||||
show tables like '%$%';
|
||||
|
||||
# check cleanup
|
||||
drop table `test`.`t1$EX`;
|
||||
show tables like '%$%';
|
||||
|
||||
connection server1;
|
||||
show tables like '%$%';
|
||||
|
|
|
@ -2641,8 +2641,7 @@ int ha_create_table_from_engine(THD* thd, const char *db, const char *name)
|
|||
frmblob and frmlen are set, write the frm to disk
|
||||
*/
|
||||
|
||||
(void)strxnmov(path,FN_REFLEN-1,mysql_data_home,FN_ROOTDIR,
|
||||
db,FN_ROOTDIR,name,NullS);
|
||||
build_table_filename(path, FN_REFLEN-1, db, name, "", 0);
|
||||
// Save the frm file
|
||||
error= writefrm(path, frmblob, frmlen);
|
||||
my_free(frmblob, MYF(0));
|
||||
|
|
Loading…
Reference in a new issue