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
b0c48186
Commit
b0c48186
authored
May 03, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"delete from table where const" bug fixed
parent
d61b5600
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
mysql-test/t/delete.test
mysql-test/t/delete.test
+6
-0
sql/sql_delete.cc
sql/sql_delete.cc
+1
-1
No files found.
mysql-test/t/delete.test
View file @
b0c48186
...
@@ -53,5 +53,11 @@ select * from t1 where misc > 5 and bool is null;
...
@@ -53,5 +53,11 @@ select * from t1 where misc > 5 and bool is null;
delete
from
t1
where
misc
>
5
and
bool
is
null
;
delete
from
t1
where
misc
>
5
and
bool
is
null
;
select
*
from
t1
where
misc
>
5
and
bool
is
null
;
select
*
from
t1
where
misc
>
5
and
bool
is
null
;
select
count
(
*
)
from
t1
;
delete
from
t1
where
1
>
2
;
select
count
(
*
)
from
t1
;
delete
from
t1
where
3
>
2
;
select
count
(
*
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
sql/sql_delete.cc
View file @
b0c48186
...
@@ -54,7 +54,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
...
@@ -54,7 +54,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, ORDER *order,
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
/* Test if the user wants to delete all rows */
/* Test if the user wants to delete all rows */
if
(
!
using_limit
&&
(
!
conds
||
conds
->
const_item
(
))
&&
if
(
!
using_limit
&&
(
!
conds
||
(
conds
->
const_item
()
&&
conds
->
val_int
()
))
&&
!
(
specialflag
&
(
SPECIAL_NO_NEW_FUNC
|
SPECIAL_SAFE_MODE
))
&&
!
safe_update
)
!
(
specialflag
&
(
SPECIAL_NO_NEW_FUNC
|
SPECIAL_SAFE_MODE
))
&&
!
safe_update
)
{
{
deleted
=
table
->
file
->
records
;
deleted
=
table
->
file
->
records
;
...
...
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