summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2014-04-11 09:38:55 +0200
committerunknown <knielsen@knielsen-hq.org>2014-04-11 09:38:55 +0200
commit65f80d4052e48accab9b152d7368b7aa0ccc3c80 (patch)
tree5ea2576ea013e1879875065ac41d0b256f35a825 /sql
parent63d0918807739dd19578ce9db80acbfd8ea158e6 (diff)
parenta1ae8f9ba86bf3967b0b55439c306ff611913345 (diff)
downloadmariadb-git-65f80d4052e48accab9b152d7368b7aa0ccc3c80.tar.gz
Merge MDEV-6067 from 5.2 to 5.3.
Diffstat (limited to 'sql')
-rw-r--r--sql/handler.cc7
-rw-r--r--sql/handler.h18
-rw-r--r--sql/sql_base.cc1
3 files changed, 5 insertions, 21 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 630a966f4ff..bcf051deb62 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3335,14 +3335,11 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt)
if it is started.
*/
+inline
void
-handler::mark_trx_read_write_part2()
+handler::mark_trx_read_write()
{
Ha_trx_info *ha_info= &ha_thd()->ha_data[ht->slot].ha_info[0];
-
- /* Don't call this function again for this statement */
- mark_trx_done= TRUE;
-
/*
When a storage engine method is called, the transaction must
have been started, unless it's a DDL call, for which the
diff --git a/sql/handler.h b/sql/handler.h
index f9435b66084..6a304951cf9 100644
--- a/sql/handler.h
+++ b/sql/handler.h
@@ -1625,7 +1625,6 @@ public:
enum {NONE=0, INDEX, RND} inited;
bool locked;
bool implicit_emptied; /* Can be !=0 only if HEAP */
- bool mark_trx_done;
bool cloned; /* 1 if this was created with clone */
const COND *pushed_cond;
Item *pushed_idx_cond;
@@ -1674,7 +1673,7 @@ public:
key_used_on_scan(MAX_KEY), active_index(MAX_KEY),
ref_length(sizeof(my_off_t)),
ft_handler(0), inited(NONE),
- locked(FALSE), implicit_emptied(FALSE), mark_trx_done(FALSE), cloned(0),
+ locked(FALSE), implicit_emptied(FALSE), cloned(0),
pushed_cond(0), pushed_idx_cond(NULL),
pushed_idx_cond_keyno(MAX_KEY),
next_insert_id(0), insert_id_for_cur_row(0),
@@ -1740,13 +1739,6 @@ public:
}
int ha_rnd_init_with_error(bool scan) __attribute__ ((warn_unused_result));
int ha_reset();
- /* Tell handler (not storage engine) this is start of a new statement */
- void ha_start_of_new_statement()
- {
- ft_handler= 0;
- mark_trx_done= FALSE;
- }
-
/* this is necessary in many places, e.g. in HANDLER command */
int ha_index_or_rnd_end()
{
@@ -2459,12 +2451,8 @@ protected:
private:
/* Private helpers */
- void mark_trx_read_write_part2();
- inline void mark_trx_read_write()
- {
- if (!mark_trx_done)
- mark_trx_read_write_part2();
- }
+ inline void mark_trx_read_write();
+private:
inline void increment_statistics(ulong SSV::*offset) const;
inline void decrement_statistics(ulong SSV::*offset) const;
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index b197a712eba..c68ec7f1191 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -3085,7 +3085,6 @@ TABLE *open_table(THD *thd, TABLE_LIST *table_list, MEM_ROOT *mem_root,
table->status=STATUS_NO_RECORD;
table->insert_values= 0;
table->fulltext_searched= 0;
- table->file->ha_start_of_new_statement();
table->file->ft_handler= 0;
/*
Check that there is no reference to a condition from an earlier query