-
-
Save midenok/fe9ef9de39ff5ed0f89e4e344db76a91 to your computer and use it in GitHub Desktop.
MDEV-24176
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CURRENT_TEST: gcol.gcol_supported_sql_funcs_innodb | |
mysqltest: In included file "./suite/gcol/inc/gcol_supported_sql_funcs.inc": | |
included from ./suite/gcol/inc/gcol_supported_sql_funcs_main.inc at line 847: | |
included from /home/midenok/src/mariadb/10.3/src/mysql-test/suite/gcol/t/gcol_supported_sql_funcs_innodb.test at line 39: | |
At line 24: query 'insert into t1 values ($values1)' failed with wrong errno 2013: 'Lost connection to MySQL server during query', instead of 0... | |
- found 'core' (0/5) | |
Trying 'dbx' to get a backtrace | |
Trying 'gdb' to get a backtrace from coredump /home/midenok/src/mariadb/10.3/build/mysql-test/var/9/log/gcol.gcol_supported_sql_funcs_innodb-innodb/mysqld.1/data/core | |
Core generated by '/home/midenok/src/mariadb/10.3/build/sql/mysqld' | |
Output from gdb follows. The first stack trace is from the failing thread. | |
The following stack traces are from all threads (so the failing one is | |
duplicated). | |
-------------------------- | |
Loaded DUEL.py 0.9.6, high level data exploration language | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". | |
Core was generated by `/home/midenok/src/mariadb/10.3/build/sql/mysqld --defaults-group-suffix=.1 --de'. | |
Program terminated with signal SIGABRT, Aborted. | |
#0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:54 | |
54 ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory. | |
[Current thread is 1 (Thread 0x7fce7ffb4640 (LWP 1407567))] | |
#0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:54 | |
#1 0x000000000154921b in my_write_core (sig=6) at ../src/mysys/stacktrace.c:386 | |
#2 0x0000000000b45dc5 in handle_fatal_signal (sig=6) at ../src/sql/signal_handler.cc:355 | |
#3 <signal handler called> | |
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 | |
#5 0x00007fce8adf3864 in __GI_abort () at abort.c:79 | |
#6 0x00007fce8adf3749 in __assert_fail_base (fmt=0x7fce8af7f458 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x186275b "catch_alloc_root != mem_root", file=0x1862682 "/home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c", line=181, function=<optimized out>) at assert.c:92 | |
#7 0x00007fce8ae05a96 in __GI___assert_fail (assertion=0x186275b "catch_alloc_root != mem_root", file=0x1862682 "/home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c", line=181, function=0x1862778 "void *alloc_root(MEM_ROOT *, size_t)") at assert.c:101 | |
#8 0x000000000153151f in alloc_root (mem_root=0x7fce2414b4f0, length=32) at /home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c:181 | |
#9 0x000000000066a1e1 in Query_arena::alloc (this=0x7fce24000d40, size=32) at ../src/sql/sql_class.h:1033 | |
#10 0x000000000071a177 in lock_tables (thd=0x7fce24000d28, tables=0x7fce7ffae760, count=4, flags=2050) at ../src/sql/sql_base.cc:5353 | |
#11 0x000000000071b919 in open_and_lock_tables (thd=0x7fce24000d28, options=..., tables=0x7fce7ffae760, derived=false, flags=2050, prelocking_strategy=0x7fce7ffae4b0) at ../src/sql/sql_base.cc:5148 | |
#12 0x00000000006c728c in open_and_lock_tables (thd=0x7fce24000d28, tables=0x7fce7ffae760, derived=false, flags=2050) at ../src/sql/sql_base.h:503 | |
#13 0x0000000000725303 in open_system_tables_for_read (thd=0x7fce24000d28, table_list=0x7fce7ffae760, backup=0x7fce7ffae708) at ../src/sql/sql_base.cc:8913 | |
#14 0x0000000000942b34 in my_tz_find (thd=0x7fce24000d28, name=0x7fce2425d5f0) at ../src/sql/tztime.cc:2327 | |
#15 0x0000000000c88951 in Item_func_convert_tz::get_date (this=0x7fce2426d5b0, ltime=0x7fce7ffb02b8, fuzzy_date=0) at ../src/sql/item_timefunc.cc:2076 | |
#16 0x0000000000b66f9f in Item::save_date_in_field (this=0x7fce2426d5b0, field=0x7fce24260cf0, no_conversions=false) at ../src/sql/item.cc:496 | |
#17 0x0000000000a181c0 in Type_handler_temporal_with_date::Item_save_in_field (this=0x1d208c0 <type_handler_datetime2>, item=0x7fce2426d5b0, field=0x7fce24260cf0, no_conversions=false) at ../src/sql/sql_type.cc:2564 | |
#18 0x0000000000b7ecce in Item::save_in_field (this=0x7fce2426d5b0, field=0x7fce24260cf0, no_conversions=false) at ../src/sql/item.cc:7013 | |
#19 0x00000000009337e1 in TABLE::update_virtual_fields (this=0x7fce2414a9f8, h=0x7fce2410e540, update_mode=VCOL_UPDATE_FOR_WRITE) at /home/midenok/src/mariadb/10.3/src/sql/table.cc:8147 | |
#20 0x000000000072460b in fill_record (thd=0x7fce24000d28, table=0x7fce2414a9f8, ptr=0x7fce240c3888, values=..., ignore_errors=false, use_value=false) at ../src/sql/sql_base.cc:8669 | |
#21 0x00000000007247af in fill_record_n_invoke_before_triggers (thd=0x7fce24000d28, table=0x7fce2414a9f8, ptr=0x7fce240c3870, values=..., ignore_errors=false, event=TRG_EVENT_INSERT) at ../src/sql/sql_base.cc:8712 | |
#22 0x000000000077c622 in mysql_insert (thd=0x7fce24000d28, table_list=0x7fce240930d0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at ../src/sql/sql_insert.cc:1014 | |
#23 0x00000000007cf7b4 in mysql_execute_command (thd=0x7fce24000d28) at ../src/sql/sql_parse.cc:4504 | |
#24 0x00000000007c7b36 in mysql_parse (thd=0x7fce24000d28, rawbuf=0x7fce24012810 "insert into t1 values ('2008-08-31',default)", length=44, parser_state=0x7fce7ffb3548, is_com_multi=false, is_next_command=false) at ../src/sql/sql_parse.cc:7870 | |
CURRENT_TEST: main.create | |
mysqltest: At line 1730: query 'INSERT INTO t1(item_name, dynamic_cols, i) VALUES | |
('MariaDB T-shirt', COLUMN_CREATE(1, 'blue', 2, 'XL'), 1)' failed: 2013: Lost connection to MySQL server during query | |
Trying 'gdb' to get a backtrace from coredump /home/midenok/src/mariadb/10.3/build/mysql-test/var/7/log/main.create/mysqld.1/data/core | |
Core generated by '/home/midenok/src/mariadb/10.3/build/sql/mysqld' | |
Output from gdb follows. The first stack trace is from the failing thread. | |
The following stack traces are from all threads (so the failing one is | |
duplicated). | |
-------------------------- | |
Loaded DUEL.py 0.9.6, high level data exploration language | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". | |
Core was generated by `/home/midenok/src/mariadb/10.3/build/sql/mysqld --defaults-group-suffix=.1 --de'. | |
Program terminated with signal SIGABRT, Aborted. | |
#0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:54 | |
54 ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory. | |
[Current thread is 1 (Thread 0x7f56491ec640 (LWP 1412715))] | |
#0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:54 | |
#1 0x000000000154921b in my_write_core (sig=6) at ../src/mysys/stacktrace.c:386 | |
#2 0x0000000000b45dc5 in handle_fatal_signal (sig=6) at ../src/sql/signal_handler.cc:355 | |
#3 <signal handler called> | |
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 | |
#5 0x00007f564f18e864 in __GI_abort () at abort.c:79 | |
#6 0x00007f564f18e749 in __assert_fail_base (fmt=0x7f564f31a458 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x186275b "catch_alloc_root != mem_root", file=0x1862682 "/home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c", line=181, function=<optimized out>) at assert.c:92 | |
#7 0x00007f564f1a0a96 in __GI___assert_fail (assertion=0x186275b "catch_alloc_root != mem_root", file=0x1862682 "/home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c", line=181, function=0x1862778 "void *alloc_root(MEM_ROOT *, size_t)") at assert.c:101 | |
#8 0x000000000153151f in alloc_root (mem_root=0x7f563809c7c0, length=5) at /home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c:181 | |
#9 0x0000000001532148 in strmake_root (root=0x7f563809c7c0, str=0x7f5638153b70 "blue", len=4) at /home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c:485 | |
#10 0x000000000068e809 in Query_arena::strmake (this=0x7f5638000d40, str=0x7f5638153b70 "blue", size=4) at ../src/sql/sql_class.h:1044 | |
#11 0x0000000000c3d875 in Item_func_dyncol_create::prepare_arguments (this=0x7f56380ef430, thd=0x7f5638000d28, force_names_arg=false) at ../src/sql/item_strfunc.cc:4586 | |
#12 0x0000000000c3dfb0 in Item_func_dyncol_create::val_str (this=0x7f56380ef430, str=0x7f56491e7d88) at ../src/sql/item_strfunc.cc:4645 | |
#13 0x0000000000c3e6b4 in Item_func_dyncol_add::val_str (this=0x7f563812e760, str=0x7f56491e7d88) at ../src/sql/item_strfunc.cc:4782 | |
#14 0x0000000000c3edc1 in Item_dyncol_get::get_dyn_value (this=0x7f563804f7e0, thd=0x7f5638000d28, val=0x7f56491e7e00, tmp=0x7f56491e7d88) at ../src/sql/item_strfunc.cc:4894 | |
#15 0x0000000000c3efc1 in Item_dyncol_get::val_str (this=0x7f563804f7e0, str_result=0x7f563810b4b0) at ../src/sql/item_strfunc.cc:4923 | |
#16 0x0000000000c8a6ba in Item_char_typecast::val_str (this=0x7f563810b480, str=0x7f563810b4b0) at ../src/sql/item_timefunc.cc:2503 | |
#17 0x0000000000b7e8ee in Item::save_str_in_field (this=0x7f563810b480, field=0x7f563809f190, no_conversions=false) at ../src/sql/item.cc:6964 | |
#18 0x0000000000a18200 in Type_handler_string_result::Item_save_in_field (this=0x1d20908 <type_handler_long_blob>, item=0x7f563810b480, field=0x7f563809f190, no_conversions=false) at ../src/sql/sql_type.cc:2571 | |
#19 0x0000000000b7ecce in Item::save_in_field (this=0x7f563810b480, field=0x7f563809f190, no_conversions=false) at ../src/sql/item.cc:7013 | |
#20 0x00000000009337e1 in TABLE::update_virtual_fields (this=0x7f563809bcc8, h=0x7f5638091a40, update_mode=VCOL_UPDATE_FOR_WRITE) at /home/midenok/src/mariadb/10.3/src/sql/table.cc:8147 | |
#21 0x0000000000723a19 in fill_record (thd=0x7f5638000d28, table_arg=0x7f563809bcc8, fields=..., values=..., ignore_errors=false, update=false) at ../src/sql/sql_base.cc:8419 | |
#22 0x0000000000723df3 in fill_record_n_invoke_before_triggers (thd=0x7f5638000d28, table=0x7f563809bcc8, fields=..., values=..., ignore_errors=false, event=TRG_EVENT_INSERT) at ../src/sql/sql_base.cc:8549 | |
#23 0x000000000077c428 in mysql_insert (thd=0x7f5638000d28, table_list=0x7f5638091350, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at ../src/sql/sql_insert.cc:968 | |
#24 0x00000000007cf7b4 in mysql_execute_command (thd=0x7f5638000d28) at ../src/sql/sql_parse.cc:4504 | |
#25 0x00000000007c7b36 in mysql_parse (thd=0x7f5638000d28, rawbuf=0x7f5638175c70 "INSERT INTO t1(item_name, dynamic_cols, i) VALUES \n('MariaDB T-shirt', COLUMN_CREATE(1, 'blue', 2, 'XL'), 1)", length=108, parser_state=0x7f56491eb548, is_com_multi=false, is_next_command=false) at ../src/sql/sql_parse.cc:7870 | |
CURRENT_TEST: main.dyncol | |
mysqltest: At line 976: query 'INSERT INTO t1 (name,value) VALUES ('name0', 'value0')' failed: 2013: Lost connection to MySQL server during query | |
Thread 1 (Thread 0x7f1d68a0c640 (LWP 1414068)): | |
#0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:54 | |
#1 0x000000000154921b in my_write_core (sig=6) at ../src/mysys/stacktrace.c:386 | |
#2 0x0000000000b45dc5 in handle_fatal_signal (sig=6) at ../src/sql/signal_handler.cc:355 | |
#3 <signal handler called> | |
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 | |
#5 0x00007f1d6e9ae864 in __GI_abort () at abort.c:79 | |
#6 0x00007f1d6e9ae749 in __assert_fail_base (fmt=0x7f1d6eb3a458 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x186275b "catch_alloc_root != mem_root", file=0x1862682 "/home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c", line=181, function=<optimized out>) at assert.c:92 | |
#7 0x00007f1d6e9c0a96 in __GI___assert_fail (assertion=0x186275b "catch_alloc_root != mem_root", file=0x1862682 "/home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c", line=181, function=0x1862778 "void *alloc_root(MEM_ROOT *, size_t)") at assert.c:101 | |
#8 0x000000000153151f in alloc_root (mem_root=0x7f1d58068f00, length=21) at /home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c:181 | |
#9 0x000000000066a1e1 in Query_arena::alloc (this=0x7f1d58000d40, size=21) at ../src/sql/sql_class.h:1033 | |
#10 0x0000000000c3d248 in Item_func_dyncol_create::prepare_arguments (this=0x7f1d580b9ed0, thd=0x7f1d58000d28, force_names_arg=false) at ../src/sql/item_strfunc.cc:4538 | |
#11 0x0000000000c3dfb0 in Item_func_dyncol_create::val_str (this=0x7f1d580b9ed0, str=0x7f1d580b9f00) at ../src/sql/item_strfunc.cc:4645 | |
#12 0x0000000000b7e8ee in Item::save_str_in_field (this=0x7f1d580b9ed0, field=0x7f1d5830ff30, no_conversions=false) at ../src/sql/item.cc:6964 | |
#13 0x0000000000a18200 in Type_handler_string_result::Item_save_in_field (this=0x1d20908 <type_handler_long_blob>, item=0x7f1d580b9ed0, field=0x7f1d5830ff30, no_conversions=false) at ../src/sql/sql_type.cc:2571 | |
#14 0x0000000000b7ecce in Item::save_in_field (this=0x7f1d580b9ed0, field=0x7f1d5830ff30, no_conversions=false) at ../src/sql/item.cc:7013 | |
#15 0x0000000000933eb2 in TABLE::update_default_fields (this=0x7f1d58068408, ignore_errors=false) at /home/midenok/src/mariadb/10.3/src/sql/table.cc:8245 | |
#16 0x00000000007239ce in fill_record (thd=0x7f1d58000d28, table_arg=0x7f1d58068408, fields=..., values=..., ignore_errors=false, update=false) at ../src/sql/sql_base.cc:8414 | |
#17 0x0000000000723df3 in fill_record_n_invoke_before_triggers (thd=0x7f1d58000d28, table=0x7f1d58068408, fields=..., values=..., ignore_errors=false, event=TRG_EVENT_INSERT) at ../src/sql/sql_base.cc:8549 | |
#18 0x000000000077c428 in mysql_insert (thd=0x7f1d58000d28, table_list=0x7f1d581479f0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at ../src/sql/sql_insert.cc:968 | |
#19 0x00000000007cf7b4 in mysql_execute_command (thd=0x7f1d58000d28) at ../src/sql/sql_parse.cc:4504 | |
#20 0x00000000007c7b36 in mysql_parse (thd=0x7f1d58000d28, rawbuf=0x7f1d580ed2b0 "INSERT INTO t1 (name,value) VALUES ('name0', 'value0')", length=54, parser_state=0x7f1d68a0b548, is_com_multi=false, is_next_command=false) at ../src/sql/sql_parse.cc:7870 | |
#21 0x00000000007c2ff1 in dispatch_command (command=COM_QUERY, thd=0x7f1d58000d28, packet=0x7f1d58008489 "INSERT INTO t1 (name,value) VALUES ('name0', 'value0')", packet_length=54, is_com_multi=false, is_next_command=false) at ../src/sql/sql_parse.cc:1852 | |
#22 0x00000000007c6719 in do_command (thd=0x7f1d58000d28) at ../src/sql/sql_parse.cc:1398 | |
#23 0x00000000009820f2 in do_handle_one_connection (connect=0x2ce8ce8) at ../src/sql/sql_connect.cc:1403 | |
#24 0x0000000000981eba in handle_one_connection (arg=0x2ce8ce8) at ../src/sql/sql_connect.cc:1308 | |
#25 0x00000000014bc904 in pfs_spawn_thread (arg=0x2c4c6a8) at ../src/storage/perfschema/pfs.cc:1869 | |
#26 0x00007f1d6eb7b590 in start_thread (arg=0x7f1d68a0c640) at pthread_create.c:463 | |
#27 0x00007f1d6eaa1223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 | |
CURRENT_TEST: vcol.wrong_arena | |
mysqltest: At line 24: query 'select * from t1' failed: 2013: Lost connection to MySQL server during query | |
Trying 'gdb' to get a backtrace from coredump /home/midenok/src/mariadb/10.3/build/mysql-test/var/7/log/vcol.wrong_arena/mysqld.1/data/core | |
Core generated by '/home/midenok/src/mariadb/10.3/build/sql/mysqld' | |
Output from gdb follows. The first stack trace is from the failing thread. | |
The following stack traces are from all threads (so the failing one is | |
duplicated). | |
-------------------------- | |
Loaded DUEL.py 0.9.6, high level data exploration language | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". | |
Core was generated by `/home/midenok/src/mariadb/10.3/build/sql/mysqld --defaults-group-suffix=.1 --de'. | |
Program terminated with signal SIGABRT, Aborted. | |
#0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:54 | |
54 ../sysdeps/unix/sysv/linux/pthread_kill.c: No such file or directory. | |
[Current thread is 1 (Thread 0x7f3ef4388640 (LWP 1419476))] | |
#0 __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:54 | |
#1 0x000000000154921b in my_write_core (sig=6) at ../src/mysys/stacktrace.c:386 | |
#2 0x0000000000b45dc5 in handle_fatal_signal (sig=6) at ../src/sql/signal_handler.cc:355 | |
#3 <signal handler called> | |
#4 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:49 | |
#5 0x00007f3ef9c55864 in __GI_abort () at abort.c:79 | |
#6 0x00007f3ef9c55749 in __assert_fail_base (fmt=0x7f3ef9de1458 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x186275b "catch_alloc_root != mem_root", file=0x1862682 "/home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c", line=181, function=<optimized out>) at assert.c:92 | |
#7 0x00007f3ef9c67a96 in __GI___assert_fail (assertion=0x186275b "catch_alloc_root != mem_root", file=0x1862682 "/home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c", line=181, function=0x1862778 "void *alloc_root(MEM_ROOT *, size_t)") at assert.c:101 | |
#8 0x000000000153151f in alloc_root (mem_root=0x7f3ec0049d80, length=40) at /home/midenok/src/mariadb/10.3/src/mysys/my_alloc.c:181 | |
#9 0x0000000000668edd in Sql_alloc::operator new (size=40, mem_root=0x7f3ec0049d80) at ../src/sql/sql_alloc.h:39 | |
#10 0x0000000000a1ab72 in Type_handler_int_result::make_cmp_item (this=0x1d20830 <type_handler_long>, thd=0x7f3ec8000d28, cs=0x1de6d50 <my_charset_latin1>) at ../src/sql/sql_type.cc:3829 | |
#11 0x0000000000ba7561 in cmp_item_row::store_value (this=0x7f3ec0045890, item=0x7f3ec0072160) at ../src/sql/item_cmpfunc.cc:3923 | |
#12 0x0000000000bbb384 in Predicant_to_list_comparator::cmp_arg (this=0x7f3ec00270a8, args=0x7f3ec0027050, i=0) at ../src/sql/item_cmpfunc.h:1881 | |
#13 0x0000000000bb5747 in Predicant_to_list_comparator::cmp (this=0x7f3ec00270a8, args=0x7f3ec0027050, idx=0x7f3ef43834e8, found_unknown_values=0x7f3ec002703e) at ../src/sql/item_cmpfunc.h:2071 | |
#14 0x0000000000baa9ec in Item_func_in::val_int (this=0x7f3ec0026fc0) at ../src/sql/item_cmpfunc.cc:4459 | |
#15 0x0000000000b7ec03 in Item::save_int_in_field (this=0x7f3ec0026fc0, field=0x7f3ec003e9d0, no_conversions=false) at ../src/sql/item.cc:7003 | |
#16 0x0000000000a182c0 in Type_handler_int_result::Item_save_in_field (this=0x1d20830 <type_handler_long>, item=0x7f3ec0026fc0, field=0x7f3ec003e9d0, no_conversions=false) at ../src/sql/sql_type.cc:2592 | |
#17 0x0000000000b7ecce in Item::save_in_field (this=0x7f3ec0026fc0, field=0x7f3ec003e9d0, no_conversions=false) at ../src/sql/item.cc:7013 | |
#18 0x00000000009337e1 in TABLE::update_virtual_fields (this=0x7f3ec0049288, h=0x7f3ec005ed10, update_mode=VCOL_UPDATE_FOR_READ) at /home/midenok/src/mariadb/10.3/src/sql/table.cc:8147 | |
#19 0x0000000000b4ec62 in handler::ha_rnd_next (this=0x7f3ec005ed10, buf=0x7f3ec0048e10 "\341\231\207\024\242\212\001") at ../src/sql/handler.cc:2873 | |
#20 0x0000000000b50e05 in handler::read_first_row (this=0x7f3ec005ed10, buf=0x7f3ec0048e10 "\341\231\207\024\242\212\001", primary_key=64) at ../src/sql/handler.cc:3102 | |
#21 0x000000000087e339 in handler::ha_read_first_row (this=0x7f3ec005ed10, buf=0x7f3ec0048e10 "\341\231\207\024\242\212\001", primary_key=64) at ../src/sql/sql_class.h:6482 | |
#22 0x000000000086f0bf in join_read_system (tab=0x7f3ec8126350) at ../src/sql/sql_select.cc:20420 | |
#23 0x000000000086e0b4 in join_read_const_table (thd=0x7f3ec8000d28, tab=0x7f3ec8126350, pos=0x7f3ec81268e8) at ../src/sql/sql_select.cc:20316 | |
#24 0x000000000082af71 in make_join_statistics (join=0x7f3ec8127db0, tables_list=..., keyuse_array=0x7f3ec81280d0) at ../src/sql/sql_select.cc:4760 | |
#25 0x0000000000826de4 in JOIN::optimize_inner (this=0x7f3ec8127db0) at ../src/sql/sql_select.cc:1977 | |
#26 0x0000000000821f57 in JOIN::optimize (this=0x7f3ec8127db0) at ../src/sql/sql_select.cc:1519 | |
#27 0x000000000081a149 in mysql_select (thd=0x7f3ec8000d28, tables=0x7f3ec80311e0, wild_num=1, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f3ec801f700, unit=0x7f3ec8004be0, select_lex=0x7f3ec8005398) at ../src/sql/sql_select.cc:4339 | |
#28 0x0000000000819a23 in handle_select (thd=0x7f3ec8000d28, lex=0x7f3ec8004b20, result=0x7f3ec801f700, setup_tables_done_option=0) at ../src/sql/sql_select.cc:372 | |
#29 0x00000000007d7da4 in execute_sqlcom_select (thd=0x7f3ec8000d28, all_tables=0x7f3ec80311e0) at ../src/sql/sql_parse.cc:6339 | |
#30 0x00000000007cd3de in mysql_execute_command (thd=0x7f3ec8000d28) at ../src/sql/sql_parse.cc:3870 | |
#31 0x00000000007c7b36 in mysql_parse (thd=0x7f3ec8000d28, rawbuf=0x7f3ec8133880 "select * from t1", length=16, parser_state=0x7f3ef4387548, is_com_multi=false, is_next_command=false) at ../src/sql/sql_parse.cc:7870 | |
#32 0x00000000007c2ff1 in dispatch_command (command=COM_QUERY, thd=0x7f3ec8000d28, packet=0x7f3ec8008489 "select * from t1", packet_length=16, is_com_multi=false, is_next_command=false) at ../src/sql/sql_parse.cc:1852 | |
#33 0x00000000007c6719 in do_command (thd=0x7f3ec8000d28) at ../src/sql/sql_parse.cc:1398 | |
#34 0x00000000009820f2 in do_handle_one_connection (connect=0x4683ab8) at ../src/sql/sql_connect.cc:1403 | |
#35 0x0000000000981eba in handle_one_connection (arg=0x4683ab8) at ../src/sql/sql_connect.cc:1308 | |
#36 0x00000000014bc904 in pfs_spawn_thread (arg=0x46e1a88) at ../src/storage/perfschema/pfs.cc:1869 | |
#37 0x00007f3ef9e22590 in start_thread (arg=0x7f3ef4388640) at pthread_create.c:463 | |
#38 0x00007f3ef9d48223 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c | |
index a7d4ec1c248..8e3db3cd36d 100644 | |
--- a/mysys/my_alloc.c | |
+++ b/mysys/my_alloc.c | |
@@ -174,8 +174,11 @@ void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, | |
} | |
+MEM_ROOT *catch_alloc_root= 0; | |
+ | |
void *alloc_root(MEM_ROOT *mem_root, size_t length) | |
{ | |
+ DBUG_ASSERT(catch_alloc_root != mem_root); | |
#if defined(HAVE_valgrind) && defined(EXTRA_DEBUG) | |
reg1 USED_MEM *next; | |
DBUG_ENTER("alloc_root"); | |
@@ -304,6 +307,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length) | |
void *multi_alloc_root(MEM_ROOT *root, ...) | |
{ | |
+ DBUG_ASSERT(catch_alloc_root != root); | |
va_list args; | |
char **ptr, *start, *res; | |
size_t tot_length, length; | |
diff --git a/sql/field.cc b/sql/field.cc | |
index be9c10a3bae..da5a3c93843 100644 | |
--- a/sql/field.cc | |
+++ b/sql/field.cc | |
@@ -2411,6 +2411,7 @@ Field *Field::clone(MEM_ROOT *root, TABLE *new_table, my_ptrdiff_t diff) | |
} | |
+extern MEM_ROOT* catch_alloc_root; | |
int Field::set_default() | |
{ | |
if (default_value) | |
@@ -2422,7 +2423,9 @@ int Field::set_default() | |
TABLE::update_virtual_fields(handler *, enum_vcol_update_mode). | |
*/ | |
table->in_use->set_n_backup_active_arena(table->expr_arena, &backup_arena); | |
+ catch_alloc_root= &table->mem_root; | |
int rc= default_value->expr->save_in_field(this, 0); | |
+ catch_alloc_root= 0; | |
table->in_use->restore_active_arena(table->expr_arena, &backup_arena); | |
return rc; | |
} | |
diff --git a/sql/table.cc b/sql/table.cc | |
index ebe9ccb762b..d940bfc2162 100644 | |
--- a/sql/table.cc | |
+++ b/sql/table.cc | |
@@ -8054,6 +8054,7 @@ class Turn_errors_to_warnings_handler : public Internal_error_handler | |
>0 Error occurred when storing a virtual field value | |
*/ | |
+extern MEM_ROOT* catch_alloc_root; | |
int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode) | |
{ | |
DBUG_ENTER("TABLE::update_virtual_fields"); | |
@@ -8077,6 +8078,7 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode) | |
insert into t1 values ('2008-08-31', default); | |
*/ | |
in_use->set_n_backup_active_arena(expr_arena, &backup_arena); | |
+ catch_alloc_root= &mem_root; | |
/* When reading or deleting row, ignore errors from virtual columns */ | |
if (update_mode == VCOL_UPDATE_FOR_READ || | |
@@ -8170,6 +8172,7 @@ int TABLE::update_virtual_fields(handler *h, enum_vcol_update_mode update_mode) | |
} | |
if (handler_pushed) | |
in_use->pop_internal_handler(); | |
+ catch_alloc_root= 0; | |
in_use->restore_active_arena(expr_arena, &backup_arena); | |
/* Return 1 only of we got a fatal error, not a warning */ | |
@@ -8188,9 +8191,11 @@ int TABLE::update_virtual_field(Field *vf) | |
TABLE::update_virtual_fields(handler *, enum_vcol_update_mode). | |
*/ | |
in_use->set_n_backup_active_arena(expr_arena, &backup_arena); | |
+ catch_alloc_root= &mem_root; | |
bitmap_clear_all(&tmp_set); | |
vf->vcol_info->expr->walk(&Item::update_vcol_processor, 0, &tmp_set); | |
vf->vcol_info->expr->save_in_field(vf, 0); | |
+ catch_alloc_root= 0; | |
in_use->restore_active_arena(expr_arena, &backup_arena); | |
in_use->pop_internal_handler(); | |
DBUG_RETURN(count_errors.errors); | |
@@ -8231,6 +8236,7 @@ int TABLE::update_default_fields(bool ignore_errors) | |
TABLE::update_virtual_fields(handler *, enum_vcol_update_mode). | |
*/ | |
in_use->set_n_backup_active_arena(expr_arena, &backup_arena); | |
+ catch_alloc_root= &mem_root; | |
/* Iterate over fields with default functions in the table */ | |
for (field_ptr= default_field; *field_ptr ; field_ptr++) | |
@@ -8253,6 +8259,7 @@ int TABLE::update_default_fields(bool ignore_errors) | |
res= 0; | |
} | |
} | |
+ catch_alloc_root= 0; | |
in_use->restore_active_arena(expr_arena, &backup_arena); | |
DBUG_RETURN(res); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment