From 709a0a131021135e9fb7a2095fcfcbc223dfb126 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Wed, 26 May 2010 13:18:18 -0700 Subject: MWL#106: Backport optimizations for derived tables and views. The main consolidated patch. --- sql/sql_lex.h | 53 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 7 deletions(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 7cceb7dba16..975914ed183 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -469,6 +469,11 @@ public: friend bool mysql_new_select(struct st_lex *lex, bool move_down); friend bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, uint flags); + friend bool mysql_derived_prepare(THD *thd, st_lex *lex, + TABLE_LIST *orig_table_list); + friend bool mysql_derived_merge(THD *thd, st_lex *lex, + TABLE_LIST *orig_table_list); + friend bool TABLE_LIST::init_derived(THD *thd, bool init_view); private: void fast_exclude(); }; @@ -487,13 +492,12 @@ class st_select_lex_unit: public st_select_lex_node { protected: TABLE_LIST result_table_list; select_union *union_result; - TABLE *table; /* temporary table using for appending UNION results */ - - select_result *result; ulonglong found_rows_for_union; bool saved_error; public: + TABLE *table; /* temporary table using for appending UNION results */ + select_result *result; bool prepared, // prepare phase already performed for UNION (unit) optimized, // optimize phase already performed for UNION (unit) executed, // already executed @@ -520,6 +524,11 @@ public: ha_rows select_limit_cnt, offset_limit_cnt; /* not NULL if unit used in subselect, point to subselect item */ Item_subselect *item; + /* + TABLE_LIST representing this union in the embedding select. Used for + derived tables/views handling. + */ + TABLE_LIST *derived; /* thread handler */ THD *thd; /* @@ -549,6 +558,7 @@ public: /* UNION methods */ bool prepare(THD *thd, select_result *result, ulong additional_options); + bool optimize(); bool exec(); bool cleanup(); inline void unclean() { cleaned= 0; } @@ -610,8 +620,15 @@ public: Beginning of the list of leaves in a FROM clause, where the leaves inlcude all base tables including view tables. The tables are connected by TABLE_LIST::next_leaf, so leaf_tables points to the left-most leaf. + + List of all base tables local to a subquery including all view + tables. Unlike 'next_local', this in this list views are *not* + leaves. Created in setup_tables() -> make_leaves_list(). */ - TABLE_LIST *leaf_tables; + List leaf_tables; + List leaf_tables_exec; + uint insert_tables; + const char *type; /* type of select for EXPLAIN */ SQL_LIST order_list; /* ORDER clause */ @@ -832,6 +849,28 @@ public: void clear_index_hints(void) { index_hints= NULL; } bool is_part_of_union() { return master_unit()->is_union(); } + bool handle_derived(struct st_lex *lex, uint phases); + void append_table_to_list(TABLE_LIST *TABLE_LIST::*link, TABLE_LIST *table); + bool get_free_table_map(table_map *map, uint *tablenr); + void remove_table_from_list(TABLE_LIST *table); + void remap_tables(TABLE_LIST *derived, table_map map, + uint tablenr, st_select_lex *parent_lex); + bool merge_subquery(TABLE_LIST *derived, st_select_lex *subq_lex, + uint tablenr, table_map map); + inline bool is_mergeable() + { + return (next_select() == 0 && group_list.elements == 0 && + having == 0 && with_sum_func == 0 && + table_list.elements >= 1 && !(options & SELECT_DISTINCT) && + select_limit == 0); + } + void mark_as_belong_to_derived(TABLE_LIST *derived); + void increase_derived_records(uint records); + void update_used_tables(); + void mark_const_derived(bool empty); + + bool save_leaf_tables(THD *thd); + private: /* current index hint kind. used in filling up index_hints */ enum index_hint_type current_index_hint_type; @@ -1556,8 +1595,6 @@ typedef struct st_lex : public Query_tables_list CHARSET_INFO *charset; bool text_string_is_7bit; - /* store original leaf_tables for INSERT SELECT and PS/SP */ - TABLE_LIST *leaf_tables_insert; /** SELECT of CREATE VIEW statement */ LEX_STRING create_view_select; @@ -1673,7 +1710,7 @@ typedef struct st_lex : public Query_tables_list DERIVED_SUBQUERY and DERIVED_VIEW). */ uint8 derived_tables; - uint8 create_view_algorithm; + uint16 create_view_algorithm; uint8 create_view_check; bool drop_if_exists, drop_temporary, local_file, one_shot_set; bool autocommit; @@ -1836,6 +1873,8 @@ typedef struct st_lex : public Query_tables_list switch (sql_command) { case SQLCOM_UPDATE: case SQLCOM_UPDATE_MULTI: + case SQLCOM_DELETE: + case SQLCOM_DELETE_MULTI: case SQLCOM_INSERT: case SQLCOM_INSERT_SELECT: case SQLCOM_REPLACE: -- cgit v1.2.1 From 18ad3bdc2fa3bbe1bfd7e433adb0bc6b3dbce8c8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 5 Sep 2010 18:43:47 +0300 Subject: MWL#89: Cost-based choice between Materialization and IN->EXISTS transformation Fixes for multiple problems/bugs/test failures that resulted from moving subquery optimization from the execution phase to the optimization phase. --- sql/sql_lex.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 335aa7f4ed4..d106bfd55fd 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -439,6 +439,7 @@ public: st_select_lex_node(): linkage(UNSPECIFIED_TYPE) {} virtual ~st_select_lex_node() {} inline st_select_lex_node* get_master() { return master; } + inline void set_master(st_select_lex_node* master_arg) { master= master_arg; } virtual void init_query(); virtual void init_select(); void include_down(st_select_lex_node *upper); @@ -446,6 +447,7 @@ public: void include_standalone(st_select_lex_node *sel, st_select_lex_node **ref); void include_global(st_select_lex_node **plink); void exclude(); + void exclude_from_tree(); virtual st_select_lex_unit* master_unit()= 0; virtual st_select_lex* outer_select()= 0; @@ -839,6 +841,12 @@ public: void clear_index_hints(void) { index_hints= NULL; } bool is_part_of_union() { return master_unit()->is_union(); } + /* + Optimize all subqueries that have not been flattened into semi-joins. + This functionality is a method of SELECT_LEX instead of JOIN because + some SQL statements as DELETE do not have a corresponding JOIN object. + */ + bool optimize_unflattened_subqueries(); private: /* current index hint kind. used in filling up index_hints */ enum index_hint_type current_index_hint_type; -- cgit v1.2.1 From 77c03bcf45aef44971a454a1f1a622fc8779089f Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 4 Oct 2010 17:30:46 +0300 Subject: MWL#89: Cost-based choice between Materialization and IN->EXISTS transformation Improved handling of EXPLAIN statements for subqueries. This patch specifically solves the problem when EXPLAIN reports: "const row not found" instead of "no matching row in const table". --- sql/sql_lex.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index d106bfd55fd..7c49d0a407e 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -847,6 +847,9 @@ public: some SQL statements as DELETE do not have a corresponding JOIN object. */ bool optimize_unflattened_subqueries(); + /* Set the EXPLAIN type for this subquery. */ + void set_explain_type(); + private: /* current index hint kind. used in filling up index_hints */ enum index_hint_type current_index_hint_type; -- cgit v1.2.1 From ca37339585cd73363cb0d11cea73561cf78ee79f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Feb 2011 16:16:06 +0200 Subject: MWL#89 Fixed a memory leak found by valgrind. The memory leak was a result of JOINs corresponding to subselects in a global ORDER BY of a UNION not being cleaned up because the fake_select of the UNION didn't point down to the subquery select. --- sql/sql_lex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 525d7c5cf46..eb5a7acbbd2 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -439,10 +439,10 @@ public: st_select_lex_node(): linkage(UNSPECIFIED_TYPE) {} virtual ~st_select_lex_node() {} inline st_select_lex_node* get_master() { return master; } - inline void set_master(st_select_lex_node* master_arg) { master= master_arg; } virtual void init_query(); virtual void init_select(); void include_down(st_select_lex_node *upper); + void add_slave(st_select_lex_node *slave_arg); void include_neighbour(st_select_lex_node *before); void include_standalone(st_select_lex_node *sel, st_select_lex_node **ref); void include_global(st_select_lex_node **plink); -- cgit v1.2.1 From 2721e912ba45f42f3ddf7c8366f6abbeef060833 Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Thu, 28 Apr 2011 19:56:10 +0300 Subject: Added ALTER ONLINE TABLE, which will give an error if the change can't be done 'instantly' (without a table copy) mysql-test/r/alter_table_online.result: Test new feature mysql-test/t/alter_table_online.test: Test new feature sql/handler.cc: Added comment sql/lex.h: Added ONLINE keyword sql/mysql_priv.h: Added option to alter table to require online operation sql/share/errmsg.txt: Added error message if ONLINE can't be done sql/sql_lex.h: Added online option sql/sql_parse.cc: Added online option to mysql_alter_table() sql/sql_table.cc: Added test that gives error if table can't be done instantly when requsted to be online. Fixed wrong test if table includes a VARCHAR Fixed wrong (but unlikely) handling of error conditions in ALTER table sql/sql_yacc.yy: Added ALTER ONLINE TABLE syntax storage/maria/ha_maria.cc: Fixed bug where 'start_bulk_insert' used too small buffer if used with unknown number of rows --- sql/sql_lex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 06e99cd60b6..b3dccb4b9bd 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1745,7 +1745,7 @@ typedef struct st_lex : public Query_tables_list uint8 context_analysis_only; bool safe_to_cache_query; - bool subqueries, ignore; + bool subqueries, ignore, online; st_parsing_options parsing_options; Alter_info alter_info; /* Prepared statements SQL syntax:*/ -- cgit v1.2.1 From 7b797fe66d7167a8f5cbb071a06a640a627f2186 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 4 May 2011 18:08:58 +0300 Subject: Moving max/min optimization from prepare to optimization phase. MWL#148 mysql-test/r/explain.result: fixed results (new item) mysql-test/r/subselect.result: fixed results (new item) mysql-test/r/subselect_no_mat.result: fixed results (new item) mysql-test/r/subselect_no_opts.result: fixed results (new item) mysql-test/r/subselect_no_semijoin.result: Fixed results (new item) mysql-test/suite/pbxt/r/subselect.result: Fixed results (new item) mysql-test/t/explain.test: Fixed results (correct behaviour) sql/item_cmpfunc.cc: Pass through for max/min sql/item_subselect.cc: moving max/min sql/item_subselect.h: moving max/min sql/mysql_priv.h: new uncacheble flags added sql/opt_subselect.cc: maxmin moved. sql/opt_subselect.h: New function for maxmin. sql/sql_class.h: debug code sql/sql_lex.cc: Fixed flags. Limit setting fixed. sql/sql_lex.h: 2 new flags. sql/sql_select.cc: Prepare divided on 2 function to be able recollect some info after transformation. sql/sql_select.h: Prepare divided on 2 functions. --- sql/sql_lex.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index f0e99fdc289..6fc1167235c 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -417,7 +417,8 @@ public: /* result of this query can't be cached, bit field, can be : - UNCACHEABLE_DEPENDENT + UNCACHEABLE_DEPENDENT_GENERATED + UNCACHEABLE_DEPENDENT_INJECTED UNCACHEABLE_RAND UNCACHEABLE_SIDEEFFECT UNCACHEABLE_EXPLAIN -- cgit v1.2.1 From 1018c901075a1aa4b523bf4f9f04bef7106ed837 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Tue, 17 May 2011 22:22:33 -0700 Subject: Fixed LP bug #784281. When a view is merged into a select all the depended_from fields pointing to the select of the view should have been corrected to point to the select where the view is used. It was not done yet. This could lead to wrong results returned by queries such as one from the test case for bug 33389. Correction of outer references required walking through all items of the proccesed qurery. To avoid this the following solution was implemented. Each select now contains a pointer to the select it is merged into (if there is any). Such pointers allow to get the corrected value of depended_from on the fly. The function Item_ident::get_depended_from was introduced for this purpose. --- sql/sql_lex.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index e8efae8859f..c0bd522036d 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -638,6 +638,8 @@ public: List leaf_tables; List leaf_tables_exec; uint insert_tables; + st_select_lex *merged_into; /* select which this select is merged into */ + /* (not 0 only for views/derived tables) */ const char *type; /* type of select for EXPLAIN */ -- cgit v1.2.1 From 579f644360768f3318faf0ccfed4578f7190c2c3 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 20 May 2011 00:44:21 +0200 Subject: Fix warnings --- sql/sql_lex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index c0bd522036d..a587a01b3f4 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -892,7 +892,7 @@ public: select_limit == 0); } void mark_as_belong_to_derived(TABLE_LIST *derived); - void increase_derived_records(uint records); + void increase_derived_records(ha_rows records); void update_used_tables(); void mark_const_derived(bool empty); -- cgit v1.2.1 From c9a349488b95a9a938564fe1ac06dafc70db5864 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Fri, 27 May 2011 00:03:55 -0700 Subject: Applied Sanja's patch to fix LP bug #784297 in the tree for mwl106. The patch imposes unconditional materialization for derived tables used in update and multi-update statements. Fixed a bug with a wrong order of processing derived tables/views at the prepare stage that caused a crash for the variant of the query from test case for bug 52157. --- sql/sql_lex.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index a587a01b3f4..014bcfdfd65 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -585,6 +585,8 @@ public: void set_thd(THD *thd_arg) { thd= thd_arg; } inline bool is_union (); + void set_unique_exlude(); + friend void lex_start(THD *thd); friend int subselect_union_engine::exec(); -- cgit v1.2.1 From 8ce2e1bcbe1f00b6030b1c82ea62b3a64b1d0de9 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sat, 28 May 2011 22:07:56 -0700 Subject: Fixed the abort failure of a test case from vcol.vcol_misc. The fix blocks execution of any constant sub-expressions of the defining expressions for virtual columns when context analysis if these expressions is performed. Fixed a compiler warning. --- sql/sql_lex.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 6fc1167235c..d109ebfdcc8 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -1885,6 +1885,7 @@ typedef struct st_lex : public Query_tables_list { return (context_analysis_only & (CONTEXT_ANALYSIS_ONLY_PREPARE | + CONTEXT_ANALYSIS_ONLY_VCOL_EXPR | CONTEXT_ANALYSIS_ONLY_VIEW)); } -- cgit v1.2.1 From 55d26463ad29c3262b14a9b959adf852b1e650bc Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 30 May 2011 21:40:46 +0300 Subject: Fixed typo (exlude -> exclude). --- sql/sql_lex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 014bcfdfd65..ee1fd62fdec 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -585,7 +585,7 @@ public: void set_thd(THD *thd_arg) { thd= thd_arg; } inline bool is_union (); - void set_unique_exlude(); + void set_unique_exclude(); friend void lex_start(THD *thd); friend int subselect_union_engine::exec(); -- cgit v1.2.1 From 56eb6d7e69ecce856e2d54e2404157407cb7203b Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Mon, 13 Jun 2011 19:03:03 -0700 Subject: Fixed LP bug #794890. Changed the code that processing of multi-updates and multi-deletes with multitable views at the prepare stage. A proper solution would be: never to perform any transformations of views before and at the prepare stage. Yet it would require re-engineering of the code that checks privileges and updatability of views. Ultimately this re-engineering has to be done to provide a clean solution for INSERT/UPDATE/DELETE statements that use views. Fixed a valgrind problem in the function TABLE::use_index. --- sql/sql_lex.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 5a8b5a5f361..57eeb963b89 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -639,6 +639,8 @@ public: */ List leaf_tables; List leaf_tables_exec; + List leaf_tables_prep; + bool is_prep_leaf_list_saved; uint insert_tables; st_select_lex *merged_into; /* select which this select is merged into */ /* (not 0 only for views/derived tables) */ @@ -899,6 +901,7 @@ public: void mark_const_derived(bool empty); bool save_leaf_tables(THD *thd); + bool save_prep_leaf_tables(THD *thd); private: /* current index hint kind. used in filling up index_hints */ -- cgit v1.2.1 From d37465a9cc458ab215105de22875ce0a64c0efc2 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Sat, 16 Jul 2011 23:57:43 -0700 Subject: Fixed LP bug #794901. Also: 1. simplified the code of the function mysql_derived_merge_for_insert. 2. moved merge of views/dt for multi-update/delete to the prepare stage. 3. the list of the references to the candidates for semi-join now is allocated in the statement memory. --- sql/sql_lex.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 57eeb963b89..14ab445a366 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -637,6 +637,12 @@ public: tables. Unlike 'next_local', this in this list views are *not* leaves. Created in setup_tables() -> make_leaves_list(). */ + /* + Subqueries that will need to be converted to semi-join nests, including + those converted to jtbm nests. The list is emptied when conversion is done. + */ + List sj_subselects; + List leaf_tables; List leaf_tables_exec; List leaf_tables_prep; @@ -886,7 +892,7 @@ public: void remove_table_from_list(TABLE_LIST *table); void remap_tables(TABLE_LIST *derived, table_map map, uint tablenr, st_select_lex *parent_lex); - bool merge_subquery(TABLE_LIST *derived, st_select_lex *subq_lex, + bool merge_subquery(THD *thd, TABLE_LIST *derived, st_select_lex *subq_lex, uint tablenr, table_map map); inline bool is_mergeable() { -- cgit v1.2.1 From 99cce18955dfb43d7d69c7de704cb29f047f8da5 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 19 Jul 2011 23:19:10 +0300 Subject: Fixed LP BUG#800696. The problem was that optimizer removes some outer references (it they are constant for example) and the list of outer items built during prepare phase is not actual during execution phase when we need it as the cache parameters. First solution was use pointer on pointer on outer reference Item and initialize temporary table on demand. This solved most problem except case when optimiser also reduce Item which contains outer references ('OR' in this bug test suite). The solution is to build the list of outer reference items on execution phase (after optimization) on demand (just before temporary table creation) by walking Item tree and finding outer references among Item_ident (Item_field/Item_ref) and Item_sum items. Removed depends_on list (because it is not neede any mnore for the cache, in the place where it was used it replaced with upper_refs). Added processor (collect_outer_ref_processor) and get_cache_parameters() methods to collect outer references (or other expression parameters in future). mysql-test/r/subselect_cache.result: A new test added. mysql-test/r/subselect_scache.result: Changes in creating the cache and its paremeters order or adding arguments of aggregate function (which is a parameter also, but this has no influence on the result). mysql-test/t/subselect_cache.test: Added a new test. sql/item.cc: depends_on removed. Added processor (collect_outer_ref_processor) and get_cache_parameters() methods to collect outer references. Item_cache_wrapper collect parameters befor initialization of its cache. sql/item.h: depends_on removed. Added processor (collect_outer_ref_processor) and get_cache_parameters() methods to collect outer references. sql/item_cmpfunc.cc: depends_on removed. Added processor (collect_outer_ref_processor) to collect outer references. sql/item_cmpfunc.h: Added processor (collect_outer_ref_processor) to collect outer references. sql/item_subselect.cc: depends_on removed. Added processor get_cache_parameters() method to collect outer references. sql/item_subselect.h: depends_on removed. Added processor get_cache_parameters() method to collect outer references. sql/item_sum.cc: Added processor (collect_outer_ref_processor) method to collect outer references. sql/item_sum.h: Added processor (collect_outer_ref_processor) and get_cache_parameters() methods to collect outer references. sql/opt_range.cc: depends_on removed. sql/sql_base.cc: depends_on removed. sql/sql_class.h: New iterator added. sql/sql_expression_cache.cc: Build of list of items resolved in outer query done just before creating expression cache on the first execution of the subquery which removes influence of optimizer removing items (all optimization already done). sql/sql_expression_cache.h: Build of list of items resolved in outer query done just before creating expression cache on the first execution of the subquery which removes influence of optimizer removing items (all optimization already done). sql/sql_lex.cc: depends_on removed. sql/sql_lex.h: depends_on removed. sql/sql_list.h: Added add_unique method to add only unique elements to the list. sql/sql_select.cc: Support of new Item list added. sql/sql_select.h: Support of new Item list added. --- sql/sql_lex.h | 1 - 1 file changed, 1 deletion(-) (limited to 'sql/sql_lex.h') diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 14ab445a366..fe79e6e2908 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -793,7 +793,6 @@ public: inline bool is_subquery_function() { return master_unit()->item != 0; } bool mark_as_dependent(THD *thd, st_select_lex *last, Item *dependency); - void register_dependency_item(st_select_lex *last, Item **dependency); bool set_braces(bool value); bool inc_in_sum_expr(); -- cgit v1.2.1