Loading mysql-test/r/func_math.result +2 −0 Original line number Diff line number Diff line Loading @@ -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 Warnings: 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 +7 −0 Original line number Diff line number Diff line Loading @@ -51,3 +51,10 @@ SELECT ASIN(1.2-0.2); #select floor(log(16)/log(2)); explain extended select degrees(pi()),radians(360); # # Bug #7281: problem with rand() # --error 1054 select rand(rand); sql/item_func.cc +2 −1 Original line number Diff line number Diff line Loading @@ -1091,7 +1091,8 @@ double Item_func_round::val() bool Item_func_rand::fix_fields(THD *thd, struct st_table_list *tables, 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; if (arg_count) { // Only use argument once in query Loading Loading
mysql-test/r/func_math.result +2 −0 Original line number Diff line number Diff line Loading @@ -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 Warnings: 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 +7 −0 Original line number Diff line number Diff line Loading @@ -51,3 +51,10 @@ SELECT ASIN(1.2-0.2); #select floor(log(16)/log(2)); explain extended select degrees(pi()),radians(360); # # Bug #7281: problem with rand() # --error 1054 select rand(rand);
sql/item_func.cc +2 −1 Original line number Diff line number Diff line Loading @@ -1091,7 +1091,8 @@ double Item_func_round::val() bool Item_func_rand::fix_fields(THD *thd, struct st_table_list *tables, 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; if (arg_count) { // Only use argument once in query Loading