mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#28677: SELECT on missing column gives extra error
The method select_insert::send_error does two things, it rolls back a statement being executed and outputs an error message. But when a nonexistent column is referenced, an error message has been published already and there is no need to publish another. Fixed by moving all functionality beyond publishing an error message into select_insert::abort() and calling only that function.
This commit is contained in:
@@ -41,3 +41,17 @@ SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
|
||||
a
|
||||
1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1( a INT );
|
||||
SELECT b FROM t1;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
SHOW ERRORS;
|
||||
Level Code Message
|
||||
Error 1054 Unknown column 'b' in 'field list'
|
||||
CREATE TABLE t2 SELECT b FROM t1;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
SHOW ERRORS;
|
||||
Level Code Message
|
||||
Error 1054 Unknown column 'b' in 'field list'
|
||||
INSERT INTO t1 SELECT b FROM t1;
|
||||
ERROR 42S22: Unknown column 'b' in 'field list'
|
||||
DROP TABLE t1;
|
||||
|
||||
Reference in New Issue
Block a user