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
da562b7e
Commit
da562b7e
authored
Dec 20, 2004
by
ram@gw.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A fix (bug #7281: RAND(RAND) crashes server).
parent
9f5f5953
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
1 deletion
+11
-1
mysql-test/r/func_math.result
mysql-test/r/func_math.result
+2
-0
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+7
-0
sql/item_func.cc
sql/item_func.cc
+2
-1
No files found.
mysql-test/r/func_math.result
View file @
da562b7e
...
@@ -124,3 +124,5 @@ id select_type table type possible_keys key key_len ref rows Extra
...
@@ -124,3 +124,5 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Warnings:
Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)`
Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)`
select rand(rand);
ERROR 42S22: Unknown column 'rand' in 'field list'
mysql-test/t/func_math.test
View file @
da562b7e
...
@@ -51,3 +51,10 @@ SELECT ASIN(1.2-0.2);
...
@@ -51,3 +51,10 @@ SELECT ASIN(1.2-0.2);
#select floor(log(16)/log(2));
#select floor(log(16)/log(2));
explain
extended
select
degrees
(
pi
()),
radians
(
360
);
explain
extended
select
degrees
(
pi
()),
radians
(
360
);
#
# Bug #7281: problem with rand()
#
--
error
1054
select
rand
(
rand
);
sql/item_func.cc
View file @
da562b7e
...
@@ -1091,7 +1091,8 @@ double Item_func_round::val()
...
@@ -1091,7 +1091,8 @@ double Item_func_round::val()
bool
Item_func_rand
::
fix_fields
(
THD
*
thd
,
struct
st_table_list
*
tables
,
bool
Item_func_rand
::
fix_fields
(
THD
*
thd
,
struct
st_table_list
*
tables
,
Item
**
ref
)
Item
**
ref
)
{
{
Item_real_func
::
fix_fields
(
thd
,
tables
,
ref
);
if
(
Item_real_func
::
fix_fields
(
thd
,
tables
,
ref
))
return
TRUE
;
used_tables_cache
|=
RAND_TABLE_BIT
;
used_tables_cache
|=
RAND_TABLE_BIT
;
if
(
arg_count
)
if
(
arg_count
)
{
// Only use argument once in query
{
// Only use argument once in query
...
...
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