Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
21d03cb0
Commit
21d03cb0
authored
Oct 07, 2021
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-26654 ROW_NUMBER is wrong upon INSERT into Federated table
just a test case
parent
5c0b6345
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
mysql-test/suite/federated/error_row_number.result
mysql-test/suite/federated/error_row_number.result
+26
-0
mysql-test/suite/federated/error_row_number.test
mysql-test/suite/federated/error_row_number.test
+18
-0
No files found.
mysql-test/suite/federated/error_row_number.result
0 → 100644
View file @
21d03cb0
#
# MDEV-26654 ROW_NUMBER is wrong upon INSERT into Federated table
#
connect master,127.0.0.1,root,,test,$MASTER_MYPORT,;
connect slave,127.0.0.1,root,,test,$SLAVE_MYPORT,;
connection master;
CREATE DATABASE federated;
connection slave;
CREATE DATABASE federated;
connection master;
create table t (pk int primary key);
create table tfed engine=FEDERATED connection='mysql://root@localhost:$MASTER_MYPORT/test/t';
insert into tfed values (1),(2),(1);
ERROR 23000: Can't write; duplicate key in table 'tfed'
get diagnostics condition 1 @val = row_number;
# federated is doing bulk insert here, the exact row number is unknown
select @val;
@val
0
drop table tfed, t;
connection master;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
connection slave;
DROP TABLE IF EXISTS federated.t1;
DROP DATABASE IF EXISTS federated;
mysql-test/suite/federated/error_row_number.test
0 → 100644
View file @
21d03cb0
--
echo
#
--
echo
# MDEV-26654 ROW_NUMBER is wrong upon INSERT into Federated table
--
echo
#
--
source
suite
/
federated
/
have_federatedx
.
inc
--
source
include
/
federated
.
inc
--
connection
master
create
table
t
(
pk
int
primary
key
);
--
evalp
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
=
row_number
;
--
echo
# federated is doing bulk insert here, the exact row number is unknown
select
@
val
;
drop
table
tfed
,
t
;
--
source
include
/
federated_cleanup
.
inc
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment