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
85fb265c
Commit
85fb265c
authored
Mar 27, 2003
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing a bug #195
Fixing UNION's popping up in slow query log
parent
5754decd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
3 deletions
+12
-3
mysql-test/r/cast.result
mysql-test/r/cast.result
+3
-0
mysql-test/t/cast.test
mysql-test/t/cast.test
+1
-0
sql/item_timefunc.h
sql/item_timefunc.h
+2
-1
sql/sql_union.cc
sql/sql_union.cc
+6
-2
No files found.
mysql-test/r/cast.result
View file @
85fb265c
...
...
@@ -37,3 +37,6 @@ cast("2001-1-1" as datetime) = "2001-01-01 00:00:00"
select cast("1:2:3" as TIME) = "1:02:03";
cast("1:2:3" as TIME) = "1:02:03"
0
select cast(NULL as DATE);
cast(NULL as DATE)
NULL
mysql-test/t/cast.test
View file @
85fb265c
...
...
@@ -20,3 +20,4 @@ select cast("1:2:3" as TIME);
select
cast
(
"2001-1-1"
as
date
)
=
"2001-01-01"
;
select
cast
(
"2001-1-1"
as
datetime
)
=
"2001-01-01 00:00:00"
;
select
cast
(
"1:2:3"
as
TIME
)
=
"1:02:03"
;
select
cast
(
NULL
as
DATE
);
sql/item_timefunc.h
View file @
85fb265c
...
...
@@ -527,6 +527,7 @@ public:
{
String
*
tmp
=
args
[
0
]
->
val_str
(
a
);
null_value
=
args
[
0
]
->
null_value
;
if
(
tmp
)
tmp
->
set_charset
(
charset
());
return
tmp
;
}
...
...
sql/sql_union.cc
View file @
85fb265c
...
...
@@ -248,6 +248,7 @@ int st_select_lex_unit::exec()
SELECT_LEX_NODE
*
lex_select_save
=
thd
->
lex
.
current_select
;
SELECT_LEX
*
select_cursor
=
first_select_in_union
(),
*
last_select
;
LINT_INIT
(
last_select
);
bool
do_print_slow
=
0
;
if
(
executed
&&
!
(
dependent
||
uncacheable
))
DBUG_RETURN
(
0
);
...
...
@@ -313,6 +314,7 @@ int st_select_lex_unit::exec()
thd
->
lex
.
current_select
=
lex_select_save
;
DBUG_RETURN
(
res
);
}
do_print_slow
=
do_print_slow
||
(
select_cursor
->
options
&
(
QUERY_NO_INDEX_USED
|
QUERY_NO_GOOD_INDEX_USED
));
}
}
optimized
=
1
;
...
...
@@ -325,7 +327,6 @@ int st_select_lex_unit::exec()
{
List
<
Item_func_match
>
empty_list
;
empty_list
.
empty
();
thd
->
lex
.
select_lex
.
ftfunc_list
=
&
empty_list
;
if
(
!
thd
->
is_fatal_error
)
// Check if EOM
{
...
...
@@ -338,6 +339,8 @@ int st_select_lex_unit::exec()
select_limit_cnt
=
HA_POS_ERROR
;
// no limit
if
(
select_limit_cnt
==
HA_POS_ERROR
)
thd
->
options
&=
~
OPTION_FOUND_ROWS
;
fake_select
->
ftfunc_list
=
&
empty_list
;
res
=
mysql_select
(
thd
,
&
ref_pointer_array
,
&
result_table_list
,
0
,
item_list
,
NULL
,
global_parameters
->
order_list
.
elements
,
...
...
@@ -348,9 +351,10 @@ int st_select_lex_unit::exec()
thd
->
limit_found_rows
=
(
ulonglong
)
table
->
file
->
records
;
fake_select
->
exclude
();
delete
fake_select
;
if
(
select_cursor
==
&
thd
->
lex
.
select_lex
&&
!
do_print_slow
)
select_cursor
->
options
&=
~
(
QUERY_NO_INDEX_USED
|
QUERY_NO_GOOD_INDEX_USED
);
}
}
thd
->
lex
.
select_lex
.
ftfunc_list
=
&
thd
->
lex
.
select_lex
.
ftfunc_list_alloc
;
thd
->
lex
.
current_select
=
lex_select_save
;
DBUG_RETURN
(
res
);
}
...
...
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