diff options
author | unknown <monty@mysql.com> | 2005-02-03 13:18:30 +0200 |
---|---|---|
committer | unknown <monty@mysql.com> | 2005-02-03 13:18:30 +0200 |
commit | 4f1cbb6031d8310f17db9e503234ef169805412a (patch) | |
tree | e52c0cca0b1936bb8b6332b6f0e724b9666f65f1 /strings | |
parent | 9240144b739dda5b1221b880f9bade0f774697e6 (diff) | |
parent | ad21db5e0727704ee0527c08410bafff4d3150f4 (diff) | |
download | mariadb-git-4f1cbb6031d8310f17db9e503234ef169805412a.tar.gz |
4.1 -> 5.0 merge
BitKeeper/etc/logging_ok:
auto-union
Build-tools/Do-compile:
Auto merged
client/mysqladmin.cc:
Auto merged
client/mysqldump.c:
Auto merged
configure.in:
Auto merged
extra/perror.c:
Auto merged
innobase/buf/buf0rea.c:
Auto merged
innobase/fil/fil0fil.c:
Auto merged
innobase/include/rem0rec.ic:
Auto merged
innobase/include/univ.i:
Auto merged
innobase/os/os0file.c:
Auto merged
innobase/ut/ut0ut.c:
Auto merged
mysql-test/r/derived.result:
Auto merged
mysql-test/r/func_str.result:
Simple merge
mysql-test/r/subselect.result:
Automatic merge
mysql-test/t/derived.test:
Automatic merge
mysql-test/t/func_str.test:
Simple merge
mysql-test/t/subselect.test:
Automatic merge
mysys/my_handler.c:
Automatic merge
ndb/src/kernel/blocks/backup/Backup.cpp:
Automatic merge
scripts/make_binary_distribution.sh:
Automatic merge
scripts/mysql_install_db.sh:
Automatic merge
sql/examples/ha_archive.cc:
Simple merge
sql/ha_innodb.cc:
Automatic merge
sql/item.cc:
Merge
sql/item_cmpfunc.h:
Automatic merge
sql/item_func.cc:
Simple merge
sql/item_func.h:
Automatic merge
sql/item_strfunc.cc:
Automatic merge
sql/item_strfunc.h:
Automatic merge
sql/item_subselect.cc:
Automatic merge
sql/mysqld.cc:
Automatic merge
sql/set_var.cc:
Automatic merge
sql/sql_base.cc:
Automatic merge
sql/sql_class.cc:
Automatic merge
sql/sql_class.h:
Automatic merge
sql/sql_lex.cc:
Automatic merge
sql/sql_lex.h:
Automatic merge
sql/sql_parse.cc:
Automatic merge
sql/sql_select.cc:
Automatic merge
sql/sql_table.cc:
Automatic merge
sql/sql_update.cc:
Simple merge
strings/ctype-big5.c:
Automatic merge
strings/ctype-bin.c:
Automatic merge
strings/ctype-gbk.c:
Automatic merge
strings/ctype-latin1.c:
Automatic merge
strings/ctype-mb.c:
Automatic merge
strings/ctype-simple.c:
Automatic merge
strings/ctype-sjis.c:
Automatic merge
strings/ctype-tis620.c:
Automatic merge
strings/ctype-ucs2.c:
Automatic merge
strings/ctype-utf8.c:
Automatic merge
vio/viosocket.c:
Automatic merge
vio/viossl.c:
Automatic merge
Diffstat (limited to 'strings')
-rw-r--r-- | strings/ctype-big5.c | 4 | ||||
-rw-r--r-- | strings/ctype-bin.c | 4 | ||||
-rw-r--r-- | strings/ctype-gbk.c | 4 | ||||
-rw-r--r-- | strings/ctype-latin1.c | 4 | ||||
-rw-r--r-- | strings/ctype-mb.c | 4 | ||||
-rw-r--r-- | strings/ctype-simple.c | 6 | ||||
-rw-r--r-- | strings/ctype-sjis.c | 4 | ||||
-rw-r--r-- | strings/ctype-tis620.c | 4 | ||||
-rw-r--r-- | strings/ctype-ucs2.c | 4 | ||||
-rw-r--r-- | strings/ctype-utf8.c | 4 |
10 files changed, 21 insertions, 21 deletions
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c index 70c5ec633be..793c48bb988 100644 --- a/strings/ctype-big5.c +++ b/strings/ctype-big5.c @@ -277,7 +277,7 @@ static int my_strnncollsp_big5(CHARSET_INFO * cs __attribute__((unused)), if (!res && a_length != b_length) { const uchar *end; - int swap= 0; + int swap= 1; if (diff_if_only_endspace_difference) res= 1; /* Assume 'a' is bigger */ /* @@ -295,7 +295,7 @@ static int my_strnncollsp_big5(CHARSET_INFO * cs __attribute__((unused)), for (end= a + a_length-length; a < end ; a++) { if (*a != ' ') - return ((int) *a - (int) ' ') ^ swap; + return (*a < ' ') ? -swap : swap; } } return res; diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 50c66a63e97..916ef6d271b 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -169,7 +169,7 @@ static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)), res= 0; if (a_length != b_length) { - int swap= 0; + int swap= 1; /* Check the next not space character of the longer key. If it's < ' ', then it's smaller than the other key. @@ -187,7 +187,7 @@ static int my_strnncollsp_8bit_bin(CHARSET_INFO * cs __attribute__((unused)), for (end= a + a_length-length; a < end ; a++) { if (*a != ' ') - return ((int) *a - (int) ' ') ^ swap; + return (*a < ' ') ? -swap : swap; } } return res; diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c index 6b47b537fb9..d4f9627ecf7 100644 --- a/strings/ctype-gbk.c +++ b/strings/ctype-gbk.c @@ -2638,7 +2638,7 @@ static int my_strnncollsp_gbk(CHARSET_INFO * cs __attribute__((unused)), if (!res && a_length != b_length) { const uchar *end; - int swap= 0; + int swap= 1; if (diff_if_only_endspace_difference) res= 1; /* Assume 'a' is bigger */ /* @@ -2656,7 +2656,7 @@ static int my_strnncollsp_gbk(CHARSET_INFO * cs __attribute__((unused)), for (end= a + a_length-length; a < end ; a++) { if (*a != ' ') - return ((int) *a - (int) ' ') ^ swap; + return (*a < ' ') ? -swap : swap; } } return res; diff --git a/strings/ctype-latin1.c b/strings/ctype-latin1.c index 043645684cf..fdf9f4a6d91 100644 --- a/strings/ctype-latin1.c +++ b/strings/ctype-latin1.c @@ -617,7 +617,7 @@ static int my_strnncollsp_latin1_de(CHARSET_INFO *cs __attribute__((unused)), res= 0; if (a != a_end || b != b_end) { - int swap= 0; + int swap= 1; if (diff_if_only_endspace_difference) res= 1; /* Assume 'a' is bigger */ /* @@ -635,7 +635,7 @@ static int my_strnncollsp_latin1_de(CHARSET_INFO *cs __attribute__((unused)), for ( ; a < a_end ; a++) { if (*a != ' ') - return ((int) *a - (int) ' ') ^ swap; + return (*a < ' ') ? -swap : swap; } } return res; diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c index e902730d65a..a9edb35d8a4 100644 --- a/strings/ctype-mb.c +++ b/strings/ctype-mb.c @@ -399,7 +399,7 @@ static int my_strnncollsp_mb_bin(CHARSET_INFO * cs __attribute__((unused)), res= 0; if (a_length != b_length) { - int swap= 0; + int swap= 1; if (diff_if_only_endspace_difference) res= 1; /* Assume 'a' is bigger */ /* @@ -417,7 +417,7 @@ static int my_strnncollsp_mb_bin(CHARSET_INFO * cs __attribute__((unused)), for (end= a + a_length-length; a < end ; a++) { if (*a != ' ') - return ((int) *a - (int) ' ') ^ swap; + return (*a < ' ') ? -swap : swap; } } return res; diff --git a/strings/ctype-simple.c b/strings/ctype-simple.c index 2fd26d6097a..a955435c251 100644 --- a/strings/ctype-simple.c +++ b/strings/ctype-simple.c @@ -162,7 +162,7 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, uint a_length, res= 0; if (a_length != b_length) { - int swap= 0; + int swap= 1; if (diff_if_only_endspace_difference) res= 1; /* Assume 'a' is bigger */ /* @@ -174,13 +174,13 @@ int my_strnncollsp_simple(CHARSET_INFO * cs, const uchar *a, uint a_length, /* put shorter key in s */ a_length= b_length; a= b; - swap= -1^1; /* swap sign of result */ + swap= -1; /* swap sign of result */ res= -res; } for (end= a + a_length-length; a < end ; a++) { if (*a != ' ') - return ((int) *a - (int) ' ') ^ swap; + return (*a < ' ') ? -swap : swap; } } return res; diff --git a/strings/ctype-sjis.c b/strings/ctype-sjis.c index 22cc8d9818d..b0e2d1fcb1a 100644 --- a/strings/ctype-sjis.c +++ b/strings/ctype-sjis.c @@ -256,7 +256,7 @@ static int my_strnncollsp_sjis(CHARSET_INFO *cs __attribute__((unused)), if (!res && (a != a_end || b != b_end)) { - int swap= 0; + int swap= 1; if (diff_if_only_endspace_difference) res= 1; /* Assume 'a' is bigger */ /* @@ -274,7 +274,7 @@ static int my_strnncollsp_sjis(CHARSET_INFO *cs __attribute__((unused)), for (; a < a_end ; a++) { if (*a != ' ') - return ((int) *a - (int) ' ') ^ swap; + return (*a < ' ') ? -swap : swap; } } return res; diff --git a/strings/ctype-tis620.c b/strings/ctype-tis620.c index 9ba35e1c8ec..b6c54f1b375 100644 --- a/strings/ctype-tis620.c +++ b/strings/ctype-tis620.c @@ -593,7 +593,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), } if (a_length != b_length) { - int swap= 0; + int swap= 1; if (diff_if_only_endspace_difference) res= 1; /* Assume 'a' is bigger */ /* @@ -612,7 +612,7 @@ int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), { if (*a != ' ') { - res= ((int) *a - (int) ' ') ^ swap; + res= (*a < ' ') ? -swap : swap; goto ret; } } diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index 0d45cceb64d..35f49a34c80 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -280,7 +280,7 @@ static int my_strnncollsp_ucs2(CHARSET_INFO *cs __attribute__((unused)), if (slen != tlen) { - int swap= 0; + int swap= 1; if (slen < tlen) { s= t; @@ -291,7 +291,7 @@ static int my_strnncollsp_ucs2(CHARSET_INFO *cs __attribute__((unused)), for ( ; s < se ; s+= 2) { if (s[0] || s[1] != ' ') - return (((int)s[0] << 8) + (int) s[1] - (int) ' ') ^ swap; + return (s[0] == 0 && s[1] < ' ') ? -swap : swap; } } return 0; diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index e17e7587e85..4c90726e877 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -2093,7 +2093,7 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs, if (slen != tlen) { - int swap= 0; + int swap= 1; if (diff_if_only_endspace_difference) res= 1; /* Assume 'a' is bigger */ if (slen < tlen) @@ -2117,7 +2117,7 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs, for ( ; s < se; s++) { if (*s != ' ') - return ((int)*s - (int) ' ') ^ swap; + return (*s < ' ') ? -swap : swap; } } return res; |