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
732a6a9e
Commit
732a6a9e
authored
Dec 26, 2009
by
Ramil Kalimullin
Browse files
Options
Browse Files
Download
Plain Diff
Auto-merge.
parents
416df0ea
7344b58c
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 @
732a6a9e
...
...
@@ -1916,4 +1916,26 @@ execute stmt;
deallocate prepare stmt;
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.
mysql-test/t/ps.test
View file @
732a6a9e
...
...
@@ -1996,4 +1996,20 @@ deallocate prepare stmt;
drop
table
t1
,
t2
;
--
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
.
sql/sql_select.cc
View file @
732a6a9e
...
...
@@ -6777,6 +6777,7 @@ static void update_depend_map(JOIN *join, ORDER *order)
table_map
depend_map
;
order
->
item
[
0
]
->
update_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
if
(
!
(
order
->
depend_map
&
(
OUTER_REF_TABLE_BIT
|
RAND_TABLE_BIT
))
&&
!
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