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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
fae596aa
Commit
fae596aa
authored
Sep 18, 2006
by
gkodinov@dl145s.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge fixes
parent
522823b5
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
20 additions
and
34 deletions
+20
-34
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+3
-4
mysql-test/r/query_cache.result
mysql-test/r/query_cache.result
+6
-6
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+2
-2
mysql-test/r/view.result
mysql-test/r/view.result
+2
-2
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+1
-1
mysql-test/t/view.test
mysql-test/t/view.test
+2
-2
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+3
-1
sql/opt_range.cc
sql/opt_range.cc
+0
-15
sql/opt_range.h
sql/opt_range.h
+1
-1
No files found.
mysql-test/r/func_time.result
View file @
fae596aa
...
...
@@ -867,12 +867,11 @@ f1
select f1 from t1 where cast("2006-1-1" as date) between date(f1) and date(f3);
f1
2006-01-01
select f1 from t1 where cast("2006-1-1" as date) between f1 and
'zzz'
;
select f1 from t1 where cast("2006-1-1" as date) between f1 and
cast('zzz' as date)
;
f1
Warnings:
Warning 1292 Incorrect date value: 'zzz' for column 'f1' at row 1
Warning 1292 Truncated incorrect DOUBLE value: 'zzz'
Warning 1292 Truncated incorrect DOUBLE value: 'zzz'
Warning 1292 Truncated incorrect datetime value: 'zzz'
Warning 1292 Truncated incorrect datetime value: 'zzz'
select f1 from t1 where makedate(2006,1) between date(f1) and date(f3);
f1
2006-01-01
...
...
mysql-test/r/query_cache.result
View file @
fae596aa
...
...
@@ -947,24 +947,24 @@ COUNT(*)
Warnings:
Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
Warning 1292 Truncated incorrect
DOUBLE
value: '20050327 invalid'
Warning 1292 Truncated incorrect
DOUBLE
value: '20050327 invalid'
Warning 1292 Truncated incorrect
INTEGER
value: '20050327 invalid'
Warning 1292 Truncated incorrect
INTEGER
value: '20050327 invalid'
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid';
COUNT(*)
0
Warnings:
Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1
Warning 1292 Truncated incorrect
DOUBLE
value: '20050328 invalid'
Warning 1292 Truncated incorrect
DOUBLE
value: '20050328 invalid'
Warning 1292 Truncated incorrect
INTEGER
value: '20050328 invalid'
Warning 1292 Truncated incorrect
INTEGER
value: '20050328 invalid'
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
COUNT(*)
0
Warnings:
Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
Warning 1292 Truncated incorrect
DOUBLE
value: '20050327 invalid'
Warning 1292 Truncated incorrect
DOUBLE
value: '20050327 invalid'
Warning 1292 Truncated incorrect
INTEGER
value: '20050327 invalid'
Warning 1292 Truncated incorrect
INTEGER
value: '20050327 invalid'
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
...
...
mysql-test/r/subselect.result
View file @
fae596aa
...
...
@@ -2947,7 +2947,7 @@ ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
2 DEPENDENT SUBQUERY t2 range b b
38
NULL 2 Using where
2 DEPENDENT SUBQUERY t2 range b b
40
NULL 2 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c DESC, t2.b DESC LIMIT 1) WHERE t1.a = 10;
...
...
@@ -2959,7 +2959,7 @@ ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 system PRIMARY NULL NULL NULL 1
1 PRIMARY r const PRIMARY PRIMARY 4 const 1
2 DEPENDENT SUBQUERY t2 range b b
38
NULL 2 Using where
2 DEPENDENT SUBQUERY t2 range b b
40
NULL 2 Using where
SELECT sql_no_cache t1.a, r.a, r.b FROM t1 LEFT JOIN t2 r
ON r.a = (SELECT t2.a FROM t2 WHERE t2.c = t1.a AND t2.b <= '359899'
ORDER BY t2.c, t2.b LIMIT 1) WHERE t1.a = 10;
...
...
mysql-test/r/view.result
View file @
fae596aa
...
...
@@ -2586,13 +2586,13 @@ INSERT INTO t1 VALUES
(4, '2005-01-03'), (5, '2005-01-04'), (6, '2005-01-05'),
(7, '2005-01-05'), (8, '2005-01-05'), (9, '2005-01-06');
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM t1 WHERE td BETWEEN
'2005.01.02' AND '2005.01.04'
;
SELECT * FROM t1 WHERE td BETWEEN
CAST('2005.01.02' AS DATE) AND CAST('2005.01.04' AS DATE)
;
id td
2 2005-01-02
3 2005-01-02
4 2005-01-03
5 2005-01-04
SELECT * FROM v1 WHERE td BETWEEN
'2005.01.02' AND '2005.01.04'
;
SELECT * FROM v1 WHERE td BETWEEN
CAST('2005.01.02' AS DATE) AND CAST('2005.01.04' AS DATE)
;
id td
2 2005-01-02
3 2005-01-02
...
...
mysql-test/t/func_time.test
View file @
fae596aa
...
...
@@ -432,7 +432,7 @@ select f3 from t1 where f3 between cast("2006-1-1 12:1:1" as datetime) and cast(
select
f3
from
t1
where
timestamp
(
f3
)
between
cast
(
"2006-1-1 12:1:1"
as
datetime
)
and
cast
(
"2006-1-1 12:1:2"
as
datetime
);
select
f1
from
t1
where
cast
(
"2006-1-1"
as
date
)
between
f1
and
f3
;
select
f1
from
t1
where
cast
(
"2006-1-1"
as
date
)
between
date
(
f1
)
and
date
(
f3
);
select
f1
from
t1
where
cast
(
"2006-1-1"
as
date
)
between
f1
and
'zzz'
;
select
f1
from
t1
where
cast
(
"2006-1-1"
as
date
)
between
f1
and
cast
(
'zzz'
as
date
)
;
select
f1
from
t1
where
makedate
(
2006
,
1
)
between
date
(
f1
)
and
date
(
f3
);
select
f1
from
t1
where
makedate
(
2006
,
2
)
between
date
(
f1
)
and
date
(
f3
);
drop
table
t1
;
...
...
mysql-test/t/view.test
View file @
fae596aa
...
...
@@ -2449,8 +2449,8 @@ INSERT INTO t1 VALUES
CREATE
VIEW
v1
AS
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
WHERE
td
BETWEEN
'2005.01.02'
AND
'2005.01.04'
;
SELECT
*
FROM
v1
WHERE
td
BETWEEN
'2005.01.02'
AND
'2005.01.04'
;
SELECT
*
FROM
t1
WHERE
td
BETWEEN
CAST
(
'2005.01.02'
AS
DATE
)
AND
CAST
(
'2005.01.04'
AS
DATE
)
;
SELECT
*
FROM
v1
WHERE
td
BETWEEN
CAST
(
'2005.01.02'
AS
DATE
)
AND
CAST
(
'2005.01.04'
AS
DATE
)
;
DROP
VIEW
v1
;
DROP
TABLE
t1
;
...
...
sql/item_cmpfunc.cc
View file @
fae596aa
...
...
@@ -1112,7 +1112,9 @@ void Item_func_between::fix_length_and_dec()
They are compared as integers, so for const item this time-consuming
conversion can be done only once, not for every single comparison
*/
if
(
args
[
0
]
->
type
()
==
FIELD_ITEM
)
if
(
args
[
0
]
->
type
()
==
FIELD_ITEM
&&
thd
->
lex
->
sql_command
!=
SQLCOM_CREATE_VIEW
&&
thd
->
lex
->
sql_command
!=
SQLCOM_SHOW_CREATE
)
{
Field
*
field
=
((
Item_field
*
)
args
[
0
])
->
field
;
if
(
field
->
can_be_compared_as_longlong
())
...
...
sql/opt_range.cc
View file @
fae596aa
...
...
@@ -6724,15 +6724,6 @@ int QUICK_RANGE_SELECT::get_next()
}
}
void
QUICK_SELECT
::
reset
(
void
)
{
next
=
0
;
it
.
rewind
();
range
=
0
;
if
(
file
->
inited
==
handler
::
NONE
)
file
->
ha_index_init
(
index
);
}
/*
Get the next record with a different prefix.
...
...
@@ -9386,12 +9377,6 @@ static void print_ror_scans_arr(TABLE *table, const char *msg,
DBUG_VOID_RETURN
;
}
void
QUICK_SELECT_DESC
::
reset
(
void
)
{
rev_it
.
rewind
();
QUICK_SELECT
::
reset
();
}
/*****************************************************************************
** Print a quick range for debugging
** TODO:
...
...
sql/opt_range.h
View file @
fae596aa
...
...
@@ -668,7 +668,7 @@ private:
#ifdef NOT_USED
bool
test_if_null_range
(
QUICK_RANGE
*
range
,
uint
used_key_parts
);
#endif
void
reset
(
void
);
int
reset
(
void
)
{
rev_it
.
rewind
();
return
QUICK_RANGE_SELECT
::
reset
();
}
List
<
QUICK_RANGE
>
rev_ranges
;
List_iterator
<
QUICK_RANGE
>
rev_it
;
};
...
...
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