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
0944bed7
Commit
0944bed7
authored
Oct 06, 2004
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.0
into gw.mysql.r18.ru:/usr/home/ram/work/4.0.b5733
parents
992b04d3
4ec50dc4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
9 deletions
+39
-9
mysql-test/r/delete.result
mysql-test/r/delete.result
+11
-0
mysql-test/t/delete.test
mysql-test/t/delete.test
+10
-0
sql/records.cc
sql/records.cc
+18
-9
No files found.
mysql-test/r/delete.result
View file @
0944bed7
...
@@ -50,3 +50,14 @@ select count(*) from t1;
...
@@ -50,3 +50,14 @@ select count(*) from t1;
count(*)
count(*)
0
0
drop table t1;
drop table t1;
create table t1 (a int not null auto_increment primary key, b char(32));
insert into t1 (b) values ('apple'), ('apple');
select * from t1;
a b
1 apple
2 apple
delete t1 from t1, t1 as t2 where t1.b = t2.b and t1.a > t2.a;
select * from t1;
a b
1 apple
drop table t1;
mysql-test/t/delete.test
View file @
0944bed7
...
@@ -61,3 +61,13 @@ select count(*) from t1;
...
@@ -61,3 +61,13 @@ select count(*) from t1;
drop
table
t1
;
drop
table
t1
;
#
# Bug #5733: Table handler error with self-join multi-table DELETE
#
create
table
t1
(
a
int
not
null
auto_increment
primary
key
,
b
char
(
32
));
insert
into
t1
(
b
)
values
(
'apple'
),
(
'apple'
);
select
*
from
t1
;
delete
t1
from
t1
,
t1
as
t2
where
t1
.
b
=
t2
.
b
and
t1
.
a
>
t2
.
a
;
select
*
from
t1
;
drop
table
t1
;
sql/records.cc
View file @
0944bed7
...
@@ -131,17 +131,26 @@ void end_read_record(READ_RECORD *info)
...
@@ -131,17 +131,26 @@ void end_read_record(READ_RECORD *info)
static
int
rr_quick
(
READ_RECORD
*
info
)
static
int
rr_quick
(
READ_RECORD
*
info
)
{
{
int
tmp
=
info
->
select
->
quick
->
get_next
()
;
int
tmp
;
if
(
tmp
)
while
((
tmp
=
info
->
select
->
quick
->
get_next
())
)
{
{
if
(
tmp
==
HA_ERR_END_OF_FILE
)
if
(
info
->
thd
->
killed
)
tmp
=
-
1
;
else
{
{
if
(
info
->
print_error
)
my_error
(
ER_SERVER_SHUTDOWN
,
MYF
(
0
));
info
->
file
->
print_error
(
tmp
,
MYF
(
0
));
return
1
;
if
(
tmp
<
0
)
// Fix negative BDB errno
}
tmp
=
1
;
if
(
tmp
!=
HA_ERR_RECORD_DELETED
)
{
if
(
tmp
==
HA_ERR_END_OF_FILE
)
tmp
=
-
1
;
else
{
if
(
info
->
print_error
)
info
->
file
->
print_error
(
tmp
,
MYF
(
0
));
if
(
tmp
<
0
)
// Fix negative BDB errno
tmp
=
1
;
}
break
;
}
}
}
}
return
tmp
;
return
tmp
;
...
...
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