Commit graph

64 commits

Author SHA1 Message Date
unknown
a29b1d7151 BUG#11338 (logging of prepared statement w/ blob type)
In cp932, '\' character can be the second byte in a 
multi-byte character stream. This makes it difficult to use
mysql_escape_string. Added flag to indicate which languages allow
'\' as second byte of multibyte sequence so that when putting a prepared
statement into the binlog we can decide at runtime whether hex encoding
is really needed.


include/m_ctype.h:
  Added bool to indicate character sets which allow '\' as the second
  byte of a multibyte character set (currently only cp932). For these
  character sets, escaping with '\' is dangerous and leads to corruption
  in replication.
include/my_sys.h:
  Add function to enocde a string as hex with no prefix (bare)
mysys/charset.c:
  Add function to encode string as hex with no prefix (bare).
sql/item.cc:
  Check the connection character set to see if escape_string_for_mysql
  is safe, or if character set requires unambiguous (hex) encoding
sql/item.h:
  Pass thd to query_val_str for access to charset()
sql/sql_prepare.cc:
  Pass thd to query_val_str.
strings/ctype-big5.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-bin.c:
  Add escape_with_backslash_is_dangerous flag
strings/ctype-cp932.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-czech.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-euc_kr.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-extra.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-gb2312.c:
  Add escape_with_backslash_is_dangerous flag.
strings/ctype-gbk.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-latin1.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-sjis.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-tis620.c:
  Added esacpe_with_backslash_character_is_dangerous flag.
strings/ctype-uca.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-ucs2.c:
  Added escape_with_backslash_is_dangerous.
strings/ctype-ujis.c:
  Added escape_with_backslash_is_dangerous flag.
strings/ctype-utf8.c:
  Added escape_with_backslash_is_dangerous.
strings/ctype-win1250ch.c:
  Added escape_with_backslash_is_dangerous.
2005-08-17 04:26:32 -04:00
unknown
f12ded495c ctype-big5.c:
ctype-cp932.c:
ctype-gbk.c:
ctype-mb.c:
ctype-simple.c:
ctype-sjis.c:
ctype-ucs2.c:
ctype-ujis.c:
ctype-utf8.c:

  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.


strings/ctype-big5.c:
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
strings/ctype-cp932.c:
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
strings/ctype-gbk.c:
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
strings/ctype-mb.c:
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
strings/ctype-simple.c:
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
strings/ctype-sjis.c:
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
strings/ctype-ucs2.c:
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
strings/ctype-ujis.c:
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
strings/ctype-utf8.c:
  Adding explicit cast to return type
  in pointer substructions to avoid
  warnings from some compilers.
2005-07-26 16:38:10 +05:00
unknown
5687fe36bf Adding a new parameter for well_formed_length to
return error. We'll use it for better warnign reporting.
2005-04-06 11:53:15 +05:00
unknown
05cb2737b9 Bug #6819 Some ujis characters cannot be inserted into table
Allow to insert not-assigned UJIS codes.
2004-12-10 16:08:18 +04:00
unknown
1325786818 Incorporating new faster string->number converter functions
into MY_CHARSET_INFO structure.
2004-09-25 15:29:33 +05:00
unknown
cc12a462d6 Bug #3453 MySQL output formatting in multibyte character sets 2004-09-09 18:21:31 +05:00
unknown
f0fed74629 A new function to meassure terminal screen cells number for a string. 2004-08-25 11:39:43 +05:00
unknown
eda663a155 Many files:
LIKE crashed mysqld for binary collations in some cases


strings/ctype-big5.c:
  LIKE crashed mysqld for binary collations in some cases
strings/ctype-euc_kr.c:
  LIKE crashed mysqld for binary collations in some cases
strings/ctype-gb2312.c:
  LIKE crashed mysqld for binary collations in some cases
strings/ctype-gbk.c:
  LIKE crashed mysqld for binary collations in some cases
strings/ctype-latin1.c:
  LIKE crashed mysqld for binary collations in some cases
strings/ctype-sjis.c:
  LIKE crashed mysqld for binary collations in some cases
strings/ctype-tis620.c:
  LIKE crashed mysqld for binary collations in some cases
strings/ctype-ucs2.c:
  LIKE crashed mysqld for binary collations in some cases
