From 6b8802e8dd5467556a024d807a1df23940b00895 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Tue, 8 May 2018 15:26:26 +0200 Subject: 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) --- sql/item_windowfunc.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sql/item_windowfunc.h') 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 &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"; } -- cgit v1.2.1