summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-04-11 19:30:59 +0200
committerSergei Golubchik <sergii@pisem.net>2013-04-11 19:30:59 +0200
commit61ed0ebe7388d8302f2de7144de41da32bf085ba (patch)
tree8b47861aeeef1db8fcbf8d0a558043aab93187a8 /sql/opt_range.cc
parent48be80cd95c9121d2730ebcd1df2a1a37fe73f3d (diff)
parent7b55b59b5792d87dedd946487769bc2b1dc36833 (diff)
downloadmariadb-git-61ed0ebe7388d8302f2de7144de41da32bf085ba.tar.gz
5.1 merge
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 100b900e50d..ef6192509fd 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -83,7 +83,12 @@
static int sel_cmp(Field *f,uchar *a,uchar *b,uint8 a_flag,uint8 b_flag);
-static uchar is_null_string[2]= {1,0};
+/*
+ this should be long enough so that any memcmp with a string that
+ starts from '\0' won't cross is_null_string boundaries, even
+ if the memcmp is optimized to compare 4- 8- or 16- bytes at once
+*/
+static uchar is_null_string[20]= {1,0};
class RANGE_OPT_PARAM;
/*