summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-02-17 16:57:39 +0100
committerunknown <serg@serg.mylan>2004-02-17 16:57:39 +0100
commita0040b0bdabae307e19fa5bd46fc13968db17135 (patch)
tree10dd74bbc0033df4fdbb4f4c120fd51f31d5ad98 /include
parent66a266203fe162b2ebd78651032777d5c5f15f22 (diff)
downloadmariadb-git-a0040b0bdabae307e19fa5bd46fc13968db17135.tar.gz
if a key length exceeds the supported maximum and it is safe to auto-decrease it, do it.
include/my_global.h: do macro correctly mysql-test/r/ctype_utf8.result: updated mysql-test/r/myisam.result: updated mysql-test/r/type_blob.result: updated mysql-test/t/ctype_utf8.test: updated mysql-test/t/type_blob.test: new tests sql/share/english/errmsg.txt: specify that max key length is in BYTES sql/share/russian/errmsg.txt: specify that max key length is in BYTES sql/share/ukrainian/errmsg.txt: specify that max key length is in BYTES sql/sql_table.cc: if a key length exceeds the supported maximum and it is safe to auto-decrease it, do it. cleanup
Diffstat (limited to 'include')
-rw-r--r--include/my_global.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 41e3636116a..2652585d9e6 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -382,8 +382,8 @@ typedef unsigned short ushort;
#define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
#define swap(t,a,b) { register t dummy; dummy = a; a = b; b = dummy; }
#define test(a) ((a) ? 1 : 0)
-#define set_if_bigger(a,b) { if ((a) < (b)) (a)=(b); }
-#define set_if_smaller(a,b) { if ((a) > (b)) (a)=(b); }
+#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
+#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
#define test_all_bits(a,b) (((a) & (b)) == (b))
#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1))
#define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0])))