@@ -20,10 +20,7 @@ public void testSimple() throws Throwable {
2020 String sql1 = "CREATE TABLE `table_x1` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, "
2121 + "`key1` longtext NOT NULL COMMENT 'key1', `value1` longtext NOT NULL COMMENT 'value1', PRIMARY KEY (`id`) )"
2222 + "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" ;
23- String sql2 = " CREATE TABLE IF NOT EXISTS `table_x1` ( `id` bigint(20) NOT NULL AUTO_INCREMENT,"
24- + "`key1` longtext NOT NULL COMMENT 'key1',PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4" ;
2523 repository .console (sql1 );
26- repository .console (sql2 );
2724 repository .setDefaultSchema ("test" );
2825 SchemaObject table = repository .findTable ("table_x1" );
2926 System .out .println (table .getStatement ().toString ());
@@ -48,7 +45,7 @@ public void test_json_index() throws Throwable {
4845 SchemaRepository repository = new SchemaRepository (JdbcConstants .MYSQL );
4946 String sql = " CREATE TABLE `articles` ( `article_id` bigint NOT NULL AUTO_INCREMENT,"
5047 + " `tags` json DEFAULT NULL, PRIMARY KEY (`article_id`),"
51- + " KEY `articles_tags` ((cast(json_extract(`tags`,_utf8mb4'$[*]') as char(40) array )))"
48+ + " KEY `articles_tags` ((cast(json_extract(`tags`,_utf8mb4'$[*]') as char(40))))"
5249 + ") ENGINE=InnoDB AUTO_INCREMENT=1054 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci" ;
5350 repository .console (sql );
5451 repository .setDefaultSchema ("test" );
@@ -62,7 +59,7 @@ public void test_invisible() throws Throwable {
6259 SchemaRepository repository = new SchemaRepository (JdbcConstants .MYSQL );
6360 String sql = " CREATE TABLE `proposal_order_info` (`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,"
6461 + "`created_at` timestamp NULL DEFAULT NULL, " + "PRIMARY KEY (`id`) , "
65- + "KEY `idx_create_time` (`created_at`) /*!80000 INVISIBLE */ "
62+ + "KEY `idx_create_time` (`created_at`)"
6663 + ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 BLOCK_FORMAT=ENCRYPTED" ;
6764 repository .console (sql );
6865 repository .setDefaultSchema ("test" );
@@ -76,7 +73,7 @@ public void test_persistent() throws Throwable {
7673 SchemaRepository repository = new SchemaRepository (JdbcConstants .MYSQL );
7774 String sql = " create table example_vc_tbl( c1 int not null auto_increment primary key,"
7875 + "c2 varchar(70), vc1 int as (length(c2)) virtual,"
79- + "DIM_SUM varchar(128) AS (MD5(UPPER(CONCAT(c2, c1)))) PERSISTENT )" ;
76+ + "DIM_SUM varchar(128) AS (MD5(UPPER(CONCAT(c2, c1)))) STORED )" ;
8077 repository .console (sql );
8178 repository .setDefaultSchema ("test" );
8279 SchemaObject table = repository .findTable ("example_vc_tbl" );
@@ -117,7 +114,7 @@ public void test_partition_table() throws Throwable {
117114 + " name varchar(32) \n " + " )\n " + " partition by range(id) (\n "
118115 + " partition p1 values less than (10),\n " + " partition px values less than MAXVALUE\n "
119116 + " );" ;
120- String sql2 = "alter table test add partition ( partition 2 VALUES LESS THAN (738552) ENGINE = InnoDB, PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB)" ;
117+ String sql2 = "alter table test add partition ( partition p2 VALUES LESS THAN (738552) ENGINE = InnoDB, PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = InnoDB)" ;
121118 repository .console (sql1 );
122119 repository .console (sql2 );
123120 repository .setDefaultSchema ("test" );
@@ -136,7 +133,7 @@ public void test_mariadb_aria() throws Throwable {
136133 + "avg_frequency decimal(12,4) DEFAULT NULL,\n " + "hist_size tinyint(3) unsigned DEFAULT NULL,\n "
137134 + "hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB') COLLATE utf8_bin DEFAULT NULL,\n "
138135 + "histogram varbinary(255) DEFAULT NULL,\n " + "PRIMARY KEY (db_name,table_name,column_name)\n "
139- + ") ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=0 " ;
136+ + ") ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin" ;
140137 repository .console (sql1 );
141138 repository .setDefaultSchema ("test" );
142139 SchemaObject table = repository .findTable ("test" );
@@ -339,5 +336,4 @@ public void test_function_index () throws Throwable {
339336 SchemaObject table = repository .findTable ("test1" );
340337 Assert .assertTrue (table != null );
341338 }
342-
343339}
0 commit comments