diff options
author | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2011-05-06 15:39:40 +0400 |
---|---|---|
committer | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2011-05-06 15:39:40 +0400 |
commit | 52efe3e00d36a02ae600fb550b23dbda59413946 (patch) | |
tree | 4e4175d366ea610aca69d84f86aaf89c3b05f03c /sql/item_row.cc | |
parent | 167d2896e58ca98d5b8f56b86bb3686b078a7fe0 (diff) | |
download | mariadb-git-52efe3e00d36a02ae600fb550b23dbda59413946.tar.gz |
Preliminary patch for Bug#11848763 / 60025
(SUBSTRING inside a stored function works too slow).
Background:
- THD classes derives from Query_arena, thus inherits the 'state'
attribute and related operations (is_stmt_prepare() & co).
- Although these operations are available in THD, they must not
be used. THD has its own attribute to point to the active
Query_arena -- stmt_arena.
- So, instead of using thd->is_stmt_prepare(),
thd->stmt_arena->is_stmt_prepare() must be used. This was the root
cause of Bug 60025.
This patch enforces the proper way of calling those operations.
is_stmt_prepare() & co are declared as private operations
in THD (thus, they are hidden from being called on THD instance).
The patch tries to minimize changes in 5.5.
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r-- | sql/item_row.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc index 94515640625..0f5d6f27823 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -170,7 +170,7 @@ bool Item_row::walk(Item_processor processor, bool walk_subquery, uchar *arg) Item *Item_row::transform(Item_transformer transformer, uchar *arg) { - DBUG_ASSERT(!current_thd->is_stmt_prepare()); + DBUG_ASSERT(!current_thd->stmt_arena->is_stmt_prepare()); for (uint i= 0; i < arg_count; i++) { |