mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
7b0ee22df4
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
162 lines
4.5 KiB
Text
162 lines
4.5 KiB
Text
DROP TABLE IF EXISTS t1, `"t"1`;
|
|
CREATE TABLE t1(a int);
|
|
INSERT INTO t1 VALUES (1), (2);
|
|
<?xml version="1.0"?>
|
|
<mysqldump>
|
|
<database name="test">
|
|
<table_structure name="t1">
|
|
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
|
|
</table_structure>
|
|
<table_data name="t1">
|
|
<row>
|
|
<field name="a">1</field>
|
|
</row>
|
|
<row>
|
|
<field name="a">2</field>
|
|
</row>
|
|
</table_data>
|
|
</database>
|
|
</mysqldump>
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (a decimal(240, 20));
|
|
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
|
("0987654321098765432109876543210987654321");
|
|
DROP TABLE IF EXISTS `t1`;
|
|
CREATE TABLE `t1` (
|
|
`a` decimal(240,20) default NULL
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
|
|
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
|
LOCK TABLES `t1` WRITE;
|
|
INSERT INTO `t1` VALUES ("1234567890123456789012345678901234567890.00000000000000000000"),("0987654321098765432109876543210987654321.00000000000000000000");
|
|
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;
|
|
CREATE TABLE t1 (a double);
|
|
INSERT INTO t1 VALUES (-9e999999);
|
|
DROP TABLE IF EXISTS `t1`;
|
|
CREATE TABLE `t1` (
|
|
`a` double default NULL
|
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
|
|
|
|
|
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
|
LOCK TABLES `t1` WRITE;
|
|
INSERT INTO `t1` VALUES (RES);
|
|
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;
|
|
CREATE TABLE t1(a int, b text, c varchar(3));
|
|
INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
|
|
<?xml version="1.0"?>
|
|
<mysqldump>
|
|
<database name="test">
|
|
<table_structure name="t1">
|
|
<field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
|
|
<field Field="b" Type="text" Null="YES" Key="" Extra="" />
|
|
<field Field="c" Type="char(3)" Null="YES" Key="" Extra="" />
|
|
</table_structure>
|
|
<table_data name="t1">
|
|
<row>
|
|
<field name="a">1</field>
|
|
<field name="b">test</field>
|
|
<field name="c">tes</field>
|
|
</row>
|
|
<row>
|
|
<field name="a">2</field>
|
|
<field name="b">TEST</field>
|
|
<field name="c">TES</field>
|
|
</row>
|
|
</table_data>
|
|
</database>
|
|
</mysqldump>
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (`a"b"` char(2));
|
|
INSERT INTO t1 VALUES ("1\""), ("\"2");
|
|
<?xml version="1.0"?>
|
|
<mysqldump>
|
|
<database name="test">
|
|
<table_structure name="t1">
|
|
<field Field="a"b"" Type="char(2)" Null="YES" Key="" Extra="" />
|
|
</table_structure>
|
|
<table_data name="t1">
|
|
<row>
|
|
<field name="a"b"">1"</field>
|
|
</row>
|
|
<row>
|
|
<field name="a"b"">"2</field>
|
|
</row>
|
|
</table_data>
|
|
</database>
|
|
</mysqldump>
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
|
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5');
|
|
DROP TABLE IF EXISTS `t1`;
|
|
CREATE TABLE `t1` (
|
|
`a` varchar(255) default NULL
|
|
) ENGINE=MyISAM DEFAULT CHARSET=koi8r;
|
|
|
|
|
|
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
|
|
LOCK TABLES `t1` WRITE;
|
|
INSERT INTO `t1` VALUES ('абцде');
|
|
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;
|
|
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;
|