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
f07bec65
Commit
f07bec65
authored
Sep 28, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge ssmith@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/stewart/Documents/MySQL/4.1/main
parents
b97acc5d
0559f1e0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
2 deletions
+50
-2
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+2
-2
mysql-test/r/select.result
mysql-test/r/select.result
+9
-0
mysql-test/t/select.test
mysql-test/t/select.test
+10
-0
sql/item.cc
sql/item.cc
+29
-0
No files found.
libmysqld/lib_sql.cc
View file @
f07bec65
...
...
@@ -427,9 +427,9 @@ int init_embedded_server(int argc, char **argv, char **groups)
acl_error
=
0
;
#ifndef NO_EMBEDDED_ACCESS_CHECKS
if
(
!
(
acl_error
=
acl_init
(
(
THD
*
)
0
,
opt_noacl
))
&&
if
(
!
(
acl_error
=
acl_init
(
opt_noacl
))
&&
!
opt_noacl
)
(
void
)
grant_init
(
(
THD
*
)
0
);
(
void
)
grant_init
();
#endif
if
(
acl_error
||
my_tz_init
((
THD
*
)
0
,
default_tz_name
,
opt_bootstrap
))
{
...
...
mysql-test/r/select.result
View file @
f07bec65
...
...
@@ -2617,3 +2617,12 @@ select found_rows();
found_rows()
1
DROP TABLE t1;
create table t1(f1 int, f2 int);
create table t2(f3 int);
select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,1));
f1
select f1 from t1,t2 where f1=f2 and (f1,NULL) = ((1,1));
f1
select f1 from t1,t2 where f1=f2 and (f1,f2) = ((1,NULL));
f1
drop table t1,t2;
mysql-test/t/select.test
View file @
f07bec65
...
...
@@ -2164,4 +2164,14 @@ select found_rows();
DROP
TABLE
t1
;
#
# Bug #13356 assertion failed in resolve_const_item()
#
create
table
t1
(
f1
int
,
f2
int
);
create
table
t2
(
f3
int
);
select
f1
from
t1
,
t2
where
f1
=
f2
and
(
f1
,
f2
)
=
((
1
,
1
));
select
f1
from
t1
,
t2
where
f1
=
f2
and
(
f1
,
NULL
)
=
((
1
,
1
));
select
f1
from
t1
,
t2
where
f1
=
f2
and
(
f1
,
f2
)
=
((
1
,
NULL
));
drop
table
t1
,
t2
;
# End of 4.1 tests
sql/item.cc
View file @
f07bec65
...
...
@@ -2870,6 +2870,35 @@ void resolve_const_item(THD *thd, Item **ref, Item *comp_item)
new_item
=
(
null_value
?
(
Item
*
)
new
Item_null
(
name
)
:
(
Item
*
)
new
Item_int
(
name
,
result
,
length
));
}
else
if
(
res_type
==
ROW_RESULT
)
{
new_item
=
0
;
/*
If item and comp_item are both Item_rows and have same number of cols
then process items in Item_row one by one. If Item_row contain nulls
substitute it by Item_null. Otherwise just return.
*/
if
(
item
->
result_type
()
==
comp_item
->
result_type
()
&&
((
Item_row
*
)
item
)
->
cols
()
==
((
Item_row
*
)
comp_item
)
->
cols
())
{
Item_row
*
item_row
=
(
Item_row
*
)
item
,
*
comp_item_row
=
(
Item_row
*
)
comp_item
;
if
(
item_row
->
null_inside
())
new_item
=
(
Item
*
)
new
Item_null
(
name
);
else
{
int
i
=
item_row
->
cols
()
-
1
;
for
(;
i
>=
0
;
i
--
)
{
if
(
item_row
->
maybe_null
&&
item_row
->
el
(
i
)
->
is_null
())
{
new_item
=
(
Item
*
)
new
Item_null
(
name
);
break
;
}
resolve_const_item
(
thd
,
item_row
->
addr
(
i
),
comp_item_row
->
el
(
i
));
}
}
}
}
else
{
// It must REAL_RESULT
double
result
=
item
->
val
();
...
...
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