From a0040b0bdabae307e19fa5bd46fc13968db17135 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 17 Feb 2004 16:57:39 +0100 Subject: 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 --- include/my_global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') 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]))) -- cgit v1.2.1