| 1 |
create table t1 (pk int primary key, a int); |
| 2 |
insert into t1 values (1,1),(2,2),(3,3),(4,4); |
| 3 |
alter table t1 engine=S3; |
| 4 |
##### |
| 5 |
# mysqldump with --copy-s3-tables=0 (by default) |
| 6 |
### |
| 7 |
/*M!999999\- enable the sandbox mode */ |
| 8 |
##### |
| 9 |
# mysqldump with --copy-s3-tables=0 (by default) XML |
| 10 |
### |
| 11 |
<?xml version="1.0"?> |
| 12 |
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| 13 |
<database name="database"> |
| 14 |
</database> |
| 15 |
</mysqldump> |
| 16 |
##### |
| 17 |
# mysqldump with --copy-s3-tables=1 |
| 18 |
### |
| 19 |
/*M!999999\- enable the sandbox mode */ |
| 20 |
/*!40101 SET @saved_cs_client = @@character_set_client */; |
| 21 |
/*!40101 SET character_set_client = utf8mb4 */; |
| 22 |
CREATE TABLE `t1` ( |
| 23 |
`pk` int(11) NOT NULL, |
| 24 |
`a` int(11) DEFAULT NULL, |
| 25 |
PRIMARY KEY (`pk`) |
| 26 |
) ENGINE=Aria DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci PAGE_CHECKSUM=1; |
| 27 |
/*!40101 SET character_set_client = @saved_cs_client */; |
| 28 |
SET @OLD_AUTOCOMMIT=@@AUTOCOMMIT, @@AUTOCOMMIT=0; |
| 29 |
INSERT INTO `t1` VALUES |
| 30 |
(1,1), |
| 31 |
(2,2), |
| 32 |
(3,3), |
| 33 |
(4,4); |
| 34 |
ALTER TABLE `t1` ENGINE=S3; |
| 35 |
COMMIT; |
| 36 |
SET AUTOCOMMIT=@OLD_AUTOCOMMIT; |
| 37 |
##### |
| 38 |
# mysqldump with --copy-s3-tables=1 XML |
| 39 |
### |
| 40 |
<?xml version="1.0"?> |
| 41 |
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> |
| 42 |
<database name="database"> |
| 43 |
<table_structure name="t1"> |
| 44 |
<field Field="pk" Type="int(11)" Null="NO" Key="PRI" Extra="" Comment="" /> |
| 45 |
<field Field="a" Type="int(11)" Null="YES" Key="" Default="NULL" Extra="" Comment="" /> |
| 46 |
<key Table="t1" Non_unique="0" Key_name="PRIMARY" Seq_in_index="1" Column_name="pk" Collation="A" Cardinality="4" Null="" Index_type="BTREE" Comment="" Index_comment="" Ignored="NO" /> |
| 47 |
<options Name="t1" Engine="Aria" Version="10" Row_format="Page" Rows="4" Avg_row_length="4096" Data_length="16384" Max_data_length="17592186011648" Index_length="16384" Data_free="0" Create_time="--TIME--" Collation="utf8mb4_uca1400_ai_ci" Create_options="" Comment="" Max_index_length="9007199254732800" Temporary="N" /> |
| 48 |
</table_structure> |
| 49 |
<table_data name="t1"> |
| 50 |
<row> |
| 51 |
<field name="pk">1</field> |
| 52 |
<field name="a">1</field> |
| 53 |
</row> |
| 54 |
<row> |
| 55 |
<field name="pk">2</field> |
| 56 |
<field name="a">2</field> |
| 57 |
</row> |
| 58 |
<row> |
| 59 |
<field name="pk">3</field> |
| 60 |
<field name="a">3</field> |
| 61 |
</row> |
| 62 |
<row> |
| 63 |
<field name="pk">4</field> |
| 64 |
<field name="a">4</field> |
| 65 |
</row> |
| 66 |
</table_data> |
| 67 |
</database> |
| 68 |
</mysqldump> |
| 69 |
drop table t1; |