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
579a94a3
Commit
579a94a3
authored
Mar 16, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after review & some other fixes
parent
446b1bd2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
4 deletions
+10
-4
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+0
-1
sql/item_func.cc
sql/item_func.cc
+6
-1
sql/item_func.h
sql/item_func.h
+1
-0
sql/sql_select.cc
sql/sql_select.cc
+3
-2
No files found.
mysql-test/r/subselect.result
View file @
579a94a3
...
...
@@ -1637,4 +1637,3 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
2 UNCACHEABLE SUBQUERY t1 system NULL NULL NULL NULL 1
drop table t1;
sql/item_func.cc
View file @
579a94a3
...
...
@@ -959,7 +959,6 @@ double Item_func_round::val()
return
tmp2
;
}
void
Item_func_rand
::
fix_length_and_dec
()
{
decimals
=
NOT_FIXED_DEC
;
...
...
@@ -990,6 +989,12 @@ void Item_func_rand::fix_length_and_dec()
}
}
void
Item_func_rand
::
update_used_tables
()
{
Item_real_func
::
update_used_tables
();
used_tables_cache
|=
RAND_TABLE_BIT
;
}
double
Item_func_rand
::
val
()
{
...
...
sql/item_func.h
View file @
579a94a3
...
...
@@ -512,6 +512,7 @@ class Item_func_rand :public Item_real_func
double
val
();
const
char
*
func_name
()
const
{
return
"rand"
;
}
bool
const_item
()
const
{
return
0
;
}
void
update_used_tables
();
void
fix_length_and_dec
();
};
...
...
sql/sql_select.cc
View file @
579a94a3
...
...
@@ -585,8 +585,9 @@ JOIN::optimize()
}
if
(
const_table_map
!=
found_const_table_map
&&
!
(
select_options
&
SELECT_DESCRIBE
)
&&
!
((
conds
->
used_tables
()
&
RAND_TABLE_BIT
)
&&
select_lex
->
master_unit
()
!=
&
thd
->
lex
->
unit
))
// not upper level SELECT
(
!
conds
||
!
(
conds
->
used_tables
()
&
RAND_TABLE_BIT
)
||
select_lex
->
master_unit
()
==
&
thd
->
lex
->
unit
))
// upper level SELECT
{
zero_result_cause
=
"no matching row in const table"
;
DBUG_PRINT
(
"error"
,(
"Error: %s"
,
zero_result_cause
));
...
...
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