strings/ctype-ujis.c:
  LIKE crashed mysqld for binary collations in some cases
strings/ctype-utf8.c:
  LIKE crashed mysqld for binary collations in some cases
sql/item_cmpfunc.cc:
  LIKE crashed mysqld for binary collations in some cases
2004-08-18 12:07:54 +05:00
unknown
f573ee0887 Unicode collation algorithm: contraction support.
E.g. 'Ch' is treated as a separate letter in Czech,
not as a combination of C+h.
2004-06-12 20:36:58 +05:00
unknown
859b1a8c48 Initialize max_sort_char only if a character set is requested. 2004-06-11 17:50:20 +05:00
unknown
5275eb21c2 Allocate memory when a character set is requested:
- For simple character sets: from_uni convertion table.
- For UCA: alternative weight arrays.
Use mbminlen instead of MY_CS_NONTEXT
2004-06-11 16:29:16 +05:00
unknown
d8f0df52d3 Optimization to use less memory. 2004-06-10 19:10:21 +05:00
unknown
8ab01b335d WL#916: Unicode collations for some languages 2004-06-08 17:56:15 +05:00
unknown
8ee5b216a1 Preparation for user-defined Unicode collations:
weights data now comes from a static variables
but from the charset structure.
2004-05-25 17:40:20 +05:00
unknown
7674fd064c Bug #3290 [Ver]: Can't convert sjis&ujis half-width katakana correctly
UJIS part fix
2004-03-25 16:15:52 +04:00
unknown
bf4e1d4681 min_sort_char was added, for the future UCA implementation.
UCS2 now has its own my_like_range function.
2004-03-19 10:00:46 +04:00
unknown
709356d473 Changed wellformedlen to well_formed_len
Fixed that blobs >16M can be inserted/updated
Fixed bug when doing CREATE TEMPORARY TABLE ... LIKE


include/m_ctype.h:
  Changed wellformedlen to well_formed_len
include/mysql.h:
  Fixed comment
libmysql/libmysql.c:
  Fixed indentation
libmysqld/lib_sql.cc:
  Fixed indentation
mysql-test/r/ctype_utf8.result:
  updated warning numbers
mysql-test/r/innodb.result:
  Moved test to right place
mysql-test/r/myisam-blob.result:
  More test for blobs
mysql-test/r/rpl000002.result:
  Move test to better place
mysql-test/r/rpl_log.result:
  Move test to better place
mysql-test/r/union.result:
  Move test to better place
mysql-test/t/innodb.test:
  Moved test to right place
mysql-test/t/myisam-blob.test:
  More test of blobs
mysql-test/t/rpl000002.test:
  Move test to better place
mysql-test/t/rpl_log.test:
  Move test to better place
mysql-test/t/union.test:
  Move test to better place
sql/field.cc:
  Changed wellformedlen to well_formed_len.
  Fixed that blobs >16M can be inserted/updated (new bug)
sql/field.h:
  Code optimization
sql/sql_lex.cc:
  Changed short variable names
sql/sql_show.cc:
  Optimized quote handling
sql/sql_table.cc:
  Fixed bug when doing CREATE TEMPORARY TABLE ... LIKE
sql/sql_union.cc:
  Added comment
strings/ctype-big5.c:
  Changed wellformedlen to well_formed_len
strings/ctype-bin.c:
  Changed wellformedlen to well_formed_len
strings/ctype-euc_kr.c:
  Changed wellformedlen to well_formed_len
strings/ctype-gb2312.c:
  Changed wellformedlen to well_formed_len
strings/ctype-gbk.c:
  Changed wellformedlen to well_formed_len
strings/ctype-latin1.c:
  Changed wellformedlen to well_formed_len
strings/ctype-mb.c:
  Changed wellformedlen to well_formed_len
strings/ctype-simple.c:
  Changed wellformedlen to well_formed_len
strings/ctype-sjis.c:
  Changed wellformedlen to well_formed_len
strings/ctype-tis620.c:
  Changed wellformedlen to well_formed_len
strings/ctype-ucs2.c:
  Changed wellformedlen to well_formed_len
  Indentation changes
strings/ctype-ujis.c:
  Changed wellformedlen to well_formed_len
strings/ctype-utf8.c:
  Changed wellformedlen to well_formed_len
