1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Bug #57666 Unclear warning with broken text in error log on INSERT DELAYED

It is not necessary to support INSERT DELAYED for a single value insert,
while we do not support that for multi-values insert when binlog is
enabled in SBR.

The lock_type is upgrade to TL_WRITE from TL_WRITE_DELAYED for
INSERT DELAYED for single value insert as multi-values insert
did when binlog is enabled. Then it's safe. And binlog it as
INSERT without DELAYED.

mysql-test/extra/binlog_tests/binlog_insert_delayed.test:
  Added test case for bug#57666.
mysql-test/suite/binlog/r/binlog_row_binlog.result:
  Updated for bug#57666
mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
  Updated for bug#57666
mysql-test/suite/binlog/r/binlog_stm_binlog.result:
  Updated for bug#57666
mysql-test/suite/rpl/r/rpl_stm_insert_delayed.result:
  Updated for bug#57666
sql/sql_insert.cc:
  Updated code for the following things:
  1. Upgrade the lock_type to TL_WRITE from TL_WRITE_DELAYED
  for INSERT DELAYED for single value insert as multi-values
  insert did when binlog is enabled.
  2. Clear code to not binlog INSERT DELAYED STMT in SBR.
  3. Get rid of privilege check for log_on.
This commit is contained in:
unknown
2010-11-29 11:04:16 +08:00
parent d08be72f75
commit cd64b23fcf
6 changed files with 31 additions and 77 deletions

View File

@ -51,8 +51,8 @@ CREATE TABLE t1(a int, UNIQUE(a));
INSERT DELAYED IGNORE INTO t1 VALUES(1);
INSERT DELAYED IGNORE INTO t1 VALUES(1);
flush table t1;
use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
use `test`; INSERT IGNORE INTO t1 VALUES(1)
use `test`; INSERT IGNORE INTO t1 VALUES(1)
select * from t1;
a
1
@ -60,10 +60,10 @@ On slave
show binlog events in 'slave-bin.000002' from <binlog_start> limit 1,6;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000002 # Query # # BEGIN
slave-bin.000002 # Query # # use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
slave-bin.000002 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES(1)
slave-bin.000002 # Query # # COMMIT
slave-bin.000002 # Query # # BEGIN
slave-bin.000002 # Query # # use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1)
slave-bin.000002 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES(1)
slave-bin.000002 # Query # # COMMIT
select * from t1;
a