mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
BUG#32047 - 'Spurious' errors while opening MERGE tables
Accessing well defined MERGE table may return an error stating that the merge table is incorrectly defined. This happens if MERGE child tables were accessed before and we failed to open another incorrectly defined MERGE table in this connection. myrg_open() internally used my_errno as a variable for determining failure, and thus could be tricked into a wrong decision by other uses of my_errno. With this fix we use function local boolean flag instead of my_errno to determine failure.
This commit is contained in:
@ -940,4 +940,15 @@ m1 CREATE TABLE `m1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1, m1;
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE TABLE t2(a VARCHAR(10));
|
||||
CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(t1, t2);
|
||||
CREATE TABLE m2(a INT) ENGINE=MERGE UNION=(t1);
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
SELECT * FROM m1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
SELECT * FROM m2;
|
||||
a
|
||||
DROP TABLE t1, t2, m1, m2;
|
||||
End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user