MDEV-492: fixed incorrect error check.
This commit is contained in:
parent
da3a1c8156
commit
95ee3fbf30
@ -69,3 +69,11 @@ ERROR 42S22: Unknown column '' in 'VALUES() function'
|
|||||||
INSERT INTO t2(a,b) VALUES (1,0) ON DUPLICATE KEY UPDATE
|
INSERT INTO t2(a,b) VALUES (1,0) ON DUPLICATE KEY UPDATE
|
||||||
b=(SELECT VALUES(a)+2 FROM t1);
|
b=(SELECT VALUES(a)+2 FROM t1);
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
#
|
||||||
|
# MDEV-492: incorrect error check before sending OK in mysql_update
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a CHAR(3), b BLOB);
|
||||||
|
UPDATE t1 SET a = 'new'
|
||||||
|
WHERE COLUMN_CREATE( 1, 'v', 1, 'w' ) IS NULL;
|
||||||
|
ERROR 22007: Illegal value used as argument of dynamic column function
|
||||||
|
drop table t1;
|
||||||
|
@ -85,3 +85,12 @@ INSERT INTO t2 VALUES (1,0) ON DUPLICATE KEY UPDATE
|
|||||||
INSERT INTO t2(a,b) VALUES (1,0) ON DUPLICATE KEY UPDATE
|
INSERT INTO t2(a,b) VALUES (1,0) ON DUPLICATE KEY UPDATE
|
||||||
b=(SELECT VALUES(a)+2 FROM t1);
|
b=(SELECT VALUES(a)+2 FROM t1);
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-492: incorrect error check before sending OK in mysql_update
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (a CHAR(3), b BLOB);
|
||||||
|
--error ER_DYN_COL_DATA
|
||||||
|
UPDATE t1 SET a = 'new'
|
||||||
|
WHERE COLUMN_CREATE( 1, 'v', 1, 'w' ) IS NULL;
|
||||||
|
drop table t1;
|
||||||
|
@ -359,7 +359,7 @@ int mysql_update(THD *thd,
|
|||||||
table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
|
table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK);
|
||||||
|
|
||||||
select= make_select(table, 0, 0, conds, 0, &error);
|
select= make_select(table, 0, 0, conds, 0, &error);
|
||||||
if (error || !limit ||
|
if (error || !limit || thd->is_error() ||
|
||||||
(select && select->check_quick(thd, safe_update, limit)))
|
(select && select->check_quick(thd, safe_update, limit)))
|
||||||
{
|
{
|
||||||
delete select;
|
delete select;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user