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
65b9f4a3
Commit
65b9f4a3
authored
Mar 28, 2003
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Plain Diff
Merge sinisa@bk-internal.mysql.com:/home/bk/mysql-4.1
into sinisa.nasamreza.org:/mnt/work/mysql-4.1
parents
05982c85
165b3960
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
6 deletions
+32
-6
mysql-test/r/cast.result
mysql-test/r/cast.result
+6
-0
mysql-test/r/variables.result
mysql-test/r/variables.result
+1
-0
mysql-test/t/cast.test
mysql-test/t/cast.test
+2
-0
mysql-test/t/variables.test
mysql-test/t/variables.test
+1
-0
sql/item.cc
sql/item.cc
+10
-1
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+2
-1
sql/item_strfunc.h
sql/item_strfunc.h
+2
-1
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 @
65b9f4a3
...
@@ -37,3 +37,9 @@ cast("2001-1-1" as datetime) = "2001-01-01 00:00:00"
...
@@ -37,3 +37,9 @@ cast("2001-1-1" as datetime) = "2001-01-01 00:00:00"
select cast("1:2:3" as TIME) = "1:02:03";
select cast("1:2:3" as TIME) = "1:02:03";
cast("1:2:3" as TIME) = "1:02:03"
cast("1:2:3" as TIME) = "1:02:03"
0
0
select cast(NULL as DATE);
cast(NULL as DATE)
NULL
select cast(NULL as BINARY);
cast(NULL as BINARY)
NULL
mysql-test/r/variables.result
View file @
65b9f4a3
...
@@ -333,4 +333,5 @@ check table t1,t2;
...
@@ -333,4 +333,5 @@ check table t1,t2;
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
test.t2 check status OK
test.t2 check status OK
select max(a) +1, max(a) +2 into @xx,@yy from t1;
drop table t1,t2;
drop table t1,t2;
mysql-test/t/cast.test
View file @
65b9f4a3
...
@@ -20,3 +20,5 @@ select cast("1:2:3" as TIME);
...
@@ -20,3 +20,5 @@ select cast("1:2:3" as TIME);
select
cast
(
"2001-1-1"
as
date
)
=
"2001-01-01"
;
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
(
"2001-1-1"
as
datetime
)
=
"2001-01-01 00:00:00"
;
select
cast
(
"1:2:3"
as
TIME
)
=
"1:02:03"
;
select
cast
(
"1:2:3"
as
TIME
)
=
"1:02:03"
;
select
cast
(
NULL
as
DATE
);
select
cast
(
NULL
as
BINARY
);
mysql-test/t/variables.test
View file @
65b9f4a3
...
@@ -241,5 +241,6 @@ select @@key_buffer_size;
...
@@ -241,5 +241,6 @@ select @@key_buffer_size;
select
*
from
t1
where
a
=
2
;
select
*
from
t1
where
a
=
2
;
select
*
from
t2
where
a
=
3
;
select
*
from
t2
where
a
=
3
;
check
table
t1
,
t2
;
check
table
t1
,
t2
;
select
max
(
a
)
+
1
,
max
(
a
)
+
2
into
@
xx
,
@
yy
from
t1
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
sql/item.cc
View file @
65b9f4a3
...
@@ -1252,7 +1252,16 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference)
...
@@ -1252,7 +1252,16 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference)
}
}
}
}
if
(((
*
ref
)
->
with_sum_func
&&
/*
* The following conditional is changed as to correctly identify
* incorrect references in group functions or forward references
* with sub-select's / derived tables, while it prevents this
* check when Item_ref is created in an expression involving
* summing function, which is to be placed in the user variable.
*
*/
if
(((
*
ref
)
->
with_sum_func
&&
name
&&
(
depended_from
||
(
depended_from
||
!
(
thd
->
lex
.
current_select
->
linkage
!=
GLOBAL_OPTIONS_TYPE
&&
!
(
thd
->
lex
.
current_select
->
linkage
!=
GLOBAL_OPTIONS_TYPE
&&
thd
->
lex
.
current_select
->
select_lex
()
->
having_fix_field
)))
||
thd
->
lex
.
current_select
->
select_lex
()
->
having_fix_field
)))
||
...
...
sql/item_cmpfunc.cc
View file @
65b9f4a3
...
@@ -769,6 +769,7 @@ Item_func_if::val_str(String *str)
...
@@ -769,6 +769,7 @@ Item_func_if::val_str(String *str)
{
{
Item
*
arg
=
args
[
0
]
->
val_int
()
?
args
[
1
]
:
args
[
2
];
Item
*
arg
=
args
[
0
]
->
val_int
()
?
args
[
1
]
:
args
[
2
];
String
*
res
=
arg
->
val_str
(
str
);
String
*
res
=
arg
->
val_str
(
str
);
if
(
res
)
res
->
set_charset
(
charset
());
res
->
set_charset
(
charset
());
null_value
=
arg
->
null_value
;
null_value
=
arg
->
null_value
;
return
res
;
return
res
;
...
...
sql/item_strfunc.h
View file @
65b9f4a3
...
@@ -512,6 +512,7 @@ class Item_func_binary :public Item_str_func
...
@@ -512,6 +512,7 @@ class Item_func_binary :public Item_str_func
{
{
String
*
tmp
=
args
[
0
]
->
val_str
(
a
);
String
*
tmp
=
args
[
0
]
->
val_str
(
a
);
null_value
=
args
[
0
]
->
null_value
;
null_value
=
args
[
0
]
->
null_value
;
if
(
tmp
)
tmp
->
set_charset
(
&
my_charset_bin
);
tmp
->
set_charset
(
&
my_charset_bin
);
return
tmp
;
return
tmp
;
}
}
...
...
sql/item_timefunc.h
View file @
65b9f4a3
...
@@ -527,6 +527,7 @@ class Item_typecast :public Item_str_func
...
@@ -527,6 +527,7 @@ class Item_typecast :public Item_str_func
{
{
String
*
tmp
=
args
[
0
]
->
val_str
(
a
);
String
*
tmp
=
args
[
0
]
->
val_str
(
a
);
null_value
=
args
[
0
]
->
null_value
;
null_value
=
args
[
0
]
->
null_value
;
if
(
tmp
)
tmp
->
set_charset
(
charset
());
tmp
->
set_charset
(
charset
());
return
tmp
;
return
tmp
;
}
}
...
...
sql/sql_union.cc
View file @
65b9f4a3
...
@@ -248,6 +248,7 @@ int st_select_lex_unit::exec()
...
@@ -248,6 +248,7 @@ int st_select_lex_unit::exec()
SELECT_LEX_NODE
*
lex_select_save
=
thd
->
lex
.
current_select
;
SELECT_LEX_NODE
*
lex_select_save
=
thd
->
lex
.
current_select
;
SELECT_LEX
*
select_cursor
=
first_select_in_union
(),
*
last_select
;
SELECT_LEX
*
select_cursor
=
first_select_in_union
(),
*
last_select
;
LINT_INIT
(
last_select
);
LINT_INIT
(
last_select
);
bool
do_print_slow
=
0
;
if
(
executed
&&
!
(
dependent
||
uncacheable
))
if
(
executed
&&
!
(
dependent
||
uncacheable
))
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
...
@@ -313,6 +314,7 @@ int st_select_lex_unit::exec()
...
@@ -313,6 +314,7 @@ int st_select_lex_unit::exec()
thd
->
lex
.
current_select
=
lex_select_save
;
thd
->
lex
.
current_select
=
lex_select_save
;
DBUG_RETURN
(
res
);
DBUG_RETURN
(
res
);
}
}
do_print_slow
=
do_print_slow
||
(
select_cursor
->
options
&
(
QUERY_NO_INDEX_USED
|
QUERY_NO_GOOD_INDEX_USED
));
}
}
}
}
optimized
=
1
;
optimized
=
1
;
...
@@ -325,7 +327,6 @@ int st_select_lex_unit::exec()
...
@@ -325,7 +327,6 @@ int st_select_lex_unit::exec()
{
{
List
<
Item_func_match
>
empty_list
;
List
<
Item_func_match
>
empty_list
;
empty_list
.
empty
();
empty_list
.
empty
();
thd
->
lex
.
select_lex
.
ftfunc_list
=
&
empty_list
;
if
(
!
thd
->
is_fatal_error
)
// Check if EOM
if
(
!
thd
->
is_fatal_error
)
// Check if EOM
{
{
...
@@ -338,6 +339,8 @@ int st_select_lex_unit::exec()
...
@@ -338,6 +339,8 @@ int st_select_lex_unit::exec()
select_limit_cnt
=
HA_POS_ERROR
;
// no limit
select_limit_cnt
=
HA_POS_ERROR
;
// no limit
if
(
select_limit_cnt
==
HA_POS_ERROR
)
if
(
select_limit_cnt
==
HA_POS_ERROR
)
thd
->
options
&=
~
OPTION_FOUND_ROWS
;
thd
->
options
&=
~
OPTION_FOUND_ROWS
;
fake_select
->
ftfunc_list
=
&
empty_list
;
res
=
mysql_select
(
thd
,
&
ref_pointer_array
,
&
result_table_list
,
res
=
mysql_select
(
thd
,
&
ref_pointer_array
,
&
result_table_list
,
0
,
item_list
,
NULL
,
0
,
item_list
,
NULL
,
global_parameters
->
order_list
.
elements
,
global_parameters
->
order_list
.
elements
,
...
@@ -348,9 +351,10 @@ int st_select_lex_unit::exec()
...
@@ -348,9 +351,10 @@ int st_select_lex_unit::exec()
thd
->
limit_found_rows
=
(
ulonglong
)
table
->
file
->
records
;
thd
->
limit_found_rows
=
(
ulonglong
)
table
->
file
->
records
;
fake_select
->
exclude
();
fake_select
->
exclude
();
delete
fake_select
;
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
;
thd
->
lex
.
current_select
=
lex_select_save
;
DBUG_RETURN
(
res
);
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