summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-09-11 19:06:23 +0300
committerunknown <monty@mashka.mysql.fi>2003-09-11 19:06:23 +0300
commitdd0d199ebeab47facb4d01269cda97c258491c22 (patch)
treeba442d57a65bd55a0d0fec02aa6abeae237a568b /sql/opt_range.cc
parentc9d1bdfac3956f5b32e338e620bd5698439bb43c (diff)
downloadmariadb-git-dd0d199ebeab47facb4d01269cda97c258491c22.tar.gz
After merge fixes.
Note that mix_innodb_myisam_binlog and union fails after this patch (Will be fixed shortly by maintaners of this code) client/mysql.cc: After merge fix include/mysql.h: Some additions to MYSQL_BIND for cleaner prepared statement code libmysql/libmysql.c: mysql_prepare_result -> mysql_get_metadata() Added test for offset overflow when using mysql_fetch_column() Cleaned up mysql_fetch_column() Optimized fetch_result() usage mysql-test/r/func_group.result: Updated results after merge mysql-test/r/func_test.result: Updated results after merge mysql-test/r/grant.result: Updated results after merge mysql-test/r/loaddata.result: Updated results after merge mysql-test/r/lowercase_table.result: Updated results after merge mysql-test/r/mix_innodb_myisam_binlog.result: Updated results after merge (note that this is still not correct; Need patch to mysqld to fix this properly) mysql-test/r/myisam.result: Updated results after merge mysql-test/r/range.result: Updated results after merge mysql-test/r/rpl_loaddata.result: Updated results after merge mysql-test/r/rpl_loaddata_rule_m.result: Updated results after merge mysql-test/r/rpl_loaddata_rule_s.result: Updated results after merge mysql-test/r/rpl_log.result: Updated results after merge mysql-test/r/union.result: Updated results after merge mysql-test/t/lowercase_table.test: Update after merge mysql-test/t/myisam.test: Update after merge mysql-test/t/union.test: Update after merge sql-bench/compare-results.sh: Fix for now output format sql/field.h: Added is_null_in_record() to make ha_innodb.cc code more general sql/ha_innodb.cc: Removed some functions that uses inernal (private) MySQL information sql/item_cmpfunc.cc: After merge fix sql/log_event.cc: After merge fix; (Some code should be checked by Guilhem) sql/opt_range.cc: Simple optimzation and after merge fixes sql/slave.cc: After merge fix sql/sql_acl.cc: After merge fix + code cleanup sql/sql_select.cc: After merge fix sql/sql_show.cc: After merge fix sql/sql_table.cc: After merge fix Cleanup of mysql_checksum_table() sql/sql_union.cc: After merge fixes. Note that after this the union test still fails; Will be fixed shortly... tests/client_test.c: mysql_prepare_result() -> mysql_get_metadata()
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 947c930b2f4..5a883ce8b2c 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -618,6 +618,7 @@ int SQL_SELECT::test_quick_select(key_map keys_to_use, table_map prev_tables,
SEL_TREE *tree;
KEY_PART *key_parts;
PARAM param;
+ THD *thd= current_thd;
/* set up parameter that is passed to all functions */
param.baseflag=basflag;
@@ -628,13 +629,13 @@ int SQL_SELECT::test_quick_select(key_map keys_to_use, table_map prev_tables,
param.keys=0;
param.mem_root= &alloc;
- current_thd->no_errors=1; // Don't warn about NULL
+ thd->no_errors=1; // Don't warn about NULL
init_sql_alloc(&alloc,2048,0);
if (!(param.key_parts = (KEY_PART*) alloc_root(&alloc,
sizeof(KEY_PART)*
head->key_parts)))
{
- current_thd->no_errors=0;
+ thd->no_errors=0;
free_root(&alloc,MYF(0)); // Return memory & allocator
DBUG_RETURN(0); // Can't use range
}
@@ -736,7 +737,7 @@ int SQL_SELECT::test_quick_select(key_map keys_to_use, table_map prev_tables,
}
free_root(&alloc,MYF(0)); // Return memory & allocator
my_pthread_setspecific_ptr(THR_MALLOC,old_root);
- current_thd->no_errors=0;
+ thd->no_errors=0;
}
DBUG_EXECUTE("info",print_quick(quick,needed_reg););
/*
@@ -764,7 +765,7 @@ static SEL_TREE *get_mm_tree(PARAM *param,COND *cond)
while ((item=li++))
{
SEL_TREE *new_tree=get_mm_tree(param,item);
- if(current_thd->fatal_error)
+ if (current_thd->is_fatal_error)
DBUG_RETURN(0); // out of memory
tree=tree_and(param,tree,new_tree);
if (tree && tree->type == SEL_TREE::IMPOSSIBLE)