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
ffa3803e
Commit
ffa3803e
authored
May 20, 2009
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
merge from main
parents
d646af17
b0a7a5f1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
2 deletions
+41
-2
configure.in
configure.in
+1
-1
mysql-test/include/mix1.inc
mysql-test/include/mix1.inc
+19
-0
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+19
-0
mysys/safemalloc.c
mysys/safemalloc.c
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-0
No files found.
configure.in
View file @
ffa3803e
...
...
@@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
AM_INIT_AUTOMAKE
(
mysql, 5.1.3
5
)
AM_INIT_AUTOMAKE
(
mysql, 5.1.3
6
)
AM_CONFIG_HEADER
([
include/config.h:config.h.in]
)
PROTOCOL_VERSION
=
10
...
...
mysql-test/include/mix1.inc
View file @
ffa3803e
...
...
@@ -1516,4 +1516,23 @@ DROP TABLE t1;
# DROP TABLE t1;
#
--
echo
#
--
echo
# Bug #44290: explain crashes for subquery with distinct in
--
echo
# SQL_SELECT::test_quick_select
--
echo
# (reproduced only with InnoDB tables)
--
echo
#
eval
CREATE
TABLE
t1
(
c1
INT
,
c2
INT
,
c3
INT
,
KEY
(
c3
),
KEY
(
c2
,
c3
))
ENGINE
=
$engine_type
;
INSERT
INTO
t1
VALUES
(
1
,
1
,
1
),
(
1
,
1
,
1
),
(
1
,
1
,
2
),
(
1
,
1
,
1
),
(
1
,
1
,
2
);
SELECT
1
FROM
(
SELECT
COUNT
(
DISTINCT
c1
)
FROM
t1
WHERE
c2
IN
(
1
,
1
)
AND
c3
=
2
GROUP
BY
c2
)
x
;
EXPLAIN
SELECT
1
FROM
(
SELECT
COUNT
(
DISTINCT
c1
)
FROM
t1
WHERE
c2
IN
(
1
,
1
)
AND
c3
=
2
GROUP
BY
c2
)
x
;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
mysql-test/r/innodb_mysql.result
View file @
ffa3803e
...
...
@@ -1687,6 +1687,25 @@ vid tid idx name type
3 1 2 c1 NULL
3 1 1 pk NULL
DROP TABLE t1;
#
# Bug #44290: explain crashes for subquery with distinct in
# SQL_SELECT::test_quick_select
# (reproduced only with InnoDB tables)
#
CREATE TABLE t1 (c1 INT, c2 INT, c3 INT, KEY (c3), KEY (c2, c3))
ENGINE=InnoDB;
INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2);
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
1
1
EXPLAIN
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
2 DERIVED t1 index c3,c2 c2 10 NULL 5
DROP TABLE t1;
End of 5.1 tests
drop table if exists t1, t2, t3;
create table t1(a int);
...
...
mysys/safemalloc.c
View file @
ffa3803e
...
...
@@ -174,7 +174,7 @@ void *_mymalloc(size_t size, const char *filename, uint lineno, myf MyFlags)
data
[
size
+
3
]
=
MAGICEND3
;
irem
->
filename
=
(
char
*
)
filename
;
irem
->
linenum
=
lineno
;
irem
->
datasize
=
(
uint32
)
size
;
irem
->
datasize
=
size
;
irem
->
prev
=
NULL
;
/* Add this remember structure to the linked list */
...
...
sql/sql_select.cc
View file @
ffa3803e
...
...
@@ -13471,6 +13471,7 @@ create_sort_index(THD *thd, JOIN *join, ORDER *order,
{
select
->
cleanup
();
// filesort did select
tab
->
select
=
0
;
table
->
quick_keys
.
clear_all
();
// as far as we cleanup select->quick
}
tab
->
select_cond
=
0
;
tab
->
last_inner
=
0
;
...
...
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