@@ -328,18 +328,37 @@ def test_runner():
328328 PRIMARY KEY (id),
329329 SPATIAL KEY `coordinate` (`coordinate`)
330330) ENGINE=InnoDB AUTO_INCREMENT=2478808 DEFAULT CHARSET=latin1;
331- ''' )
331+ ''' , commit = True )
332+
333+
334+ mysql .execute (f'''
335+ CREATE TABLE `group` (
336+ id int NOT NULL AUTO_INCREMENT,
337+ name varchar(255) NOT NULL,
338+ age int,
339+ rate decimal(10,4),
340+ PRIMARY KEY (id)
341+ );
342+ ''' , commit = True )
332343
333344
334345 mysql .execute (f"INSERT INTO { TEST_TABLE_NAME } (name, age, coordinate) VALUES ('Ivan', 42, POINT(10.0, 20.0));" , commit = True )
335346 mysql .execute (f"INSERT INTO { TEST_TABLE_NAME } (name, age, coordinate) VALUES ('Peter', 33, POINT(10.0, 20.0));" , commit = True )
336347
348+ mysql .execute (f"INSERT INTO `group` (name, age, rate) VALUES ('Peter', 33, 10.2);" , commit = True )
349+
337350 run_all_runner = RunAllRunner ()
338351 run_all_runner .run ()
339352
340353 assert_wait (lambda : TEST_DB_NAME in ch .get_databases ())
341354
342- ch .execute_command (f'USE { TEST_DB_NAME } ' )
355+ ch .execute_command (f'USE { TEST_DB_NAME } ;' )
356+
357+ assert_wait (lambda : 'group' in ch .get_tables ())
358+
359+ mysql .drop_table ('group' )
360+
361+ assert_wait (lambda : 'group' not in ch .get_databases ())
343362
344363 assert_wait (lambda : TEST_TABLE_NAME in ch .get_tables ())
345364 assert_wait (lambda : len (ch .select (TEST_TABLE_NAME )) == 2 )
@@ -395,12 +414,11 @@ def test_runner():
395414 assert_wait (lambda : len (ch .select (TEST_TABLE_NAME )) == 5 )
396415 assert_wait (lambda : ch .select (TEST_TABLE_NAME , "age=1912" )[0 ]['name' ] == 'Hällo' )
397416
398-
399417 mysql .create_database (TEST_DB_NAME_2 )
400418 assert_wait (lambda : TEST_DB_NAME_2 in ch .get_databases ())
401419
402420 mysql .execute (f'''
403- CREATE TABLE test_table_with_index (
421+ CREATE TABLE `group` (
404422 id int NOT NULL AUTO_INCREMENT,
405423 name varchar(255) NOT NULL,
406424 age int,
@@ -409,9 +427,9 @@ def test_runner():
409427 );
410428 ''' )
411429
412- assert_wait (lambda : 'test_table_with_index ' in ch .get_tables ())
430+ assert_wait (lambda : 'group ' in ch .get_tables ())
413431
414- create_query = ch .show_create_table ('test_table_with_index ' )
432+ create_query = ch .show_create_table ('group ' )
415433 assert 'INDEX name_idx name TYPE ngrambf_v1' in create_query
416434
417435 run_all_runner .stop ()
0 commit comments