diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2018-05-08 15:26:26 +0200 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2018-06-15 10:31:30 +0200 |
commit | 6b8802e8dd5467556a024d807a1df23940b00895 (patch) | |
tree | fe1a1b87c500abc375aa77a7bcfed085b5f6551c /sql/item_windowfunc.h | |
parent | c55de8d40bba29503773a6a56d6f13f19ca7e339 (diff) | |
download | mariadb-git-6b8802e8dd5467556a024d807a1df23940b00895.tar.gz |
MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed in Locked_tables_list::unlock_locked_table
fix_length_and_dec now return result (error/OK)
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r-- | sql/item_windowfunc.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index a1ef6854288..e5afb9e1555 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -516,10 +516,11 @@ class Item_sum_percent_rank: public Item_sum_window_with_row_count enum Item_result result_type () const { return REAL_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; } - void fix_length_and_dec() + bool fix_length_and_dec() { decimals = 10; // TODO-cvicentiu find out how many decimals the standard // requires. + return FALSE; } void setup_window_func(THD *thd, Window_spec *window_spec); @@ -602,10 +603,11 @@ class Item_sum_cume_dist: public Item_sum_window_with_row_count enum Item_result result_type () const { return REAL_RESULT; } enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; } - void fix_length_and_dec() + bool fix_length_and_dec() { decimals = 10; // TODO-cvicentiu find out how many decimals the standard // requires. + return FALSE; } Item *get_copy(THD *thd, MEM_ROOT *mem_root) @@ -950,9 +952,10 @@ public: void split_sum_func(THD *thd, Ref_ptr_array ref_pointer_array, List<Item> &fields, uint flags); - void fix_length_and_dec() + bool fix_length_and_dec() { decimals = window_func()->decimals; + return FALSE; } const char* func_name() const { return "WF"; } |