summaryrefslogtreecommitdiff
path: root/mysys/charset.c
Commit message (Collapse)AuthorAgeFilesLines
* Next part of merge. See TODO for detailsMichael Widenius2012-08-141-0/+11
|
* 5.3 mergeSergei Golubchik2012-01-131-1/+2
|\
| * Merge with 5.2.Michael Widenius2011-12-111-2/+4
| |\ | | | | | | | | | no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
| | * Merge with MariaDB 5.1Michael Widenius2011-11-241-2/+4
| | |\
| | | * Initail merge with MySQL 5.1 (XtraDB still needs to be merged)Michael Widenius2011-11-211-2/+4
| | | |\ | | | | | | | | | | | | | | | Fixed up copyright messages.
* | | | \ mysql-5.5.18 mergeSergei Golubchik2011-11-031-2/+2
|\ \ \ \ \
| * \ \ \ \ Updated/added copyright headersKent Boortz2011-06-301-2/+2
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | Updated/added copyright headersKent Boortz2011-06-301-2/+4
| | |\ \ \ \
* | | \ \ \ \ merge with 5.3Sergei Golubchik2011-10-191-0/+5
|\ \ \ \ \ \ \ | | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
| * | | | | | Rewritten patch of percona - switching query cache on and off, removing ↵unknown2011-05-181-0/+3
| | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | comments. client/mysqltest.cc: Column names. mysql-test/r/grant_cache_no_prot.result: fix of text. mysql-test/r/grant_cache_ps_prot.result: Fix of test. mysql-test/r/query_cache.result: Switching on and off query cache. mysql-test/t/query_cache.test: Switching on and off query cache. mysys/charset.c: Fix of parser. sql/handler.cc: thd added to parameters. sql/log_event.cc: thd added to parameters. sql/log_event_old.cc: thd added to parameters. sql/mysql_priv.h: Fixed functions definitions. sql/mysqld.cc: Comments stripping. sql/set_var.cc: Switching on and off query cache. sql/set_var.h: Switching on and off query cache. sql/share/errmsg.txt: New errors. sql/sql_cache.cc: Switching query cache on and off, removing comments. sql/sql_cache.h: thd added to parameters. sql/sql_class.h: Comments stripping. sql/sql_db.cc: thd added to parameters. sql/sql_lex.cc: lex fixed. sql/sql_parse.cc: thd added to parameters.
| * | | | | merge with 5.1Michael Widenius2010-11-301-0/+2
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | Fixed some compiler warningsMichael Widenius2010-11-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configure.in: Added comment mysql-test/suite/innodb_plugin/t/innodb_bug56680.test: Disable test when run with valgrind as we get errors from buf_buddy_relocate() on work for this test. (Should probably be investigated as this may be an issue in xtradb, but probably harmless) Work is an amd-64 running openSUSE 1.11 and valgrind 3.4.1 mysys/charset.c: Remove static function if not used (to remove compiler warning) storage/xtradb/srv/srv0srv.c: Added casts to get rid of compiler warnings
* | | | | | 5.5-mergeSergei Golubchik2011-07-021-7/+13
|\ \ \ \ \ \ | | |_|/ / / | |/| | | |
| * | | | | Bug #59884: setting charset to 2048 crashesGeorgi Kodinov2011-02-101-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The retrieval of a charset by number was not doing bounds checking before accessing the internal character sets array. Added checks for valid charset number. Added asserts for valid charset number to some of the internal functions. Removed one superfluous check for charset_number 0 (since the all_charsets_array[0] is set to 0 anyway) for uniformity. Test suite added.
* | | | | | merge.Sergei Golubchik2010-11-251-39/+36
|\ \ \ \ \ \ | |/ / / / / |/| / / / / | |/ / / / | | | | | | | | | | checkpoint. does not compile.
| * | | | Added extra argument to longlong2str() to make it have same prototype is ↵Michael Widenius2010-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | int2str() Changed to use longlong10_to_str() instead of longlong2str() when base is 10 or -10 as former is much faster than later Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit. client/mysqltest.cc: longlong2str() -> longlong10_to_str() include/m_string.h: Added extra argument to longlong2str() to make it have same prototype is int2str() mysys/charset.c: Fixed compiler warning mysys/mf_soundex.c: Fixed compiler warning mysys/my_getopt.c: longlong2str() -> longlong10_to_str() sql/create_options.cc: Fixed compiler warning sql/item_strfunc.cc: Added extra argument to longlong2str sql/opt_range.cc: longlong2str() -> longlong10_to_str() sql/partition_info.cc: longlong2str() -> longlong10_to_str() sql/slave.cc: longlong2str() -> longlong10_to_str() sql/sql_bitmap.h: Added extra argument to longlong2str sql/sql_partition.cc: Added extra argument to longlong2str sql/sql_select.cc: longlong2str() -> longlong10_to_str() sql/sql_show.cc: Added extra argument to longlong2str storage/innodb_plugin/handler/ha_innodb.cc: Update to new parameters for longlong2str() storage/maria/ma_dbug.c: longlong2str() -> longlong10_to_str() storage/maria/maria_chk.c: Added extra argument to longlong2str storage/myisam/mi_dbug.c: longlong2str() -> longlong10_to_str() storage/myisam/myisamchk.c: Added extra argument to longlong2str storage/xtradb/handler/ha_innodb.cc: Update to new parameters for longlong2str() strings/longlong2str.c: Added extra argument to longlong2str() to make it have same prototype is int2str() strings/my_vsnprintf.c: Changed my_vsnprintf() to use longlong2str instead of int2str() to get rid of warnings and to get support for long pointers even when long is 32 bit. Added cast to get rid of compiler warnings
| * | | | merge 5.1->5.2Sergei Golubchik2010-06-011-0/+8
| |\ \ \ \ | | |/ / /
| | * | | Merge MySQL 5.1.46 into MariaDB.unknown2010-04-281-0/+8
| | |\ \ \ | | | |/ / | | | | | | | | | | Still two test failures to be solved: main.myisam and main.subselect.
| * | | | mergedSergei Golubchik2010-03-151-54/+28
| |\ \ \ \ | | |/ / /
| | * | | Merge MySQL 5.1.44 into MariaDB.unknown2010-03-041-53/+27
| | |\ \ \
| * | | | | Applied Antony T Curtis patch for declaring many CHARSET objects as constMichael Widenius2010-01-061-38/+35
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed compiler warnings extra/libevent/epoll.c: Removed compiler warnings extra/libevent/evbuffer.c: Removed compiler warnings extra/libevent/event.c: Removed compiler warnings extra/libevent/select.c: Removed compiler warnings extra/libevent/signal.c: Removed compiler warnings include/m_ctype.h: Define CHARSET_INFO, MY_CHARSET_HANDLER, MY_COLLATION_HANDLER, MY_UNICASE_INFO, MY_UNI_CTYPE and MY_UNI_IDX as const structures. Declare that pointers point to const data include/m_string.h: Declare that pointers point to const data include/my_sys.h: Redefine variables and function prototypes include/mysql.h: Declare charset as const include/mysql.h.pp: Declare charset as const include/mysql/plugin.h: Declare charset as const include/mysql/plugin.h.pp: Declare charset as const mysys/charset-def.c: Charset can't be of type CHARSET_INFO as they are changed when they are initialized. mysys/charset.c: Functions that change CHARSET_INFO must use 'struct charset_info_st' Add temporary variables to not have to change all_charsets[] (Which now is const) sql-common/client.c: Added cast to const sql/item_cmpfunc.h: Added cast to avoid compiler error. sql/sql_class.cc: Added cast to const sql/sql_lex.cc: Added cast to const storage/maria/ma_ft_boolean_search.c: Added cast to avoid compiler error. storage/maria/ma_ft_parser.c: Added cast to avoid compiler error. storage/maria/ma_search.c: Added cast to const storage/myisam/ft_boolean_search.c: Added cast to avoid compiler error storage/myisam/ft_parser.c: Added cast to avoid compiler error storage/myisam/mi_search.c: Added cast to const storage/pbxt/src/datadic_xt.cc: Added cast to const storage/pbxt/src/ha_pbxt.cc: Added cast to const Removed compiler warning by changing prototype of XTThreadPtr() storage/pbxt/src/myxt_xt.h: Character sets should be const storage/pbxt/src/xt_defs.h: Character sets should be const storage/xtradb/btr/btr0cur.c: Removed compiler warning strings/conf_to_src.c: Added const Functions that change CHARSET_INFO must use 'struct charset_info_st' strings/ctype-big5.c: Made arrays const strings/ctype-bin.c: Made arrays const strings/ctype-cp932.c: Made arrays const strings/ctype-czech.c: Made arrays const strings/ctype-euc_kr.c: Made arrays const strings/ctype-eucjpms.c: Made arrays const strings/ctype-extra.c: Made arrays const strings/ctype-gb2312.c: Made arrays const strings/ctype-gbk.c: Made arrays const strings/ctype-latin1.c: Made arrays const strings/ctype-mb.c: Made arrays const strings/ctype-simple.c: Made arrays const strings/ctype-sjis.c: Made arrays const strings/ctype-tis620.c: Made arrays const strings/ctype-uca.c: Made arrays const strings/ctype-ucs2.c: Made arrays const strings/ctype-ujis.c: Made arrays const strings/ctype-utf8.c: Made arrays const strings/ctype-win1250ch.c: Made arrays const strings/ctype.c: Made arrays const Added cast to const Functions that change CHARSET_INFO must use 'struct charset_info_st' strings/int2str.c: Added cast to const
| * | | | Merge MySQL->MariaDBSergey Petrunya2009-09-081-16/+27
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Finished Monty and Jani's merge * Some InnoDB tests still fail (because it's old xtradb code run against newer testsuite). They are expected to go after mergning with the latest xtradb.
| * | | | | Added MY_CS_NONASCII marker for character sets that are not compatible with ↵Michael Widenius2009-07-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | latin1 for characters 0x00-0x7f This allows us to skip and speed up some very common character converts that MySQL is doing when sending data to the client and this gives us a nice speed increase for most queries that uses only characters in the range 0x00-0x7f. This code is based on Alexander Barkov's code that he has done in MySQL 6.0 include/m_ctype.h: Added MY_CS_NONASCII marker libmysqld/lib_sql.cc: Added function net_store_data(...) that takes to and from CHARSET_INFO * as arguments mysys/charset.c: Mark character sets with MY_CS_NONASCII scripts/mysql_install_db.sh: Fixed messages to refer to MariaDB instead of MySQL sql/protocol.cc: Added function net_store_data(...) that takes to and from CHARSET_INFO * as arguments sql/protocol.h: Added function net_store_data(...) that takes to and from CHARSET_INFO * as arguments sql/sql_string.cc: Quicker copy of strings with no characters above 0x7f strings/conf_to_src.c: Added printing of MY_CS_NONASCII strings/ctype-extra.c: Mark incompatible character sets with MY_CS_NONASCII Removed duplicated character set geostd strings/ctype-sjis.c: Mark incompatible character sets with MY_CS_NONASCII strings/ctype-uca.c: Mark incompatible character sets with MY_CS_NONASCII strings/ctype-ucs2.c: Mark incompatible character sets with MY_CS_NONASCII strings/ctype-utf8.c: Mark incompatible character sets with MY_CS_NONASCII strings/ctype.c: Added function to check if character set is compatible with latin1 in ranges 0x00-0x7f
* | | | | | Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabledDavi Arnaut2010-07-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Essentially, the problem is that safemalloc is excruciatingly slow as it checks all allocated blocks for overrun at each memory management primitive, yielding a almost exponential slowdown for the memory management functions (malloc, realloc, free). The overrun check basically consists of verifying some bytes of a block for certain magic keys, which catches some simple forms of overrun. Another minor problem is violation of aliasing rules and that its own internal list of blocks is prone to corruption. Another issue with safemalloc is rather the maintenance cost as the tool has a significant impact on the server code. Given the magnitude of memory debuggers available nowadays, especially those that are provided with the platform malloc implementation, maintenance of a in-house and largely obsolete memory debugger becomes a burden that is not worth the effort due to its slowness and lack of support for detecting more common forms of heap corruption. Since there are third-party tools that can provide the same functionality at a lower or comparable performance cost, the solution is to simply remove safemalloc. Third-party tools can provide the same functionality at a lower or comparable performance cost. The removal of safemalloc also allows a simplification of the malloc wrappers, removing quite a bit of kludge: redefinition of my_malloc, my_free and the removal of the unused second argument of my_free. Since free() always check whether the supplied pointer is null, redudant checks are also removed. Also, this patch adds unit testing for my_malloc and moves my_realloc implementation into the same file as the other memory allocation primitives. client/mysqldump.c: Pass my_free directly as its signature is compatible with the callback type -- which wasn't the case for free_table_ent.
* | | | | | Manual merge of mysql-trunk into mysql-trunk-merge.Alexey Kopytov2010-03-241-12/+74
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in client/mysqlbinlog.cc Text conflict in mysql-test/Makefile.am Text conflict in mysql-test/collections/default.daily Text conflict in mysql-test/r/mysqlbinlog_row_innodb.result Text conflict in mysql-test/suite/rpl/r/rpl_typeconv_innodb.result Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test Text conflict in mysql-test/suite/rpl/t/rpl_row_create_table.test Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test Text conflict in mysql-test/suite/rpl/t/rpl_typeconv_innodb.test Text conflict in mysys/charset.c Text conflict in sql/field.cc Text conflict in sql/field.h Text conflict in sql/item.h Text conflict in sql/item_func.cc Text conflict in sql/log.cc Text conflict in sql/log_event.cc Text conflict in sql/log_event_old.cc Text conflict in sql/mysqld.cc Text conflict in sql/rpl_utility.cc Text conflict in sql/rpl_utility.h Text conflict in sql/set_var.cc Text conflict in sql/share/Makefile.am Text conflict in sql/sql_delete.cc Text conflict in sql/sql_plugin.cc Text conflict in sql/sql_select.cc Text conflict in sql/sql_table.cc Text conflict in storage/example/ha_example.h Text conflict in storage/federated/ha_federated.cc Text conflict in storage/myisammrg/ha_myisammrg.cc Text conflict in storage/myisammrg/myrg_open.c
| * | | | | | Backporting WL#1213Alexander Barkov2010-02-241-4/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config/ac-macros/character_sets.m4: - Adding configure definitions for utf8mb4, utf16, utf32 include/config-win.h: - Enabling utf8mb4, utf16, utf32 in Windows build include/m_ctype.h: - Adding new flags - Adding new shared functions prototypes mysql-test/include/ctype_datetime.inc: - Adding test to check that datetime functions work with "real" multibyte character sets. mysql-test/include/ctype_like.inc: - Adding LIKE tests mysql-test/include/have_utf16.inc: New file mysql-test/include/have_utf32.inc: New file mysql-test/include/have_utf8mb4.inc: New file mysql-test/r/ctype_ldml.result: - Adding tests for utf8mb4, utf16, utf32 mysql-test/r/ctype_many.result: - Adding tests to check superset/subset relations between all Unicode character sets. mysql-test/r/ctype_utf16.result: New file mysql-test/r/ctype_utf16_uca.result: New file mysql-test/r/ctype_utf32.result: New file mysql-test/r/ctype_utf32_uca.result: New file mysql-test/r/ctype_utf8.result: - Adding tests for utf8mn3 alias mysql-test/r/ctype_utf8mb4.result: - Adding tests for utf8mb4 mysql-test/r/have_utf16.require: New file mysql-test/r/have_utf32.require: New file mysql-test/r/have_utf8mb4.require: New file mysql-test/std_data/Index.xml: - Adding tests for loadable utf8m4, utf16, utf32 collations mysql-test/suite/sys_vars/r/character_set_client_basic.result: - Adding tests for utf16, utf32. - Fixing new number of character sets mysql-test/suite/sys_vars/r/character_set_connection_basic.result: - Fixing new number of character sets mysql-test/suite/sys_vars/r/character_set_database_basic.result: - Fixing new number of character sets mysql-test/suite/sys_vars/r/character_set_filesystem_basic.result: - Fixing new number of character sets mysql-test/suite/sys_vars/r/character_set_results_basic.result: - Fixing new number of character sets mysql-test/suite/sys_vars/t/character_set_client_basic.test: - Adding tests for new character sets mysql-test/suite/sys_vars/t/character_set_connection_basic.test: - Adding dependency on utf8mb4, utf16, utf32 mysql-test/suite/sys_vars/t/character_set_database_basic.test: - Adding dependency on utf8mb4, utf16, utf32 mysql-test/suite/sys_vars/t/character_set_filesystem_basic.test: - Adding dependency on utf8mb4, utf16, utf32 mysql-test/suite/sys_vars/t/character_set_results_basic.test: - Adding dependency on utf8mb4, utf16, utf32 mysql-test/t/ctype_ldml.test: - Adding tests for dynamic utf8mb4, utf16, utf32 collations mysql-test/t/ctype_many.test: - Adding tests to check superset/subset relations between all Unicode character sets mysql-test/t/ctype_utf16.test: New file mysql-test/t/ctype_utf16_uca.test: New file mysql-test/t/ctype_utf32.test: New file mysql-test/t/ctype_utf32_uca.test: New file mysql-test/t/ctype_utf8.test: - Adding tests for utf8mb4 alias mysql-test/t/ctype_utf8mb4.test: New file mysys/charset-def.c: - Adding initialization of utf8mb4, utf16, utf32 built-int collations mysys/charset.c: - Adding initialization of utf8mb4, utf16, utf32 dynamic collations sql/field.cc: - Fixing "truncated" error with datetime functions: Force conversion in case of non-ascii character sets. sql/item.cc: - Adding superset/subset relation check for utf8mb4/utf8 sql/item_strfunc.cc: - Fixing a problem with CHAR(x USING utf32) sql/sql_string.cc: - Fixing problems with zero padding for UTF32 sql/sql_table.cc: - Fixing buffer size, to make utf32 comma fit. strings/ctype-mb.c: - Making handlers for multi-byte binary collations public strings/ctype-uca.c: - Adding definitions for utf8mb4, utf16, utf32 UCA collations strings/ctype-ucs2.c: - Adding functions which are shared between ucs2, utf16, utf32 - Ading utf16 implementation - Adding utf32 implementation strings/ctype-utf8.c: - Adding functions shared between utf8 and utf8mb4 - Adding implementation of utf8mb4
| * | | | | | Manual merge from mysql-next-mr.Alexander Nozdrin2009-12-171-8/+8
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - mysys/charset.c - mysys/my_thr_init.c
| | * \ \ \ \ \ Merge mysql-next-mr (revno 2936) --> mysql-next-mr-marcMarc Alff2009-12-111-0/+3
| | |\ \ \ \ \ \
| | * | | | | | | WL#2360 Performance schemaMarc Alff2009-12-091-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part III: mysys instrumentation
| * | | | | | | | Manual merge from mysql-trunk-merge.Alexander Nozdrin2009-12-161-53/+27
| |\ \ \ \ \ \ \ \ | | |_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: - include/my_no_pthread.h - mysql-test/r/sp-ucs2.result - sql/log.cc - sql/sql_acl.cc - sql/sql_yacc.yy
| * | | | | | | | Bug#47756 Setting 2byte collation ID with 'set names' crashes the serverAlexander Barkov2009-12-071-0/+3
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is not actually related to 2byte collation IDs. The same crash happens if you change the collation ID in mysql-test/str_data/Index.xml to a value smaller than 256. Crash happened in SQL parser, because the "ident_map" and "state_map" arrays were not initialized in loadable utf8 collations. Fix: adding proper initialization of the "ident_map" and "state_map" members for loadable utf8 collations.
* | | | | | | | Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.Alexey Kopytov2010-03-221-0/+2
|\ \ \ \ \ \ \ \ | | |_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test Text conflict in sql/item_func.cc
| * | | | | | | Bug #51976 LDML collations issue Alexander Barkov2010-03-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: caseup_multiply and casedn_multiply members were not initialized for a dynamic collation, so UPPER() and LOWER() functions returned empty strings. Fix: initializing the members properly. Adding tests: mysql-test/r/ctype_ldml.result mysql-test/t/ctype_ldml.test Applying the fix: mysys/charset.c
* | | | | | | | Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.Alexey Kopytov2010-03-071-0/+6
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Text conflict in .bzr-mysql/default.conf Text conflict in mysql-test/r/explain.result Text conflict in mysql-test/r/having.result Text conflict in mysql-test/suite/rpl/t/disabled.def Text conflict in mysql-test/suite/rpl/t/rpl_slave_skip.test Text conflict in storage/federated/ha_federated.cc
| * | | | | | | Workaround the pthread_once_t static initialization. Per theDavi Arnaut2010-02-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POSIX standard, reinitialization of a pthread_once is a gray area, but it is needed to support subsequent initializations of the client library. mysys/charset.c: Reinitialize a pthread_once_t variable.
| * | | | | | | Bug #45058 init_available_charsets uses double checked lockingStaale Smedseng2010-02-261-0/+5
| | |_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A client doing multiple mysql_library_init() and mysql_library_end() calls over the lifetime of the process may experience lost character set data, potentially even a SIGSEGV. This patch reinstates the reloading of character set data when a mysql_library_init() is done after a mysql_library_end().
* | | | | | | Auto-merge from mysql-trunk.Alexander Nozdrin2009-12-191-53/+27
|\ \ \ \ \ \ \ | | |_|/ / / / | |/| | | | |
| * | | | | | Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.Alexey Kopytov2009-12-161-53/+27
| |\ \ \ \ \ \ | | |/ / / / / | | | / / / / | | |/ / / / | |/| | | |
| | * | | | Bug#49134 5.1 server segfaults with 2byte collation fileAlexander Barkov2009-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: add_collation did not check that cs->number is smaller than the number of elements in the array all_charsets[], so server could crash when loading an Index.xml file with a collation ID greater the number of elements (for example when downgrading from 5.5). Fix: adding a condition to check that cs->number is not out of valid range.
| | * | | | Bug #45058 init_available_charsets uses double checked lockingStaale Smedseng2009-12-121-52/+25
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As documented in the bug report, the double checked locking pattern has inherent issues, and cannot guarantee correct initialization. This patch replaces the logic in init_available_charsets() with the use of pthread_once(3). A wrapper function, my_pthread_once(), is introduced and is used in lieu of direct calls to init_available_charsets(). Related defines MY_PTHREAD_ONCE_* are also introduced. For the Windows platform, the implementation in lp:sysbench is ported. For single-thread use, a simple define calls the function and sets the pthread_once control variable. Charset initialization is modified to use my_pthread_once(). include/my_no_pthread.h: Dummy my_pthread_once() for single thread use. include/my_pthread.h: Declaration for new function my_pthread_once(). mysys/charset.c: Logic in init_available_charsets() is simplified. Using my_pthread_once() for all calls to this func. mysys/my_winthread.c: Windows implementation of my_pthread_once().
* | | | | Backporting patch for Bug#47756Alexander Nozdrin2009-12-151-0/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from mysql-next-mr-bugfixing into mysql-trunk-bugfixing. NOTE: the "utf8_phone_ci" collation does not exist in mysql-trunk yet, so another collation with 2-byte collation ID is used: "utf8_test_ci". This patch will be null-merged to mysql-next-mr-bugfixing. Original revision: ------------------------------------------------------------ revision-id: bar@mysql.com-20091207121153-hs3bqbmr0719ws21 committer: Alexander Barkov <bar@mysql.com> branch nick: mysql-next-mr.b47756 timestamp: Mon 2009-12-07 16:11:53 +0400 message: Bug#47756 Setting 2byte collation ID with 'set names' crashes the server The problem is not actually related to 2byte collation IDs. The same crash happens if you change the collation ID in mysql-test/str_data/Index.xml to a value smaller than 256. Crash happened in SQL parser, because the "ident_map" and "state_map" arrays were not initialized in loadable utf8 collations. Fix: adding proper initialization of the "ident_map" and "state_map" members for loadable utf8 collations. ------------------------------------------------------------
* | | | Backporting WL#4164 Two-byte collation IDsAlexander Barkov2009-10-151-5/+5
| | | |
* | | | Backporting WL#3759 Optimize identifier conversion in client-server protocolAlexander Barkov2009-09-301-0/+3
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides performance improvements: - send_fields() when character_set_results = latin1 is now about twice faster for column/table/database names, consisting on ASCII characters. Changes: - Protocol doesn't use "convert" temporary buffer anymore, and converts strings directly to "packet". - General conversion optimization: quick conversion of ASCII strings was added. modified files: include/m_ctype.h - Adding a new flag. - Adding a new function prototype libmysqld/lib_sql.cc - Adding quick conversion method for embedded library: conversion is now done directly to result buffer, without using a temporary buffer. mysys/charset.c - Mark all dynamic ucs2 character sets as non-ASCII - Mark some dymamic 7bit and 8bit charsets as non-ASCII (for example swe7 is not fully ASCII compatible). sql/protocol.cc - Adding quick method to convert a string directly into protocol buffer, without using a temporary buffer. sql/protocol.h - Adding a new method prototype sql/sql_string.cc Optimization for conversion between two ASCII-compatible charsets: - quickly convert ASCII strings, switch to mc_wc->wc_mb method only when a non-ASCII character is met. - copy four ASCII characters at once on i386 strings/conf_to_src.c - Marking non-ASCII character sets with a flag. strings/ctype-extra.c - Regenerating ctype-extra.c by running "conf_to_src". strings/ctype-uca.c - Marking UCS2 character set as non-ASCII. strings/ctype-ucs2.c - Marking UCS2 character set as non-ASCII. strings/ctype.c - A new function to detect if a 7bit or 8bit character set is ascii compatible.
* | | Backport WL#3653 to 5.1 to enable bundled innodb plugin.Vladislav Vaintroub2009-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove custom DLL loader code from innodb plugin code, use symbols exported from mysqld. storage/innodb_plugin/handler/ha_innodb.cc: Remove a Win32 workaround for current_thd. The original problem that innodb plugin used value of TLS variable across DLL boundaries is solved in MySQL server (current_thd is a function not TLS variable now) storage/innodb_plugin/handler/handler0alter.cc: Remove custom delay loader storage/innodb_plugin/handler/handler0vars.h: Remove custom delay loader storage/innodb_plugin/handler/i_s.cc: Remove custom delay loader storage/innodb_plugin/handler/win_delay_loader.cc: Remove custom delay loader storage/innodb_plugin/plug.in: Remove commented out MYSQL_PLUGIN_STATIC, CMake would not parse that correctly
* | | Bug#42649 THR_LOCK_charset global mutex abused by InnoDBAlexander Barkov2009-04-071-15/+26
|/ / | | | | | | | | The patch was originally proposed by Mikael and reviewed by Bar.
* | Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-131-1/+1
|\ \ | |/ | | | | | | | | | | - Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
| * Merge mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-4.1-enginesunknown2007-10-241-0/+40
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into mysql.com:/home/svoj/devel/mysql/BUG31159/mysql-5.0-engines include/my_sys.h: Auto merged mysql-test/r/ctype_ucs.result: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysys/charset.c: Manual merge. sql/item_func.cc: Manual merge.
| | * BUG#31159 - fulltext search on ucs2 column crashes serverunknown2007-10-241-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ucs2 doesn't provide required by fulltext ctype array. Crash happens because fulltext attempts to use unitialized ctype array. Fixed by converting ucs2 fields to compatible utf8 analogue. include/my_sys.h: Added a function to find compatible character set with ctype array available. Currently used by fulltext search to find compatible substitute for ucs2 collations. mysql-test/r/ctype_ucs.result: A test case for BUG#31159. mysql-test/t/ctype_ucs.test: A test case for BUG#31159. mysys/charset.c: Added a function to find compatible character set with ctype array available. Currently used by fulltext search to find compatible substitute for ucs2 collations. sql/item_func.cc: Convert ucs2 fields to utf8. Fulltext requires ctype array, but ucs2 doesn't provide it.
* | | Bug#41084 full-text index added to custom UCA collation not workingAlexander Barkov2009-02-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Custom UCA collations didn't set the MY_CS_STRNXFRM flag, which resulted in "prefix_search" method instead of the required "seq_search". Problem2: (not metioned in the bug report) Custom UCA collations didn't also set the MY_CS_UNICODE flag, so an attempt to compare a column with a custom UCA collation to another column with a non-Unicode character set led to the "illegal mix of collation" error. Fix: the two missing flags was added into collation initialization. Upgrade: - All fulltext indexes with custom UCA collations should be rebuilt. - Non-fulltext custom UCA indexes should likely be rebuild as well.
* | | Fix for server bug experienced in Maria (wrong "Truncated incorrect <var_name>unknown2008-02-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | value" error even though the value was correct): a C function in my_getopt.c was taking bool* in parameter and was called from C++ sql_plugin.cc, but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny mismatches. Fixed, all other occurences of bool in C are removed, future ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool). client/mysqldump.c: my_bool for C client/mysqltest.c: my_bool for C extra/replace.c: my_bool for C include/my_getopt.h: my_bool for C include/my_global.h: Prevent people from using bool in C, it causes real bugs. include/my_sys.h: my_bool for C include/my_time.h: my_bool for C include/thr_lock.h: my_bool for C libmysql/libmysql.c: my_bool for C mysys/charset.c: my_bool for C mysys/my_getopt.c: my_bool for C mysys/queues.c: my_bool for C mysys/thr_lock.c: my_bool for C regex/reginit.c: my_bool for C sql/set_var.cc: C functions use my_bool so we must use my_bool too. sql/sql_plugin.cc: C functions use my_bool so we must use my_bool too. This fixes a real observed bug of Maria, because on some Mac OS X, sizeof(bool) is 1 in C and 4 in C++, so the bool* does wrong. Removing useless line. storage/heap/hp_update.c: my_bool for C storage/myisam/mi_check.c: my_bool for C storage/myisam/mi_dynrec.c: my_bool for C storage/myisam/mi_search.c: my_bool for C storage/myisam/mi_update.c: my_bool for C storage/myisam/mi_write.c: my_bool for C storage/myisam/myisamdef.h: my_bool for C storage/myisam/myisamlog.c: my_bool for C storage/myisam/myisampack.c: my_bool for C tests/mysql_client_test.c: my_bool for C unittest/mysys/bitmap-t.c: my_bool for C vio/viosslfactories.c: my_bool for C