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
041baac3
Commit
041baac3
authored
Dec 26, 2009
by
Ramil Kalimullin
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge.
parents
916b559b
732a6a9e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
0 deletions
+39
-0
mysql-test/r/ps.result
mysql-test/r/ps.result
+22
-0
mysql-test/t/ps.test
mysql-test/t/ps.test
+16
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-0
No files found.
mysql-test/r/ps.result
View file @
041baac3
...
@@ -1942,6 +1942,28 @@ execute stmt;
...
@@ -1942,6 +1942,28 @@ execute stmt;
deallocate prepare stmt;
deallocate prepare stmt;
drop table t1,t2;
drop table t1,t2;
#
#
#
# Bug #49570: Assertion failed: !(order->used & map)
# on re-execution of prepared statement
#
CREATE TABLE t1(a INT PRIMARY KEY);
INSERT INTO t1 VALUES(0), (1);
PREPARE stmt FROM
"SELECT 1 FROM t1 JOIN t1 t2 USING(a) GROUP BY t2.a, t1.a";
EXECUTE stmt;
1
1
1
EXECUTE stmt;
1
1
1
EXECUTE stmt;
1
1
1
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
End of 5.0 tests.
End of 5.0 tests.
create procedure proc_1() reset query cache;
create procedure proc_1() reset query cache;
call proc_1();
call proc_1();
...
...
mysql-test/t/ps.test
View file @
041baac3
...
@@ -2014,6 +2014,22 @@ deallocate prepare stmt;
...
@@ -2014,6 +2014,22 @@ deallocate prepare stmt;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
--
echo
#
--
echo
#
--
echo
#
--
echo
# Bug #49570: Assertion failed: !(order->used & map)
--
echo
# on re-execution of prepared statement
--
echo
#
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
);
INSERT
INTO
t1
VALUES
(
0
),
(
1
);
PREPARE
stmt
FROM
"SELECT 1 FROM t1 JOIN t1 t2 USING(a) GROUP BY t2.a, t1.a"
;
EXECUTE
stmt
;
EXECUTE
stmt
;
EXECUTE
stmt
;
DEALLOCATE
PREPARE
stmt
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
.
--
echo
End
of
5.0
tests
.
#
#
...
...
sql/sql_select.cc
View file @
041baac3
...
@@ -7067,6 +7067,7 @@ static void update_depend_map(JOIN *join, ORDER *order)
...
@@ -7067,6 +7067,7 @@ static void update_depend_map(JOIN *join, ORDER *order)
table_map
depend_map
;
table_map
depend_map
;
order
->
item
[
0
]
->
update_used_tables
();
order
->
item
[
0
]
->
update_used_tables
();
order
->
depend_map
=
depend_map
=
order
->
item
[
0
]
->
used_tables
();
order
->
depend_map
=
depend_map
=
order
->
item
[
0
]
->
used_tables
();
order
->
used
=
0
;
// Not item_sum(), RAND() and no reference to table outside of sub select
// Not item_sum(), RAND() and no reference to table outside of sub select
if
(
!
(
order
->
depend_map
&
(
OUTER_REF_TABLE_BIT
|
RAND_TABLE_BIT
))
if
(
!
(
order
->
depend_map
&
(
OUTER_REF_TABLE_BIT
|
RAND_TABLE_BIT
))
&&
!
order
->
item
[
0
]
->
with_sum_func
)
&&
!
order
->
item
[
0
]
->
with_sum_func
)
...
...
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