Debian Codegraph @

mysql-test/suite/federated/error_row_number.result

raw
1 #
2 # MDEV-26654 ROW_NUMBER is wrong upon INSERT into Federated table
3 #
4 connect master,127.0.0.1,root,,test,$MASTER_MYPORT,;
5 connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
6 connection master;
7 CREATE DATABASE federated;
8 connection slave;
9 CREATE DATABASE federated;
10 connection master;
11 create table t (pk int primary key);
12 create table tfed engine=FEDERATED connection='mysql://root@localhost:$MASTER_MYPORT/test/t';
13 insert into tfed values (1),(2),(1);
14 ERROR 23000: Can't write; duplicate key in table 'tfed'
15 get diagnostics condition 1 @val = row_number;
16 # federated is doing bulk insert here, the exact row number is unknown
17 select @val;
18 @val
19 0
20 drop table tfed, t;
21 connection master;
22 DROP TABLE IF EXISTS federated.t1;
23 DROP DATABASE IF EXISTS federated;
24 connection slave;
25 DROP TABLE IF EXISTS federated.t1;
26 DROP DATABASE IF EXISTS federated;