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
ab2450ef
Commit
ab2450ef
authored
Nov 06, 2009
by
Alexander Nozdrin
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge from mysql-trunk-merge.
Fix partition_column.test.
parents
ef862653
8e931fe5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
5 deletions
+34
-5
mysql-test/r/partition_column.result
mysql-test/r/partition_column.result
+1
-1
mysql-test/r/partition_pruning.result
mysql-test/r/partition_pruning.result
+1
-2
mysql-test/r/range.result
mysql-test/r/range.result
+9
-0
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+1
-2
mysql-test/t/range.test
mysql-test/t/range.test
+11
-0
sql/opt_range.cc
sql/opt_range.cc
+11
-0
No files found.
mysql-test/r/partition_column.result
View file @
ab2450ef
...
@@ -110,7 +110,7 @@ a
...
@@ -110,7 +110,7 @@ a
NULL
NULL
explain partitions select * from t1 where a is null;
explain partitions select * from t1 where a is null;
id select_type table partitions type possible_keys key key_len ref rows Extra
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL
10
Using where
1 SIMPLE t1 p0 ALL NULL NULL NULL NULL
2
Using where
select * from t1 where a <= 1;
select * from t1 where a <= 1;
a
a
1
1
...
...
mysql-test/r/partition_pruning.result
View file @
ab2450ef
...
@@ -1601,10 +1601,9 @@ INSERT INTO t1 VALUES (1, '2009-01-01'), (2, NULL);
...
@@ -1601,10 +1601,9 @@ INSERT INTO t1 VALUES (1, '2009-01-01'), (2, NULL);
# test with an invalid date, which lead to item->null_value is set.
# test with an invalid date, which lead to item->null_value is set.
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-99' AS DATETIME);
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-99' AS DATETIME);
id select_type table partitions type possible_keys key key_len ref rows Extra
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE
t1 p20090401 ALL NULL NULL NULL NULL 2 Using where
1 SIMPLE
NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Warnings:
Warning 1292 Incorrect datetime value: '2009-04-99'
Warning 1292 Incorrect datetime value: '2009-04-99'
Warning 1292 Incorrect datetime value: '2009-04-99'
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1
CREATE TABLE t1
(a INT NOT NULL AUTO_INCREMENT,
(a INT NOT NULL AUTO_INCREMENT,
...
...
mysql-test/r/range.result
View file @
ab2450ef
...
@@ -1398,3 +1398,12 @@ a < 10;
...
@@ -1398,3 +1398,12 @@ a < 10;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 range a a 5 NULL 8 Using where; Using index
1 SIMPLE t3 range a a 5 NULL 8 Using where; Using index
DROP TABLE t1, t2, t3;
DROP TABLE t1, t2, t3;
#
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
#
CREATE TABLE t1(a INT, KEY(a));
INSERT INTO t1 VALUES (1), (NULL);
SELECT * FROM t1 WHERE a <> NULL and (a <> NULL or a <= NULL);
a
DROP TABLE t1;
End of 5.1 tests
mysql-test/r/subselect.result
View file @
ab2450ef
...
@@ -4403,8 +4403,7 @@ FROM t1
...
@@ -4403,8 +4403,7 @@ FROM t1
WHERE a = 230;
WHERE a = 230;
id select_type table type possible_keys key key_len ref rows Extra
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 DEPENDENT SUBQUERY st1 index NULL a 5 NULL 2 Using index
2 DEPENDENT SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 DEPENDENT SUBQUERY st2 index b b 5 NULL 2 Using where; Using index; Using join buffer
SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
SELECT MAX(b), (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
FROM t1
FROM t1
WHERE a = 230;
WHERE a = 230;
...
...
mysql-test/t/range.test
View file @
ab2450ef
...
@@ -1171,3 +1171,14 @@ a < 5 OR
...
@@ -1171,3 +1171,14 @@ a < 5 OR
a
<
10
;
a
<
10
;
DROP
TABLE
t1
,
t2
,
t3
;
DROP
TABLE
t1
,
t2
,
t3
;
--
echo
#
--
echo
# Bug #47123: Endless 100% CPU loop with STRAIGHT_JOIN
--
echo
#
CREATE
TABLE
t1
(
a
INT
,
KEY
(
a
));
INSERT
INTO
t1
VALUES
(
1
),
(
NULL
);
SELECT
*
FROM
t1
WHERE
a
<>
NULL
and
(
a
<>
NULL
or
a
<=
NULL
);
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
sql/opt_range.cc
View file @
ab2450ef
...
@@ -6067,6 +6067,17 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field,
...
@@ -6067,6 +6067,17 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field,
goto
end
;
goto
end
;
}
}
field
->
table
->
in_use
->
variables
.
sql_mode
=
orig_sql_mode
;
field
->
table
->
in_use
->
variables
.
sql_mode
=
orig_sql_mode
;
/*
Any sargable predicate except "<=>" involving NULL as a constant is always
FALSE
*/
if
(
type
!=
Item_func
::
EQUAL_FUNC
&&
field
->
is_real_null
())
{
tree
=
&
null_element
;
goto
end
;
}
str
=
(
uchar
*
)
alloc_root
(
alloc
,
key_part
->
store_length
+
1
);
str
=
(
uchar
*
)
alloc_root
(
alloc
,
key_part
->
store_length
+
1
);
if
(
!
str
)
if
(
!
str
)
goto
end
;
goto
end
;
...
...
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