summaryrefslogtreecommitdiff
path: root/mysql-test/r/mysqldump-max.result
diff options
context:
space:
mode:
authoranozdrin/alik@ibm. <>2007-07-25 19:46:50 +0400
committeranozdrin/alik@ibm. <>2007-07-25 19:46:50 +0400
commit9f8593e81c99425a028d416854a172543a6f706d (patch)
tree76d4d080ebf7bffee03884d60d62a6cf9436fa71 /mysql-test/r/mysqldump-max.result
parent20e7e9870ad8cab26071cdad80bbfa162b489fc3 (diff)
downloadmariadb-git-9f8593e81c99425a028d416854a172543a6f706d.tar.gz
Patch inspired by BUG#10491: Server returns data as charset
binary SHOW CREATE TABLE or SELECT FROM I_S. The problem is that mysqldump generates incorrect dump for a table with non-ASCII column name if the mysqldump's character set is ASCII. The fix is to: 1. Switch character_set_client for the mysqldump's connection to binary before issuing SHOW CREATE TABLE statement in order to avoid conversion. 2. Dump switch character_set_client statements to UTF8 and back for CREATE TABLE statement.
Diffstat (limited to 'mysql-test/r/mysqldump-max.result')
-rw-r--r--mysql-test/r/mysqldump-max.result36
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/r/mysqldump-max.result b/mysql-test/r/mysqldump-max.result
index 9ae3e368e28..261c7a7f197 100644
--- a/mysql-test/r/mysqldump-max.result
+++ b/mysql-test/r/mysqldump-max.result
@@ -93,55 +93,73 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l
USE `test`;
DROP TABLE IF EXISTS `t1`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t1` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT DELAYED IGNORE INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
DROP TABLE IF EXISTS `t2`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t2` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
INSERT DELAYED IGNORE INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
DROP TABLE IF EXISTS `t3`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t3` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t3` DISABLE KEYS */;
INSERT DELAYED IGNORE INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
DROP TABLE IF EXISTS `t4`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t4` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t4` DISABLE KEYS */;
INSERT DELAYED IGNORE INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t4` ENABLE KEYS */;
DROP TABLE IF EXISTS `t5`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t5` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t5` DISABLE KEYS */;
INSERT DELAYED IGNORE INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t5` ENABLE KEYS */;
DROP TABLE IF EXISTS `t6`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t6` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t6` DISABLE KEYS */;
INSERT IGNORE INTO `t6` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
@@ -172,55 +190,73 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l
USE `test`;
DROP TABLE IF EXISTS `t1`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t1` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT DELAYED INTO `t1` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
DROP TABLE IF EXISTS `t2`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t2` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t2` DISABLE KEYS */;
INSERT DELAYED INTO `t2` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t2` ENABLE KEYS */;
DROP TABLE IF EXISTS `t3`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t3` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t3` DISABLE KEYS */;
INSERT DELAYED INTO `t3` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t3` ENABLE KEYS */;
DROP TABLE IF EXISTS `t4`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t4` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t4` DISABLE KEYS */;
INSERT DELAYED INTO `t4` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t4` ENABLE KEYS */;
DROP TABLE IF EXISTS `t5`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t5` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t5` DISABLE KEYS */;
INSERT DELAYED INTO `t5` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');
/*!40000 ALTER TABLE `t5` ENABLE KEYS */;
DROP TABLE IF EXISTS `t6`;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
CREATE TABLE `t6` (
`id` int(8) default NULL,
`name` varchar(32) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+SET character_set_client = @saved_cs_client;
/*!40000 ALTER TABLE `t6` DISABLE KEYS */;
INSERT INTO `t6` VALUES (1,'first value'),(2,'first value'),(3,'first value'),(4,'first value'),(5,'first value');