Debian Codegraph @

mysql-test/suite/binlog/t/binlog_innodb_stm.test

raw
1 source include/have_innodb.inc;
2 source include/have_binlog_format_statement.inc;
3
4 #
5 # MDEV-18466 Unsafe to log updates on tables referenced by foreign keys with triggers in statement format
6 #
7
8 create table categories(
9 cat_id int not null primary key,
10 cat_name varchar(255) not null,
11 cat_description text
12 ) engine=innodb;
13
14 create table products(
15 prd_id int not null auto_increment primary key,
16 prd_name varchar(355) not null,
17 prd_price decimal,
18 cat_id int not null,
19 foreign key fk_cat(cat_id)
20 references categories(cat_id)
21 on update cascade
22 ) engine=innodb;
23
24 insert into categories values (1, 'drinks', 'drinks');
25 update categories set cat_description=2 where cat_id=1;
26 drop table products, categories;
27
28
29 --echo #
30 --echo # MDEV-35081 - Assertion `!n_mysql_tables_in_use' failed after error
31 --echo # upon binary logging of DML involving vector table
32 --echo #
33 SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;
34 CREATE TABLE t (pk INT PRIMARY KEY, v VECTOR(1) NOT NULL, VECTOR(v)) ENGINE=InnoDB;
35
36 --error ER_BINLOG_STMT_MODE_AND_ROW_ENGINE
37 UPDATE t SET pk = 2 WHERE pk = 1;
38
39 # Cleanup
40 DROP TABLE t;