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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
968e06a8
Commit
968e06a8
authored
Feb 15, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge
mysql-test/t/delete.test: Auto merged sql/sql_delete.cc: Auto merged
parents
69a6d4da
d6157bec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
mysql-test/r/delete.result
mysql-test/r/delete.result
+9
-0
mysql-test/t/delete.test
mysql-test/t/delete.test
+11
-0
sql/sql_delete.cc
sql/sql_delete.cc
+1
-0
No files found.
mysql-test/r/delete.result
View file @
968e06a8
...
@@ -163,3 +163,12 @@ select * from t1;
...
@@ -163,3 +163,12 @@ select * from t1;
a b
a b
7 7
7 7
drop table t1;
drop table t1;
CREATE TABLE t1 ( a int PRIMARY KEY );
DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
INSERT INTO t1 VALUES (0),(1),(2);
DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a LIMIT 1;
SELECT * FROM t1;
a
0
2
DROP TABLE t1;
mysql-test/t/delete.test
View file @
968e06a8
...
@@ -141,3 +141,14 @@ delete t1 from t1 where a = 3;
...
@@ -141,3 +141,14 @@ delete t1 from t1 where a = 3;
check
table
t1
;
check
table
t1
;
select
*
from
t1
;
select
*
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# Bug #8392: delete with ORDER BY containing a direct reference to the table
#
CREATE
TABLE
t1
(
a
int
PRIMARY
KEY
);
DELETE
FROM
t1
WHERE
t1
.
a
>
0
ORDER
BY
t1
.
a
;
INSERT
INTO
t1
VALUES
(
0
),(
1
),(
2
);
DELETE
FROM
t1
WHERE
t1
.
a
>
0
ORDER
BY
t1
.
a
LIMIT
1
;
SELECT
*
FROM
t1
;
DROP
TABLE
t1
;
sql/sql_delete.cc
View file @
968e06a8
...
@@ -117,6 +117,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order,
...
@@ -117,6 +117,7 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order,
bzero
((
char
*
)
&
tables
,
sizeof
(
tables
));
bzero
((
char
*
)
&
tables
,
sizeof
(
tables
));
tables
.
table
=
table
;
tables
.
table
=
table
;
tables
.
alias
=
table_list
->
alias
;
table
->
sort
.
io_cache
=
(
IO_CACHE
*
)
my_malloc
(
sizeof
(
IO_CACHE
),
table
->
sort
.
io_cache
=
(
IO_CACHE
*
)
my_malloc
(
sizeof
(
IO_CACHE
),
MYF
(
MY_FAE
|
MY_ZEROFILL
));
MYF
(
MY_FAE
|
MY_ZEROFILL
));
...
...
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