summaryrefslogtreecommitdiff
path: root/sql/opt_range_mrr.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-19 21:45:18 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-19 21:45:18 +0200
commit76f0b94bb0b2994d639353530c5b251d0f1a204b (patch)
tree9ed50628aac34f89a37637bab2fc4915b86b5eb4 /sql/opt_range_mrr.cc
parent4e46d8e5bff140f2549841167dc4b65a3c0a645d (diff)
parent5dc1a2231f55bacc9aaf0e24816f3d9c2ee1f21d (diff)
downloadmariadb-git-76f0b94bb0b2994d639353530c5b251d0f1a204b.tar.gz
merge with 5.3
sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
Diffstat (limited to 'sql/opt_range_mrr.cc')
-rw-r--r--sql/opt_range_mrr.cc24
1 files changed, 19 insertions, 5 deletions
diff --git a/sql/opt_range_mrr.cc b/sql/opt_range_mrr.cc
index acf22bd7a49..160b783715c 100644
--- a/sql/opt_range_mrr.cc
+++ b/sql/opt_range_mrr.cc
@@ -116,11 +116,19 @@ static void step_down_to(SEL_ARG_RANGE_SEQ *arg, SEL_ARG *key_tree)
- max_key_part
RETURN
- 0 Ok
- 1 No more ranges in the sequence
+ FALSE Ok
+ TRUE No more ranges in the sequence
*/
-uint sel_arg_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range)
+#if (_MSC_FULL_VER == 160030319)
+/*
+ Workaround Visual Studio 2010 RTM compiler backend bug, the function enters
+ infinite loop.
+ */
+#pragma optimize("g", off)
+#endif
+
+bool sel_arg_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range)
{
SEL_ARG *key_tree;
SEL_ARG_RANGE_SEQ *seq= (SEL_ARG_RANGE_SEQ*)rseq;
@@ -217,7 +225,7 @@ walk_up_n_right:
RANGE_SEQ_ENTRY *cur= &seq->stack[seq->i];
uint min_key_length= cur->min_key - seq->param->min_key;
- range->ptr= (char*)(int)(key_tree->part);
+ range->ptr= (char*)(intptr)(key_tree->part);
if (cur->min_key_flag & GEOM_FLAG)
{
range->range_flag= cur->min_key_flag;
@@ -273,6 +281,12 @@ walk_up_n_right:
return 0;
}
+#if (_MSC_FULL_VER == 160030319)
+/* VS2010 compiler bug workaround */
+#pragma optimize("g", on)
+#endif
+
+
/****************************************************************************
MRR Range Sequence Interface implementation that walks array<QUICK_RANGE>
****************************************************************************/
@@ -314,7 +328,7 @@ range_seq_t quick_range_seq_init(void *init_param, uint n_ranges, uint flags)
1 No more ranges in the sequence
*/
-uint quick_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range)
+bool quick_range_seq_next(range_seq_t rseq, KEY_MULTI_RANGE *range)
{
QUICK_RANGE_SEQ_CTX *ctx= (QUICK_RANGE_SEQ_CTX*)rseq;