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
76379be1
Commit
76379be1
authored
Mar 13, 2011
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge in the fix for LPBUG#730604, and a corrected fix for LP BUG#719198,
after Monty's review.
parents
ba9df907
329f6431
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
1 deletion
+49
-1
mysql-test/r/subselect_mat.result
mysql-test/r/subselect_mat.result
+23
-0
mysql-test/t/subselect_mat.test
mysql-test/t/subselect_mat.test
+24
-0
sql/item.h
sql/item.h
+1
-0
sql/sql_class.cc
sql/sql_class.cc
+1
-1
No files found.
mysql-test/r/subselect_mat.result
View file @
76379be1
...
@@ -1409,3 +1409,26 @@ f2
...
@@ -1409,3 +1409,26 @@ f2
3
3
4
4
drop table t1, t2, t3;
drop table t1, t2, t3;
#
# LPBUG#730604 Assertion `bit < (map)->n_bits' failed in maria-5.3 with
# partial_match_rowid_merge
#
CREATE TABLE t1 (f1 int NOT NULL, f2 int, f3 int) ;
CREATE TABLE t2 (f1 int NOT NULL, f2 int, f3 int) ;
INSERT INTO t1 VALUES (60, 3, null), (61, null, 77);
INSERT INTO t2 VALUES (1000,6,2);
set @@optimizer_switch='materialization=on,partial_match_rowid_merge=on,partial_match_table_scan=off';
EXPLAIN
SELECT (f1, f2, f3) NOT IN
(SELECT COUNT(DISTINCT f2), f1, f3 FROM t1 GROUP BY f1, f3)
FROM t2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 system NULL NULL NULL NULL 1
2 SUBQUERY t1 ALL NULL NULL NULL NULL 2 Using filesort
SELECT (f1, f2, f3) NOT IN
(SELECT COUNT(DISTINCT f2), f1, f3 FROM t1 GROUP BY f1, f3)
FROM t2;
(f1, f2, f3) NOT IN
(SELECT COUNT(DISTINCT f2), f1, f3 FROM t1 GROUP BY f1, f3)
1
drop table t1, t2;
mysql-test/t/subselect_mat.test
View file @
76379be1
...
@@ -1039,3 +1039,27 @@ SELECT * FROM t2 WHERE (SELECT f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a FRO
...
@@ -1039,3 +1039,27 @@ SELECT * FROM t2 WHERE (SELECT f3a FROM t3 where f3a > 3) NOT IN (SELECT f1a FRO
SELECT
*
FROM
t2
WHERE
(
SELECT
f3a
FROM
t3
where
f3a
>
3
)
NOT
IN
(
SELECT
f1a
FROM
t1
);
SELECT
*
FROM
t2
WHERE
(
SELECT
f3a
FROM
t3
where
f3a
>
3
)
NOT
IN
(
SELECT
f1a
FROM
t1
);
drop
table
t1
,
t2
,
t3
;
drop
table
t1
,
t2
,
t3
;
--
echo
#
--
echo
# LPBUG#730604 Assertion `bit < (map)->n_bits' failed in maria-5.3 with
--
echo
# partial_match_rowid_merge
--
echo
#
CREATE
TABLE
t1
(
f1
int
NOT
NULL
,
f2
int
,
f3
int
)
;
CREATE
TABLE
t2
(
f1
int
NOT
NULL
,
f2
int
,
f3
int
)
;
INSERT
INTO
t1
VALUES
(
60
,
3
,
null
),
(
61
,
null
,
77
);
INSERT
INTO
t2
VALUES
(
1000
,
6
,
2
);
set
@@
optimizer_switch
=
'materialization=on,partial_match_rowid_merge=on,partial_match_table_scan=off'
;
EXPLAIN
SELECT
(
f1
,
f2
,
f3
)
NOT
IN
(
SELECT
COUNT
(
DISTINCT
f2
),
f1
,
f3
FROM
t1
GROUP
BY
f1
,
f3
)
FROM
t2
;
SELECT
(
f1
,
f2
,
f3
)
NOT
IN
(
SELECT
COUNT
(
DISTINCT
f2
),
f1
,
f3
FROM
t1
GROUP
BY
f1
,
f3
)
FROM
t2
;
drop
table
t1
,
t2
;
sql/item.h
View file @
76379be1
...
@@ -3437,6 +3437,7 @@ class Item_cache: public Item_basic_constant
...
@@ -3437,6 +3437,7 @@ class Item_cache: public Item_basic_constant
virtual
void
store
(
Item
*
item
);
virtual
void
store
(
Item
*
item
);
virtual
bool
cache_value
()
=
0
;
virtual
bool
cache_value
()
=
0
;
bool
is_null
()
{
return
null_value
;
}
};
};
...
...
sql/sql_class.cc
View file @
76379be1
...
@@ -3104,7 +3104,7 @@ bool select_materialize_with_stats::send_data(List<Item> &items)
...
@@ -3104,7 +3104,7 @@ bool select_materialize_with_stats::send_data(List<Item> &items)
while
((
cur_item
=
item_it
++
))
while
((
cur_item
=
item_it
++
))
{
{
if
(
cur_item
->
is_null
())
if
(
cur_item
->
is_null
_result
())
{
{
++
cur_col_stat
->
null_count
;
++
cur_col_stat
->
null_count
;
cur_col_stat
->
max_null_row
=
count_rows
;
cur_col_stat
->
max_null_row
=
count_rows
;
...
...
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