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
203f2178
Commit
203f2178
authored
May 08, 2009
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Automerge.
parents
0f40402f
975364ad
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
2 deletions
+53
-2
mysql-test/r/heap_btree.result
mysql-test/r/heap_btree.result
+7
-0
mysql-test/t/heap_btree.test
mysql-test/t/heap_btree.test
+8
-0
sql/sql_delete.cc
sql/sql_delete.cc
+19
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+19
-1
No files found.
mysql-test/r/heap_btree.result
View file @
203f2178
...
...
@@ -336,4 +336,11 @@ a b
NULL NULL
NULL 1
drop table t1;
#
# bug#39918 - memory (heap) engine crashing while executing self join with delete
#
CREATE TABLE t1(a INT, KEY USING BTREE (a)) ENGINE=MEMORY;
INSERT INTO t1 VALUES(1),(1);
DELETE a1 FROM t1 AS a1, t1 AS a2 WHERE a1.a=a2.a;
DROP TABLE t1;
End of 5.0 tests
mysql-test/t/heap_btree.test
View file @
203f2178
...
...
@@ -253,5 +253,13 @@ insert into t1 values (1, 1), (3, 3), (2, 2), (NULL, 1), (NULL, NULL), (0, 0);
select
*
from
t1
where
a
is
null
;
drop
table
t1
;
--
echo
#
--
echo
# bug#39918 - memory (heap) engine crashing while executing self join with delete
--
echo
#
CREATE
TABLE
t1
(
a
INT
,
KEY
USING
BTREE
(
a
))
ENGINE
=
MEMORY
;
INSERT
INTO
t1
VALUES
(
1
),(
1
);
DELETE
a1
FROM
t1
AS
a1
,
t1
AS
a2
WHERE
a1
.
a
=
a2
.
a
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
sql/sql_delete.cc
View file @
203f2178
...
...
@@ -503,6 +503,11 @@ int mysql_multi_delete_prepare(THD *thd)
}
}
}
/*
Reset the exclude flag to false so it doesn't interfare
with further calls to unique_table
*/
lex
->
select_lex
.
exclude_from_table_unique_test
=
FALSE
;
DBUG_RETURN
(
FALSE
);
}
...
...
@@ -538,11 +543,24 @@ multi_delete::initialize_tables(JOIN *join)
DBUG_RETURN
(
1
);
table_map
tables_to_delete_from
=
0
;
delete_while_scanning
=
1
;
for
(
walk
=
delete_tables
;
walk
;
walk
=
walk
->
next_local
)
{
tables_to_delete_from
|=
walk
->
table
->
map
;
if
(
delete_while_scanning
&&
unique_table
(
thd
,
walk
,
join
->
tables_list
,
false
))
{
/*
If the table we are going to delete from appears
in join, we need to defer delete. So the delete
doesn't interfers with the scaning of results.
*/
delete_while_scanning
=
0
;
}
}
walk
=
delete_tables
;
delete_while_scanning
=
1
;
for
(
JOIN_TAB
*
tab
=
join
->
join_tab
,
*
end
=
join
->
join_tab
+
join
->
tables
;
tab
<
end
;
tab
++
)
...
...
tests/mysql_client_test.c
View file @
203f2178
...
...
@@ -3971,6 +3971,10 @@ static void test_fetch_date()
myheader
(
"test_fetch_date"
);
/* Will not work if sql_mode is NO_ZERO_DATE (implicit if TRADITIONAL) /*/
rc
=
mysql_query
(
mysql
,
"SET SQL_MODE=''"
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"DROP TABLE IF EXISTS test_bind_result"
);
myquery
(
rc
);
...
...
@@ -4685,6 +4689,9 @@ static void test_stmt_close()
/* set AUTOCOMMIT to ON*/
mysql_autocommit
(
lmysql
,
TRUE
);
rc
=
mysql_query
(
lmysql
,
"SET SQL_MODE = ''"
);
myquery
(
rc
);
rc
=
mysql_query
(
lmysql
,
"DROP TABLE IF EXISTS test_stmt_close"
);
myquery
(
rc
);
...
...
@@ -11855,6 +11862,9 @@ static void test_bug6058()
myheader
(
"test_bug6058"
);
rc
=
mysql_query
(
mysql
,
"SET SQL_MODE=''"
);
myquery
(
rc
);
stmt_text
=
"SELECT CAST('0000-00-00' AS DATE)"
;
rc
=
mysql_real_query
(
mysql
,
stmt_text
,
(
uint
)
strlen
(
stmt_text
));
...
...
@@ -13026,6 +13036,9 @@ static void test_bug8378()
if
(
!
opt_silent
)
fprintf
(
stdout
,
" OK"
);
rc
=
mysql_query
(
lmysql
,
"SET SQL_MODE=''"
);
myquery
(
rc
);
len
=
mysql_real_escape_string
(
lmysql
,
out
,
TEST_BUG8378_IN
,
4
);
/* No escaping should have actually happened. */
...
...
@@ -16056,6 +16069,11 @@ static void test_bug31669()
rc
=
mysql_query
(
mysql
,
query
);
myquery
(
rc
);
strxmov
(
query
,
"GRANT ALL PRIVILEGES ON *.* TO '"
,
user
,
"'@'localhost' IDENTIFIED BY "
"'"
,
buff
,
"' WITH GRANT OPTION"
,
NullS
);
rc
=
mysql_query
(
mysql
,
query
);
myquery
(
rc
);
rc
=
mysql_query
(
mysql
,
"FLUSH PRIVILEGES"
);
myquery
(
rc
);
...
...
@@ -16093,7 +16111,7 @@ static void test_bug31669()
strxmov
(
query
,
"DELETE FROM mysql.user WHERE User='"
,
user
,
"'"
,
NullS
);
rc
=
mysql_query
(
mysql
,
query
);
myquery
(
rc
);
DIE_UNLESS
(
mysql_affected_rows
(
mysql
)
==
1
);
DIE_UNLESS
(
mysql_affected_rows
(
mysql
)
==
2
);
#endif
DBUG_VOID_RETURN
;
...
...
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