summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2012-08-13 22:23:28 +0300
committerMichael Widenius <monty@askmonty.org>2012-08-13 22:23:28 +0300
commitcee888acb36141136cdb121a7bb7d53200b14cb6 (patch)
treeaff0fbc9585911eb70b4f7c1f8f8adc7a0a05019 /sql/opt_range.cc
parent1aa6f042dab7a09dd86d96f934faa87df1c005c1 (diff)
downloadmariadb-git-cee888acb36141136cdb121a7bb7d53200b14cb6.tar.gz
Fixed compiler warnings (A few of these was bugs)
client/mysqldump.c: Slave needs to be initialized with 0 dbug/dbug.c: Removed not existing function plugin/semisync/semisync_master.cc: Fixed compiler warning sql/opt_range.cc: thd needs to be set early as it's used in some error conditions. sql/sql_table.cc: Changed to use uchar* to make array indexing portable storage/innobase/handler/ha_innodb.cc: Removed not used variable storage/maria/ma_delete.c: Fixed compiler warning storage/maria/ma_write.c: Fixed compiler warning
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index da328063e56..add46d148cf 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -2001,7 +2001,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler)
{
handler *save_file= file, *org_file;
my_bool org_key_read;
- THD *thd;
+ THD *thd= head->in_use;
DBUG_ENTER("QUICK_RANGE_SELECT::init_ror_merged_scan");
in_ror_merged_scan= 1;
@@ -2023,7 +2023,6 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler)
DBUG_RETURN(0);
}
- thd= head->in_use;
if (!(file= head->file->clone(head->s->normalized_path.str, thd->mem_root)))
{
/*