2004-02-17 01:35:17 +02:00
unknown
faa8a41b1d Problem fix:
http://bugs.mysql.com/bug.php?id=2366
Wrong utf8 behaviour when data is trancated
2004-02-06 16:59:25 +04:00
unknown
162f1dc5e6 UCS-2 aligning 0xAA -> 0x00AA 2004-01-19 19:16:30 +04:00
unknown
43b42ceee1 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/my/mysql-4.1


sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
strings/ctype-big5.c:
  Auto merged
strings/ctype-euc_kr.c:
  Auto merged
strings/ctype-gb2312.c:
  Auto merged
strings/ctype-gbk.c:
  Auto merged
strings/ctype-sjis.c:
  Auto merged
strings/ctype-ujis.c:
  Auto merged
2003-12-08 12:26:10 +02:00
unknown
e505696ffc Portability fixes for Windows
VC++Files/client/mysqlclient.dsp:
  Update for windows
VC++Files/libmysql/libmysql.dsp:
  Update for windows
VC++Files/strings/strings.dsp:
  Update for windows
libmysqld/lib_sql.cc:
  Update for windows
scripts/make_win_src_distribution.sh:
  Update for windows
scripts/mysql_install_db.sh:
  Update for windows
sql/mysqld.cc:
  Remove not used variable
sql/set_var.cc:
  Indentation cleanups
sql/share/czech/errmsg.txt:
  Fixed wrong delimiters
sql/share/danish/errmsg.txt:
  Fixed wrong delimiters
sql/share/dutch/errmsg.txt:
  Fixed wrong delimiters
sql/share/english/errmsg.txt:
  Fixed wrong delimiters
sql/share/estonian/errmsg.txt:
  Fixed wrong delimiters
sql/share/french/errmsg.txt:
  Fixed wrong delimiters
sql/share/greek/errmsg.txt:
  Fixed wrong delimiters
sql/share/hungarian/errmsg.txt:
  Fixed wrong delimiters
sql/share/italian/errmsg.txt:
  Fixed wrong delimiters
sql/share/japanese/errmsg.txt:
  Fixed wrong delimiters
sql/share/korean/errmsg.txt:
  Fixed wrong delimiters
sql/share/norwegian-ny/errmsg.txt:
  Fixed wrong delimiters
sql/share/norwegian/errmsg.txt:
  Fixed wrong delimiters
sql/share/polish/errmsg.txt:
  Fixed wrong delimiters
sql/share/portuguese/errmsg.txt:
  Fixed wrong delimiters
sql/share/romanian/errmsg.txt:
  Fixed wrong delimiters
sql/share/russian/errmsg.txt:
  Fixed wrong delimiters
sql/share/serbian/errmsg.txt:
  Fixed wrong delimiters
sql/share/slovak/errmsg.txt:
  Fixed wrong delimiters
sql/share/spanish/errmsg.txt:
  Fixed wrong delimiters
sql/share/swedish/errmsg.txt:
  Fixed wrong delimiters
sql/share/ukrainian/errmsg.txt:
  Fixed wrong delimiters
sql/sql_acl.cc:
  Removed compiler warnings
strings/ctype-big5.c:
  Removed compiler warnings (VC++)
strings/ctype-euc_kr.c:
  Removed compiler warnings (VC++)
strings/ctype-gb2312.c:
  Removed compiler warnings (VC++)
strings/ctype-gbk.c:
  Removed compiler warnings (VC++)
strings/ctype-sjis.c:
  Removed compiler warnings (VC++)
strings/ctype-ucs2.c:
  Removed compiler warnings (VC++)
strings/ctype-ujis.c:
  Removed compiler warnings (VC++)
