mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
merge with 5.3
sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
This commit is contained in:
@@ -303,6 +303,36 @@ include/diff_tables.inc [master:t2, slave:t2]
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
SET SQL_MODE='';
|
||||
CREATE TABLE t1(s VARCHAR(10)) ENGINE=myisam;
|
||||
CREATE TABLE t_ignored1(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam;
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTO_INCREMENT column");
|
||||
CREATE TABLE test.slave_only(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam;
|
||||
INSERT INTO slave_only VALUES(NULL);
|
||||
CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW INSERT INTO slave_only VALUES(NULL);
|
||||
INSERT INTO t_ignored1 VALUES(NULL);
|
||||
INSERT INTO t1 VALUES('s');
|
||||
UPDATE t1 SET s='s1';
|
||||
SELECT * FROM t1;
|
||||
s
|
||||
s1
|
||||
CREATE TABLE t_ignored2(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam;
|
||||
STOP SLAVE;
|
||||
SET GLOBAL sql_slave_skip_counter = 2;
|
||||
START SLAVE;
|
||||
INSERT INTO t_ignored2 VALUES(NULL);
|
||||
UPDATE t1 SET s='s2';
|
||||
SELECT * FROM t1;
|
||||
s
|
||||
s2
|
||||
SHOW TABLES LIKE 't\_ignored_';
|
||||
Tables_in_test (t\_ignored_)
|
||||
t_ignored2
|
||||
SELECT * FROM t_ignored2;
|
||||
id
|
||||
DROP TABLE slave_only;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t_ignored1;
|
||||
DROP TABLE t_ignored2;
|
||||
CREATE TABLE t1 (id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, data INT) ENGINE=innodb;
|
||||
BEGIN;
|
||||
# Set sql_mode with NO_AUTO_VALUE_ON_ZERO for allowing
|
||||
|
Reference in New Issue
Block a user