mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#2634
Emit "TYPE=" for 4.0 and 3.23 compatible modes mysql-test/r/mysqldump.result: Bug#2634 New test case mysql-test/t/mysqldump.test: Bug#2634 New test case
This commit is contained in:
@ -123,3 +123,40 @@ UNLOCK TABLES;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a int) ENGINE=MYISAM;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) TYPE=MyISAM;
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
LOCK TABLES `t1` WRITE;
|
||||
INSERT INTO `t1` VALUES (1),(2);
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) TYPE=MyISAM;
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
||||
LOCK TABLES `t1` WRITE;
|
||||
INSERT INTO `t1` VALUES (1),(2);
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
@ -53,3 +53,13 @@ CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
||||
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5');
|
||||
--exec $MYSQL_DUMP --skip-comments test t1
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug #2634
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a int) ENGINE=MYISAM;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
--exec $MYSQL_DUMP --skip-comments --compatible=mysql40 test t1
|
||||
--exec $MYSQL_DUMP --skip-comments --compatible=mysql323 test t1
|
||||
DROP TABLE t1;
|
||||
|
@ -1338,7 +1338,10 @@ store_create_info(THD *thd, TABLE *table, String *packet)
|
||||
packet->append("\n)", 2);
|
||||
if (!(thd->variables.sql_mode & MODE_NO_TABLE_OPTIONS) && !foreign_db_mode)
|
||||
{
|
||||
packet->append(" ENGINE=", 8);
|
||||
if (thd->variables.sql_mode & (MODE_MYSQL323 | MODE_MYSQL40))
|
||||
packet->append(" TYPE=", 6);
|
||||
else
|
||||
packet->append(" ENGINE=", 8);
|
||||
packet->append(file->table_type());
|
||||
|
||||
if (table->table_charset &&
|
||||
|
Reference in New Issue
Block a user