2003-12-08 12:25:37 +02:00
unknown
2e82008bac fix for my_mbcharlen(charset, c) to return 1 for single-byte characters
(isn't it obvious ?)


mysys/charset.c:
  all charsets support my_mbcharlen - no need to protect it with use_mb()
sql/sql_load.cc:
  all charsets support my_mbcharlen - no need to protect it with use_mb()
2003-12-06 19:05:26 +01:00
unknown
44bffa0b05 Fixed that multibyte charsets didn't honor multibyte
sequence boundaries in functions LIKE and LOCATE in
the case of "binary" collation. Comparison was done
like if the strings were just a binary strings without
character set assumption.
2003-09-19 15:18:19 +05:00
unknown
62f2cb14ee Bug fix:
http://bugs.mysql.com/bug.php?id=1264
2003-09-16 15:43:17 +05:00
unknown
10ab9f273a Fix strnxfrm_multiplye from 0 to 1 for charsets that do not use strnxfrm 2003-08-18 17:24:50 +05:00
unknown
afc8396919 BINARY collations for every character set 2003-05-23 18:39:55 +05:00
unknown
5aae66c101 CHARSET_INFO structure reorganization for easier maintainance 2003-05-23 17:45:52 +05:00
unknown
9b92f5858a Variables were rename, binary collation names were added
Fixed that SHOW CHARACTER SET displayed non-dynamic charsets even if they were not really compiled
2003-05-22 17:20:19 +05:00
unknown
f72611b4fa After merge fixes
Added initialization of all important global variables


BUILD/SETUP.sh:
  build with readline
client/mysqltest.c:
  Added variable SERVER_VERSION
myisam/mi_key.c:
  Indentation change
myisam/mi_open.c:
  After merge fix
myisam/mi_range.c:
  After merge fix
myisam/mi_rkey.c:
  After merge fix
myisam/mi_search.c:
  After merge fix
myisam/myisamdef.h:
  After merge fix
mysql-test/include/not_embedded.inc:
  Fix test (because of wrong utf8 test)
mysql-test/r/alter_table.result:
  Updated results after merge
mysql-test/r/create.result:
  Updated results after merge
mysql-test/r/ctype_recoding.result:
  Updated results after merge
mysql-test/r/fulltext.result:
  Updated results after merge
mysql-test/r/func_group.result:
  Updated results after merge
mysql-test/r/group_by.result:
  Updated results after merge
mysql-test/r/innodb.result:
  Updated results after merge
mysql-test/r/join_outer.result:
  Updated results after merge
mysql-test/r/null_key.result:
  Updated results after merge
mysql-test/r/order_by.result:
  Updated results after merge
mysql-test/r/query_cache.result:
  Updated results after merge
mysql-test/r/repair.result:
  Updated results after merge
mysql-test/r/rpl_flush_tables.result:
  Updated results after merge
mysql-test/r/union.result:
  Updated results after merge
mysql-test/r/update.result:
  Updated results after merge
mysql-test/t/ansi.test:
  After merge fixes
mysql-test/t/create.test:
  After merge fixes
mysql-test/t/ctype_recoding.test:
  After merge fixes
mysql-test/t/ctype_ujis.test:
  After merge fixes
mysql-test/t/fulltext.test:
  After merge fixes
mysql-test/t/innodb.test:
  After merge fixes
mysql-test/t/join_outer.test:
  After merge fixes
mysql-test/t/loaddata.test:
  After merge fixes
mysql-test/t/order_by.test:
  After merge fixes
mysql-test/t/rpl_flush_tables.test:
  After merge fixes
mysql-test/t/status.test:
  After merge fixes
mysql-test/t/subselect.test:
  After merge fixes
sql/convert.cc:
  Code cleanup
sql/field.cc:
  After merge fixes
sql/filesort.cc:
  Remove compiler warning
sql/item.cc:
  More efficient set_name() (no mallocs)
sql/item_cmpfunc.cc:
  Code Code cleanup
  Item_bool_func2::fix_fields() added to get error handling right for cmp_charset
sql/item_cmpfunc.h:
  New prototypes
sql/item_func.cc:
  After merge fix
sql/item_strfunc.cc:
  Faster check for BINARY
sql/log_event.cc:
  Comment cleanup
sql/mysql_priv.h:
  New prototypes and variables
sql/mysqld.cc:
  Added initialization of all important global variables.
  Cleanup of variable declarations
  This is needed ot make the embedded version restartable
sql/opt_sum.cc:
  After merge fix
sql/set_var.cc:
  Code cleanup
sql/sql_acl.cc:
  After merge fix
  Better error message
sql/sql_db.cc:
  After merge fix
sql/sql_derived.cc:
  After merge fix
sql/sql_insert.cc:
  Indentation cleanups
sql/sql_list.h:
  Added empty() to base_ilist
sql/sql_parse.cc:
  After merge fix
sql/sql_select.cc:
  After merge fix
  Fixed derived name handling in EXPLAIN
sql/sql_show.cc:
  After merge fix
sql/sql_string.cc:
  Made copy_and_convert global
sql/sql_string.h:
  Made copy_and_convert global
sql/sql_update.cc:
  After merge fix
sql/sql_yacc.yy:
  After merge fix
sql/thr_malloc.cc:
  Added sql_strmake_with_convert()
sql/unireg.h:
  Added MAX_ALIAS_NAME
strings/ctype-ujis.c:
  Fixed bug in converting to ujis
2003-05-21 21:39:58 +03:00
unknown
f390da2270 All collation names are now fit into convension 2003-04-07 18:49:56 +05:00
unknown
158b54873a mbcharlen() is now used instead of ismbhead(). The last one has been removed. 2003-04-01 15:52:09 +05:00
unknown
640f31bdc8 my_strncasecmp() is not used anymore. Use my_strncoll() instead. 2003-04-01 14:17:28 +05:00
unknown
db628b97a5 Some optimization in CHARSET_INFO:
We don't need separate hash_sort() and hash_caseup()
  We don't need tosort(). strnxfrm will do the same.
2003-04-01 12:45:16 +05:00
unknown
aeb47edbbc Every charset now have its own parser state arrays 2003-03-14 18:08:12 +04:00
unknown
a6597812a8 New fields in CHARSET_INFO structure to optimize searching for
binary and primary collations in the future
2003-03-05 16:43:10 +04:00
unknown
953e27208b New functions in CHARSET_INFO structure 2003-01-31 16:22:22 +04:00
unknown
ebcf0d33d2 New CHARSET_INFO function to compare strings regardless to trailing spaces 2003-01-31 13:48:35 +04:00
unknown
ee7c5f13fa New "fill" function in charset_info_st structure 2003-01-28 14:58:06 +04:00
unknown
e7660c64d7 wb_wc and wc_mb now checks length inside 2003-01-27 16:46:03 +04:00
unknown
4b75a129fc New scan() function in CHARSET_INFO structure (not used yet) 2003-01-17 18:14:54 +04:00
unknown
93419d23a3 All charsets now have strnxfrm.
Some function names have been renamed to be more self-descriptive
2003-01-15 18:06:07 +04:00
unknown
a10b6c3a06 Many files:
PRIMARY flag for built-in charsets


strings/ctype-big5.c:
  PRIMARY flag for built-in charsets
strings/ctype-bin.c:
  PRIMARY flag for built-in charsets
strings/ctype-euc_kr.c:
  PRIMARY flag for built-in charsets
strings/ctype-gb2312.c:
  PRIMARY flag for built-in charsets
strings/ctype-gbk.c:
  PRIMARY flag for built-in charsets
strings/ctype-sjis.c:
  PRIMARY flag for built-in charsets
strings/ctype-tis620.c:
  PRIMARY flag for built-in charsets
strings/ctype-ujis.c:
  PRIMARY flag for built-in charsets
strings/ctype-utf8.c:
  PRIMARY flag for built-in charsets
strings/ctype.c:
  PRIMARY flag for built-in charsets
2003-01-05 16:44:39 +04:00
unknown
782295137b Some changes to separate charset and collation terms 2003-01-04 14:12:20 +04:00
unknown
c8a50df16c Preparing for charset dependant int10_to_str 2002-12-11 12:30:05 +04:00
unknown
4b021e6ea9 Preparing to use better string-to-number functions to avoid c_ptr() call,
wich is slower and is not ucs2 compatible
2002-11-27 15:47:39 +04:00
unknown
5a264eb9a7 move like_range into CHARSET_INFO structure 2002-11-15 11:44:23 +04:00
unknown
e7bbe3aa0b New wildcmp() function in CHARSET_INFO structure 2002-11-14 16:07:29 +04:00
unknown
81d428bd5a Preparing to embed string to number conversion functions into charset structure 2002-11-13 17:13:29 +04:00
unknown
992075e209 New field snprintf() in CHARSET_INFO structure 2002-11-10 16:14:39 +04:00
unknown
72174d5b82 Move hash_sort and hash_caseup into CHARSET_INFO for all charsets 2002-10-10 16:52:22 +05:00