diff options
author | unknown <sanja@montyprogram.com> | 2012-02-14 16:52:56 +0200 |
---|---|---|
committer | unknown <sanja@montyprogram.com> | 2012-02-14 16:52:56 +0200 |
commit | 764eeeee74f999fe2107fc362236563be0025093 (patch) | |
tree | 8af3359111969a90c2670d887c5ef79262aab74f /sql/table.h | |
parent | 7ab53e80627e54c6dece486bf0b059436b7e5777 (diff) | |
download | mariadb-git-764eeeee74f999fe2107fc362236563be0025093.tar.gz |
Fix for LP BUG#910123 MariaDB 5.3.3 causes 1093 error on Drupal
Problem was that now we can merge derived table (subquery in the FROM clause).
Fix: in case of detected conflict and presence of derived table "over" the table which cased the conflict - try materialization strategy.
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/sql/table.h b/sql/table.h index 8d91804eb06..8de71658493 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1747,16 +1747,18 @@ struct TABLE_LIST inline void set_merged_derived() { derived_type= ((derived_type & DTYPE_MASK) | - DTYPE_TABLE | DTYPE_MERGE); + DTYPE_TABLE | DTYPE_MERGE); + set_check_merged(); } inline bool is_materialized_derived() { return (derived_type & DTYPE_MATERIALIZE); } - inline void set_materialized_derived() + void set_materialized_derived() { derived_type= ((derived_type & DTYPE_MASK) | - DTYPE_TABLE | DTYPE_MATERIALIZE); + DTYPE_TABLE | DTYPE_MATERIALIZE); + set_check_materialized(); } inline bool is_multitable() { @@ -1802,6 +1804,12 @@ struct TABLE_LIST private: bool prep_check_option(THD *thd, uint8 check_opt_type); bool prep_where(THD *thd, Item **conds, bool no_where_clause); + void set_check_materialized(); +#ifndef DBUG_OFF + void set_check_merged(); +#else + inline void set_check_merged() {} +#endif /* Cleanup for re-execution in a prepared statement or a stored procedure. |