· 8 years ago · Jan 02, 2018, 10:38 AM
1CURRENT_TEST: innodb.alter_rename_existing
2mysqltest: At line 67: query 'ALTER TABLE t1 ADD COLUMN e2 INT, ALGORITHM=COPY'
3 failed with wrong errno 2013: 'Lost connection to MySQL server during query',
4instead of 1025...
5
6The result from queries just before the failure was:
7< snip >
8 `a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
9 `b` char(20) DEFAULT NULL,
10 UNIQUE KEY `a` (`a`)
11) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
12SELECT name, space=0 FROM information_schema.innodb_sys_tables WHERE name = 'te
13st/t1';
14name space=0
15test/t1 1
16#
17# ALTER TABLE from system tablespace to system tablespace
18#
19ALTER TABLE t1 ADD COLUMN c INT, ALGORITHM=INPLACE;
20ALTER TABLE t1 ADD COLUMN d INT, ALGORITHM=COPY;
21#
22# Try to move t1 from the system tablespace to a file-per-table
23# while a blocking t1.ibd file exists.
24#
25SET GLOBAL innodb_file_per_table=ON;
26ALTER TABLE t1 ADD COLUMN e1 INT, ALGORITHM=INPLACE;
27ERROR HY000: Tablespace for table 'test/t1' exists. Please DISCARD the tablespace before IMPORT
28ALTER TABLE t1 ADD COLUMN e2 INT, ALGORITHM=COPY;
29erver [mysqld.1 - pid: 19030, winpid: 19030, exit: 256] failed during test run
30Server log from this test:
31
32----------SERVER LOG START-----------
332018-01-01 18:29:25 140516906903296 [ERROR] InnoDB: Cannot rename './test/#sql-4a57_43.ibd' to './test/t1.ibd' for space ID 831 because the target file exists. Remove the target file and try again.
342018-01-01 18:29:25 140516906903296 [ERROR] InnoDB: Cannot rename './test/t2.ibd' to './test/t1.ibd' for space ID 832 because the target file exists. Remove the target file and try again.
352018-01-01 18:29:26 140516906903296 [ERROR] InnoDB: Cannot rename './test/#sql-4a57_43.ibd' to './test/t1.ibd' for space ID 833 because the target file exists. Remove the target file and try again.
362018-01-01 18:29:26 140516906903296 [ERROR] InnoDB: Cannot rename './test/#sql-4a57_43.ibd' to './test/t1.ibd' for space ID 834 because the target file exists. Remove the target file and try again.
37mysqld: /my/maria-ext/storage/innobase/trx/trx0roll.cc:1086: trx_undo_rec_t* trx_roll_pop_top_rec_of_trx(trx_t*, roll_ptr_t*, mem_heap_t*): Assertion `undo == update || undo == temp' failed.
38180101 18:29:26 [ERROR] mysqld got signal 6 ;
39This could be because you hit a bug. It is also possible that this binary
40or one of the libraries it was linked against is corrupt, improperly built,
41or misconfigured. This error can also be caused by malfunctioning hardware.
42...
43/home/my/maria-ext/sql/mysqld(_ZN7handler15ha_rename_tableEPKcS1_+0x6f)[0x9f72cb]
44/home/my/maria-ext/sql/mysqld(_Z18mysql_rename_tableP10handlertonPKcS2_S2_S2_j+0x47e)[0x804cd8]
45/home/my/maria-ext/sql/mysqld(_Z17mysql_alter_tableP3THDPKcS2_P14HA_CREATE_INFOP10TABLE_LISTP10Alter_infojP8st_orderb+0x2429)[0x80f710]
46/home/my/maria-ext/sql/mysqld(_ZN19Sql_cmd_alter_table7executeEP3THD+0x5b7)[0x88a06b]
47/home/my/maria-ext/sql/mysqld(_Z21mysql_execute_commandP3THD+0x9ca1)[0x7486a1]
48/home/my/maria-ext/sql/mysqld(_Z11mysql_parseP3THDPcjP12Parser_statebb+0x2a2)[0x74d193]
49/home/my/maria-ext/sql/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj
50
51
52nnodb.innodb 'innodb' w4 [ fail ]
53 Test ended at 2018-01-01 19:11:34
54
55CURRENT_TEST: innodb.innodb
56mysqltest: At line 1726: query 'alter table t1 modify column a int' failed with wrong errno 2013: 'Lost connection to MySQL server during query', instead of 1025...
57
58The result from queries just before the failure was:
59< snip >
60drop table t1;
61connection default;
62disconnect a;
63disconnect b;
64set foreign_key_checks=0;
65create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
66create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
67ERROR HY000: Can't create table `test`.`t1` (errno: 150 "Foreign key constraint is incorrectly formed")
68set foreign_key_checks=1;
69drop table t2;
70set foreign_key_checks=0;
71create table t1(a varchar(10) primary key) engine = innodb DEFAULT CHARSET=latin1;
72create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb DEFAULT CHARSET=utf8;
73ERROR HY000: Can't create table `test`.`t2` (errno: 150 "Foreign key constraint is incorrectly formed")
74set foreign_key_checks=1;
75drop table t1;
76set foreign_key_checks=0;
77create table t2 (a varchar(10), foreign key (a) references t1(a)) engine = innodb;
78create table t1(a varchar(10) primary key) engine = innodb;
79alter table t1 modify column a int;
80
81More results from queries before failure can be found in D:\win32-debug\build\mysql-test\var\4\log\innodb.log
82
83
84Server [mysqld.1 - pid: 11988, winpid: 11988, exit: 65280] failed during test run
85Server log from this test:
86----------SERVER LOG START-----------
872018-01-01 19:11:19 1944 [Note] D:/win32-debug/build/sql//Debug/mysqld.exe (mysqld 10.2.12-MariaDB-debug-log) starting as process 9692 ...
882018-01-01 19:11:19 1944 [Note] Plugin 'SEQUENCE' is disabled.
892018-01-01 19:11:19 1944 [Note] Plugin 'partition' is disabled.
902018-01-01 19:11:19 1944 [Note] InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!
912018-01-01 19:11:19 1944 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
922018-01-01 19:11:19 1944 [Note] InnoDB: Uses event mutexes
932018-01-01 19:11:19 1944 [Note] InnoDB: Compressed tables use zlib 1.2.3
942018-01-01 19:11:19 1944 [Note] InnoDB: Number of pools: 1
952018-01-01 19:11:19 1944 [Note] InnoDB: Using SSE2 crc32 instructions
962018-01-01 19:11:19 1944 [Note] InnoDB: Initializing buffer pool, total size = 8M, instances = 1, chunk size = 8M
972018-01-01 19:11:19 1944 [Note] InnoDB: Completed initialization of buffer pool
982018-01-01 19:11:19 1944 [Note] InnoDB: Highest supported file format is Barracuda.
992018-01-01 19:11:20 1944 [Note] InnoDB: 128 out of 128 rollback segments are active.
1002018-01-01 19:11:20 1944 [Note] InnoDB: Creating shared tablespace for temporary tables
1012018-01-01 19:11:20 1944 [Note] InnoDB: Setting file '.\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
1022018-01-01 19:11:20 1944 [Note] InnoDB: File '.\ibtmp1' size is now 12 MB.
1032018-01-01 19:11:20 1944 [Note] InnoDB: Waiting for purge to start
1042018-01-01 19:11:20 1944 [Note] InnoDB: 5.7.20 started; log sequence number 1627961
1052018-01-01 19:11:20 12972 [Note] InnoDB: Loading buffer pool(s) from D:\win32-debug\build\mysql-test\var\4\mysqld.1\data\ib_buffer_pool
1062018-01-01 19:11:20 12972 [Note] InnoDB: Buffer pool(s) load completed at 180101 19:11:20
1072018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_SYS_DATAFILES' is disabled.
1082018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_SYS_TABLESTATS' is disabled.
1092018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_MUTEXES' is disabled.
1102018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_CMP' is disabled.
1112018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_FT_DELETED' is disabled.
1122018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_CMP_RESET' is disabled.
1132018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_LOCK_WAITS' is disabled.
1142018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_TABLESPACES_ENCRYPTION' is disabled.
1152018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_CMPMEM_RESET' is disabled.
1162018-01-01 19:11:20 1944 [Note] Plugin 'FEEDBACK' is disabled.
1172018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_FT_INDEX_TABLE' is disabled.
1182018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_CMP_PER_INDEX_RESET' is disabled.
1192018-01-01 19:11:20 1944 [Note] Plugin 'user_variables' is disabled.
1202018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_FT_INDEX_CACHE' is disabled.
1212018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_FT_BEING_DELETED' is disabled.
1222018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_FT_DEFAULT_STOPWORD' is disabled.
1232018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_FT_CONFIG' is disabled.
1242018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_SYS_TABLESPACES' is disabled.
1252018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_TABLESPACES_SCRUBBING' is disabled.
1262018-01-01 19:11:20 1944 [Note] Plugin 'INNODB_SYS_SEMAPHORE_WAITS' is disabled.
1272018-01-01 19:11:20 1944 [Warning] D:/win32-debug/build/sql//Debug/mysqld.exe: unknown option '--loose-pam-debug'
1282018-01-01 19:11:20 1944 [Note] Server socket created on IP: '::'.
1292018-01-01 19:11:20 1944 [Note] Reading of all Master_info entries succeded
1302018-01-01 19:11:20 1944 [Note] Added new Master_info '' to hash table
1312018-01-01 19:11:20 1944 [Note] D:/win32-debug/build/sql//Debug/mysqld.exe: ready for connections.
132Version: '10.2.12-MariaDB-debug-log' socket: '' port: 16060 Source distribution
1332018-01-01 19:11:26 4344 [ERROR] InnoDB: Cannot delete/update rows with cascading foreign key constraints that exceed max depth of 255. Please drop excessive foreign constraints and try again
1342018-01-01 19:11:31 13076 [ERROR] InnoDB: In ALTER TABLE `test`.`t1` has or is referenced in foreign key constraints which are not compatible with the new table definition.
135Assertion failed: undo == update || undo == temp, file D:\win32-debug\build\src\storage\innobase\trx\trx0roll.cc, line 1086
136180101 19:11:31 [ERROR] mysqld got exception 0x80000003 ;
137This could be because you hit a bug. It is also possible that this binary
138or one of the libraries it was linked against is corrupt, improperly built,
139or misconfigured. This error can also be caused by malfunctioning hardware.
140
141To report this bug, see https://mariadb.com/kb/en/reporting-bugs
142
143We will try our best to scrape up some info that will hopefully help
144diagnose the problem, but since we have already crashed,
145something is definitely wrong and this may fail.
146
147Server version: 10.2.12-MariaDB-debug-log
148key_buffer_size=1048576
149read_buffer_size=131072
150max_used_connections=3
151max_threads=65537
152thread_count=7
153It is possible that mysqld could use up to
154key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 3445 K bytes of memory
155Hope that's ok; if not, decrease some variables in the equation.
156
157Thread pointer: 0xc1fb5f8
158Attempting backtrace. You can use the following information to find out
159where mysqld died. If you see no messages after this, something went
160terribly wrong...
161mysqld.exe!my_sigabrt_handler()[my_thr_init.c:488]
162mysqld.exe!raise()[signal.cpp:516]
163mysqld.exe!abort()[abort.cpp:64]
164mysqld.exe!common_assert_to_stderr<wchar_t>()[assert.cpp:149]
165mysqld.exe!_wassert()[assert.cpp:404]
166mysqld.exe!trx_roll_pop_top_rec_of_trx()[trx0roll.cc:1086]
167mysqld.exe!row_undo()[row0undo.cc:267]
168mysqld.exe!row_undo_step()[row0undo.cc:350]
169mysqld.exe!que_thr_step()[que0que.cc:1052]
170mysqld.exe!que_run_threads_low()[que0que.cc:1116]
171mysqld.exe!que_run_threads()[que0que.cc:1156]
172mysqld.exe!trx_rollback_to_savepoint_low()[trx0roll.cc:113]
173mysqld.exe!trx_rollback_to_savepoint()[trx0roll.cc:154]
174mysqld.exe!row_rename_table_for_mysql()[row0mysql.cc:4807]
175mysqld.exe!innobase_rename_table()[ha_innodb.cc:13920]
176mysqld.exe!ha_innobase::rename_table()[ha_innodb.cc:14031]
177mysqld.exe!handler::ha_rename_table()[handler.cc:4456]
178mysqld.exe!mysql_rename_table()[sql_table.cc:5182]
179mysqld.exe!mysql_alter_table()[sql_table.cc:9451]
180mysqld.exe!Sql_cmd_alter_table::execute()[sql_alter.cc:324]
181mysqld.exe!mysql_execute_command()[sql_parse.cc:6227]
182mysqld.exe!mysql_parse()[sql_parse.cc:7948]
183mysqld.exe!dispatch_command()[sql_parse.cc:1820]
184mysqld.exe!do_command()[sql_parse.cc:1369]
185mysqld.exe!threadpool_process_request()[threadpool_common.cc:366]
186mysqld.exe!tp_callback()[threadpool_common.cc:192]
187mysqld.exe!tp_callback()[threadpool_win.cc:377]
188mysqld.exe!work_callback()[threadpool_win.cc:451]
189ntdll.dll!RtlDestroyHeap()