1
0
mirror of https://github.com/MariaDB/server.git synced 2025-09-02 09:41:40 +03:00

Bug#31113 mysqldump 5.1 can't handle a dash ("-") in database names

db name should be quoted. this code does communication with the server.
it's always ok to quote names in this case.
This commit is contained in:
gluh@mysql.com/eagle.(none)
2007-11-02 12:24:45 +04:00
parent e0e6547296
commit b0e9fa31af
3 changed files with 34 additions and 1 deletions

View File

@@ -4212,5 +4212,24 @@ TRUNCATE mysql.event;
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
#
# Bug#31113 mysqldump 5.1 can't handle a dash ("-") in database names
#
create database `test-database`;
use `test-database`;
create table test (a int);
DROP TABLE IF EXISTS `test`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `test` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client;
LOCK TABLES `test` WRITE;
/*!40000 ALTER TABLE `test` DISABLE KEYS */;
/*!40000 ALTER TABLE `test` ENABLE KEYS */;
UNLOCK TABLES;
drop database `test-database`;
use test;
#
# End of 5.1 tests
#