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
945c46e6
Commit
945c46e6
authored
Jun 04, 2002
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix for multi-table delete with test case and manual entry
parent
12ee8a3e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
Docs/manual.texi
Docs/manual.texi
+2
-0
mysql-test/r/multi_update.result
mysql-test/r/multi_update.result
+4
-0
mysql-test/t/multi_update.test
mysql-test/t/multi_update.test
+18
-0
sql/sql_parse.cc
sql/sql_parse.cc
+0
-5
No files found.
Docs/manual.texi
View file @
945c46e6
...
@@ -49343,6 +49343,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
...
@@ -49343,6 +49343,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet
@itemize @bullet
@item
@item
Fixed bug in multi-table @code{DELETE} when optimiser uses only indices
@item
Fixed that @code{ALTER TABLE table_name RENAME new_table_name} is as fast
Fixed that @code{ALTER TABLE table_name RENAME new_table_name} is as fast
as @code{RENAME TABLE}.
as @code{RENAME TABLE}.
@item
@item
mysql-test/r/multi_update.result
View file @
945c46e6
...
@@ -66,3 +66,7 @@ select count(*) from t3 where id3;
...
@@ -66,3 +66,7 @@ select count(*) from t3 where id3;
count(*)
count(*)
0
0
drop table t1,t2,t3;
drop table t1,t2,t3;
create table t1(id1 int not null auto_increment primary key, t varchar(100));
create table t2(id2 int not null, t varchar(100), index(id2));
delete t1, t2 from t2,t1 where t1.id1 = t2.id2 and t1.id1 > 100;
drop table t1,t2;
mysql-test/t/multi_update.test
View file @
945c46e6
...
@@ -62,3 +62,21 @@ select count(*) from t2 where id2;
...
@@ -62,3 +62,21 @@ select count(*) from t2 where id2;
select
count
(
*
)
from
t3
where
id3
;
select
count
(
*
)
from
t3
where
id3
;
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
create
table
t1
(
id1
int
not
null
auto_increment
primary
key
,
t
varchar
(
100
));
create
table
t2
(
id2
int
not
null
,
t
varchar
(
100
),
index
(
id2
));
disable_query_log
;
let
$
1
=
1000
;
while
(
$
1
)
{
let
$
2
=
5
;
eval
insert
into
t1
(
t
)
values
(
'aaaaaaaaaaaaaaaaaaaa'
);
while
(
$
2
)
{
eval
insert
into
t2
(
id2
,
t
)
values
(
$
1
,
'bbbbbbbbbbbbbbbbb'
);
dec
$
2
;
}
dec
$
1
;
}
enable_query_log
;
delete
t1
,
t2
from
t2
,
t1
where
t1
.
id1
=
t2
.
id2
and
t1
.
id1
>
100
;
drop
table
t1
,
t2
;
sql/sql_parse.cc
View file @
945c46e6
...
@@ -1963,11 +1963,6 @@ mysql_execute_command(void)
...
@@ -1963,11 +1963,6 @@ mysql_execute_command(void)
(
void
)
add_item_to_list
(
new
Item_field
(
auxi
->
db
,
auxi
->
real_name
,
"*"
));
(
void
)
add_item_to_list
(
new
Item_field
(
auxi
->
db
,
auxi
->
real_name
,
"*"
));
}
}
tables
->
grant
.
want_privilege
=
(
SELECT_ACL
&
~
tables
->
grant
.
privilege
);
tables
->
grant
.
want_privilege
=
(
SELECT_ACL
&
~
tables
->
grant
.
privilege
);
if
(
add_item_to_list
(
new
Item_null
()))
{
res
=
-
1
;
break
;
}
thd
->
proc_info
=
"init"
;
thd
->
proc_info
=
"init"
;
if
((
res
=
open_and_lock_tables
(
thd
,
tables
)))
if
((
res
=
open_and_lock_tables
(
thd
,
tables
)))
break
;
break
;
...
...
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