[MDEV-26654] ROW_NUMBER is wrong upon INSERT into Federated table Created: 2021-09-21  Updated: 2021-10-26  Resolved: 2021-10-16

Status: Closed
Project: MariaDB Server
Component/s: Server, Storage Engine - Federated
Affects Version/s: 10.7
Fix Version/s: 10.7.1

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-10075 Provide index of error causing error ... Closed
Relates
relates to MDEV-26635 ROW_NUMBER is not 0 for errors not ca... Closed
relates to MDEV-26693 ROW_NUMBER is wrong upon INSERT or UP... Closed

 Description   

--source suite/federated/have_federatedx.inc
 
create table t (pk int primary key);
--eval create table tfed engine=FEDERATED connection='mysql://root@localhost:$MASTER_MYPORT/test/t'
--error ER_DUP_KEY
insert into tfed values (1),(2),(1);
get diagnostics condition 1 @val = error_index;
select @val;
 
# Cleanup
drop table tfed, t;

10.7 225564993

MariaDB [test]> insert into tfed values (1),(2),(1);
ERROR 1022 (23000): Can't write; duplicate key in table 'tfed'
MariaDB [test]> get diagnostics condition 1 @val = error_index;
Query OK, 0 rows affected (0.001 sec)
 
MariaDB [test]> select @val;
+------+
| @val |
+------+
|    4 |
+------+
1 row in set (0.001 sec)

The expected result is obviously 3.



 Comments   
Comment by Sergei Golubchik [ 2021-10-16 ]

pushed in bb-10.7-row_number

Generated at Thu Feb 08 09:46:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.