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
f7f6410c
Commit
f7f6410c
authored
Aug 29, 2012
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-492: fixed incorrect error check.
parent
38b9797d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
mysql-test/r/errors.result
mysql-test/r/errors.result
+8
-0
mysql-test/t/errors.test
mysql-test/t/errors.test
+9
-0
sql/sql_update.cc
sql/sql_update.cc
+1
-1
No files found.
mysql-test/r/errors.result
View file @
f7f6410c
...
...
@@ -69,3 +69,11 @@ ERROR 42S22: Unknown column '' in 'VALUES() function'
INSERT INTO t2(a,b) VALUES (1,0) ON DUPLICATE KEY UPDATE
b=(SELECT VALUES(a)+2 FROM t1);
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;
mysql-test/t/errors.test
View file @
f7f6410c
...
...
@@ -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
b
=
(
SELECT
VALUES
(
a
)
+
2
FROM
t1
);
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
;
sql/sql_update.cc
View file @
f7f6410c
...
...
@@ -359,7 +359,7 @@ int mysql_update(THD *thd,
table
->
file
->
info
(
HA_STATUS_VARIABLE
|
HA_STATUS_NO_LOCK
);
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
)))
{
delete
select
;
...
...
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