forked from xelabs/tokudb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lp1739734: Fixed federated SE regression introduced in the gcc7 fixes.
- Loading branch information
Showing
3 changed files
with
98 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# | ||
# Bug lp1739734 "Federated table returns error 1430 from storage engine" | ||
# | ||
# This is a bug introduced in the artful/gcc7 compilation fixes, caused by | ||
# a moved break statement. | ||
CREATE DATABASE federated; | ||
CREATE DATABASE federated; | ||
CREATE DATABASE lp1739734; | ||
use lp1739734; | ||
CREATE SERVER local_server | ||
FOREIGN DATA WRAPPER mysql | ||
OPTIONS ( | ||
HOST '127.0.0.1', | ||
PORT MASTER_PORT, | ||
USER 'root', | ||
PASSWORD '', | ||
DATABASE 'lp1739734' | ||
); | ||
CREATE TABLE remote_table ( | ||
a INT, | ||
b INT, | ||
KEY ab (a,b), | ||
KEY ba (b,a) | ||
); | ||
CREATE TABLE local_table ( | ||
a INT, | ||
b INT, | ||
KEY ab (a,b), | ||
KEY ba (b,a) | ||
) ENGINE=federated CONNECTION='local_server/remote_table'; | ||
SELECT * FROM local_table; | ||
a b | ||
SELECT * FROM local_table USE INDEX (ab) | ||
WHERE a<1 AND b=0; | ||
a b | ||
SELECT * FROM local_table USE INDEX (ba) | ||
WHERE a<1 AND b=0; | ||
a b | ||
DROP DATABASE lp1739734; | ||
DROP SERVER local_server; | ||
DROP TABLE IF EXISTS federated.t1; | ||
DROP DATABASE federated; | ||
DROP TABLE IF EXISTS federated.t1; | ||
DROP DATABASE federated; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--echo # | ||
--echo # Bug lp1739734 "Federated table returns error 1430 from storage engine" | ||
--echo # | ||
--echo # This is a bug introduced in the artful/gcc7 compilation fixes, caused by | ||
--echo # a moved break statement. | ||
|
||
--source suite/federated/include/federated.inc | ||
|
||
connection master; | ||
CREATE DATABASE lp1739734; | ||
use lp1739734; | ||
|
||
--replace_result $MASTER_MYPORT MASTER_PORT | ||
eval CREATE SERVER local_server | ||
FOREIGN DATA WRAPPER mysql | ||
OPTIONS ( | ||
HOST '127.0.0.1', | ||
PORT $MASTER_MYPORT, | ||
USER 'root', | ||
PASSWORD '', | ||
DATABASE 'lp1739734' | ||
); | ||
|
||
CREATE TABLE remote_table ( | ||
a INT, | ||
b INT, | ||
KEY ab (a,b), | ||
KEY ba (b,a) | ||
); | ||
|
||
|
||
CREATE TABLE local_table ( | ||
a INT, | ||
b INT, | ||
KEY ab (a,b), | ||
KEY ba (b,a) | ||
) ENGINE=federated CONNECTION='local_server/remote_table'; | ||
|
||
SELECT * FROM local_table; | ||
|
||
SELECT * FROM local_table USE INDEX (ab) | ||
WHERE a<1 AND b=0; | ||
|
||
SELECT * FROM local_table USE INDEX (ba) | ||
WHERE a<1 AND b=0; | ||
|
||
DROP DATABASE lp1739734; | ||
DROP SERVER local_server; | ||
|
||
--source suite/federated/include/federated_cleanup.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters