mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
bug#17870 Table names conflict with Windows device names
It was impossible to create some table names on Windows (e.g. LPT1, AUX, COM1, etc). Fixed to pad dangerous names with thee "at" signs (e.g. LPT1@@@, AUX@@@, COM1@@@, and so on). include/my_sys.h: Adding new function declaration mysys/my_access.c: Adding new function check_if_legal_tablename(). It works almost like check_if_legal_filename(), but accepts a table name without extension and path, and does not check "CLOCK$". sql/sql_table.cc: Check if a dangerous table name and append @@@ strings/ctype-utf8.c: Treat "@@@" sequence in a table name as a end-of-line. mysql-test/r/ctype_filename.result: New BitKeeper file ``mysql-test/r/ctype_filename.result'' mysql-test/t/ctype_filename.test: New BitKeeper file ``mysql-test/t/ctype_filename.test''
This commit is contained in:
parent
ef4309284d
commit
aa3eb77e62
6 changed files with 142 additions and 8 deletions
21
mysql-test/t/ctype_filename.test
Normal file
21
mysql-test/t/ctype_filename.test
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--disable_warnings
|
||||
drop table if exists con, aux, nul, lpt1, com1, `clock$`;
|
||||
--enable_warnings
|
||||
|
||||
create table con (a int);
|
||||
drop table con;
|
||||
|
||||
create table aux (a int);
|
||||
drop table aux;
|
||||
|
||||
create table nul (a int);
|
||||
drop table nul;
|
||||
|
||||
create table lpt1 (a int);
|
||||
drop table lpt1;
|
||||
|
||||
create table com1 (a int);
|
||||
drop table com1;
|
||||
|
||||
create table `clock$` (a int);
|
||||
drop table `clock$`;
|
||||
Loading…
Add table
Add a link
Reference in a new issue