Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
N/A
-
None
Description
Notes:
- I don't know why the trigger is needed there. Its contents doesn't make a difference, and anyway it doesn't (or should not) participate in the further transaction, as it's a DELETE trigger (or UPDATE, all the same), while the transaction only INSERTs; and it doesn't seem to be important whether the trigger creation is written into the binary log or not. But I cannot get rid of it, without the trigger the failure doesn't happen.
- The transaction can consist of one INSERT only (correspondingly larger); I split it into several on purpose, to demonstrate that the issue isn't limited to a single huge statement but is probably scalable. However, even a single statement should be happening inside a transaction.
- COMMIT or ROLLBACK do not matter, as the failure happens upon INSERT.
--source include/have_innodb.inc
|
--source include/have_binlog_format_row.inc
|
|
CREATE TABLE t (f LONGTEXT) ENGINE=InnoDB CHARACTER SET utf8mb3; |
CREATE TRIGGER tr BEFORE DELETE ON t FOR EACH ROW SET @a = 1; |
|
SET @total.save= @@global.max_tmp_total_space_usage; |
SET GLOBAL MAX_TMP_TOTAL_SPACE_USAGE = 128*1024; |
|
--connect (con1,localhost,root,,)
|
START TRANSACTION; |
INSERT INTO t VALUES (REPEAT('x',50000)); |
INSERT INTO t VALUES (REPEAT('x',50000)); |
INSERT INTO t VALUES (REPEAT('x',50000)); |
INSERT INTO t VALUES (REPEAT('x',50000)); |
COMMIT; |
|
# Cleanup
|
--disconnect con1
|
--connection default
|
DROP TABLE t; |
SET GLOBAL MAX_TMP_TOTAL_SPACE_USAGE= @total.save; |
bb-11.5-MDEV-9101-max-tmp-space-used a33f528d52c8d9d17b858c9c5a4dac65ec147dce |
mariadbd: /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_error.cc:457: void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*): Assertion `! is_set() || m_can_overwrite_status' failed.
|
240513 21:50:27 [ERROR] mysqld got signal 6 ;
|
|
#9 0x00007f9042053e32 in __GI___assert_fail (assertion=0x55d0d5242af8 "! is_set() || m_can_overwrite_status", file=0x55d0d5242840 "/data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_error.cc", line=457, function=0x55d0d5242b20 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at ./assert/assert.c:101
|
#10 0x000055d0d439407b in Diagnostics_area::set_error_status (this=0x7f9000006f20, sql_errno=42, message=0x7f9034657340 "Global temporary space limit reached", sqlstate=0x55d0d5277c4d "HY000", ucid=..., error_condition=0x0) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_error.cc:457
|
#11 0x000055d0d43622b9 in THD::raise_condition (this=0x7f9000000dc8, cond=0x7f90346570b0) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_class.cc:1109
|
#12 0x000055d0d4260041 in THD::raise_condition (this=0x7f9000000dc8, sql_errno=42, sqlstate=0x55d0d52005af "", level=Sql_state_errno_level::WARN_LEVEL_ERROR, msg=0x7f9034657340 "Global temporary space limit reached") at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_class.h:5183
|
#13 0x000055d0d424e670 in my_message_sql (error=42, str=0x7f9034657340 "Global temporary space limit reached", MyFlags=0) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/mysqld.cc:3353
|
#14 0x000055d0d50e38b1 in my_error (nr=42, MyFlags=0) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/mysys/my_error.c:124
|
#15 0x000055d0d50c7156 in tmp_file_track (info=0x7f9000090470, file_size=147456) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/mysys/mf_iocache.c:91
|
#16 0x000055d0d50ca883 in _my_b_cache_write (info=0x7f9000090470, Buffer=0x7f90000b8cbb 'x' <repeats 200 times>..., Count=16384) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/mysys/mf_iocache.c:1604
|
#17 0x000055d0d50c89e0 in _my_b_write (info=0x7f9000090470, Buffer=0x7f90000b8cbb 'x' <repeats 200 times>..., Count=19362) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/mysys/mf_iocache.c:643
|
#18 0x000055d0d50c6aaa in my_b_write (info=0x7f9000090470, Buffer=0x7f90000b1508 "\376P\303", Count=50005) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/include/my_sys.h:550
|
#19 0x000055d0d50cadad in my_b_safe_write (info=0x7f9000090470, Buffer=0x7f90000b1508 "\376P\303", Count=50005) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/mysys/mf_iocache.c:1703
|
#20 0x000055d0d49afad3 in Log_event_writer::write_internal (this=0x7f90346578f0, pos=0x7f90000b1508 "\376P\303", len=50005) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/log_event_server.cc:693
|
#21 0x000055d0d49b0248 in Log_event_writer::write_data (this=0x7f90346578f0, pos=0x7f90000b1508 "\376P\303", len=50005) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/log_event_server.cc:800
|
#22 0x000055d0d49c9c69 in Log_event::write_data (this=0x7f9000098b98, writer=0x7f90346578f0, buf=0x7f90000b1508 "\376P\303", data_length=50005) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/log_event.h:1479
|
#23 0x000055d0d49c01aa in Rows_log_event::write_data_body (this=0x7f9000098b98, writer=0x7f90346578f0) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/log_event_server.cc:5417
|
#24 0x000055d0d42dbf25 in Log_event::write (this=0x7f9000098b98, writer=0x7f90346578f0) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/log_event.h:1491
|
#25 0x000055d0d499907a in Log_event_writer::write (this=0x7f90346578f0, ev=0x7f9000098b98) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/log_event.h:5439
|
#26 0x000055d0d49850d2 in Event_log::flush_and_set_pending_rows_event (this=0x55d0d5fc2948 <mysql_bin_log+8>, thd=0x7f9000000dc8, event=0x0, cache_data=0x7f9000090470, is_transactional=true) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/log.cc:6657
|
#27 0x000055d0d4984d6a in binlog_flush_pending_rows_event (thd=0x7f9000000dc8, stmt_end=true, is_transactional=true, bin_log=0x55d0d5fc2948 <mysql_bin_log+8>, cache_data=0x7f9000090470) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/log.cc:6586
|
#28 0x000055d0d437512d in THD::binlog_flush_pending_rows_event (this=0x7f9000000dc8, stmt_end=true, is_transactional=true) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_class.cc:7504
|
#29 0x000055d0d434c2d1 in THD::binlog_flush_pending_rows_event (this=0x7f9000000dc8, stmt_end=true) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_class.h:3248
|
#30 0x000055d0d4333466 in close_thread_tables (thd=0x7f9000000dc8) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_base.cc:965
|
#31 0x000055d0d4332f4b in close_thread_tables_for_query (thd=0x7f9000000dc8) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_base.cc:795
|
#32 0x000055d0d43fb846 in mysql_execute_command (thd=0x7f9000000dc8, is_called_from_prepared_stmt=false) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_parse.cc:5895
|
#33 0x000055d0d4401520 in mysql_parse (thd=0x7f9000000dc8, rawbuf=0x7f9000014390 "INSERT INTO t VALUES (REPEAT('x',50000))", length=40, parser_state=0x7f9034658330) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_parse.cc:7814
|
#34 0x000055d0d43edc5a in dispatch_command (command=COM_QUERY, thd=0x7f9000000dc8, packet=0x7f900000be29 "INSERT INTO t VALUES (REPEAT('x',50000))", packet_length=40, blocking=true) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_parse.cc:1893
|
#35 0x000055d0d43ec5b3 in do_command (thd=0x7f9000000dc8, blocking=true) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_parse.cc:1406
|
#36 0x000055d0d45ebb9a in do_handle_one_connection (connect=0x55d0d75ee798, put_in_cache=true) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_connect.cc:1437
|
#37 0x000055d0d45eb90f in handle_one_connection (arg=0x55d0d75ee798) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/sql/sql_connect.cc:1339
|
#38 0x000055d0d4b3a4f6 in pfs_spawn_thread (arg=0x55d0d75ee878) at /data/bld/bb-11.5-MDEV-9101-max-tmp-space-used-debug/storage/perfschema/pfs.cc:2201
|
#39 0x00007f90420a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#40 0x00007f904212861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Also reproducible on bb-11.5-monty.
Attachments
Issue Links
- causes
-
MDEV-34240 galera.MDEV-27862 fails binlog assert in close_thread_tables()
- Closed
- is caused by
-
MDEV-9101 Limit size of created disk temporary files and tables
- Closed
- is duplicated by
-
MDEV-35272 RBR fails with "Can't find record in" after failing to create temporary table within transaction
- Open