summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
Commit message (Collapse)AuthorAgeFilesLines
* WL#2649 Number-to-string conversionsAlexander Barkov2010-02-111-29/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added: include/ctype_numconv.inc mysql-test/include/ctype_numconv.inc mysql-test/r/ctype_binary.result mysql-test/t/ctype_binary.test Adding tests modified: mysql-test/r/bigint.result mysql-test/r/case.result mysql-test/r/create.result mysql-test/r/ctype_cp1251.result mysql-test/r/ctype_latin1.result mysql-test/r/ctype_ucs.result mysql-test/r/func_gconcat.result mysql-test/r/func_str.result mysql-test/r/metadata.result mysql-test/r/ps_1general.result mysql-test/r/ps_2myisam.result mysql-test/r/ps_3innodb.result mysql-test/r/ps_4heap.result mysql-test/r/ps_5merge.result mysql-test/r/show_check.result mysql-test/r/type_datetime.result mysql-test/r/type_ranges.result mysql-test/r/union.result mysql-test/suite/ndb/r/ps_7ndb.result mysql-test/t/ctype_cp1251.test mysql-test/t/ctype_latin1.test mysql-test/t/ctype_ucs.test mysql-test/t/func_str.test Fixing tests @ sql/field.cc - Return str result using my_charset_numeric. - Using real multi-byte aware str_to_XXX functions to handle tricky charset values propely (e.g. UCS2) @ sql/field.h - Changing derivation of non-string field types to DERIVATION_NUMERIC. - Changing binary() for numeric/datetime fields to always return TRUE even if charset is not my_charset_bin. We need this to keep ha_base_keytype() return HA_KEYTYPE_BINARY. - Adding BINARY_FLAG into some fields, because it's not being set automatically anymore with "my_charset_bin to my_charset_numeric" change. - Changing derivation for numeric/datetime datatypes to a weaker value, to make "SELECT concat('string', field)" use character set of the string literal for the result of the function. @ sql/item.cc - Implementing generic val_str_ascii(). - Using max_char_length() instead of direct read of max_length to make "tricky" charsets like UCS2 work. NOTE: in the future we'll possibly remove all direct reads of max_length - Fixing Item_num::safe_charset_converter(). Previously it alligned binary string to character string (for example by adding leading 0x00 when doing binary->UCS2 conversion). Now it just converts from my_charset_numbner to "tocs". - Using val_str_ascii() in Item::get_time() to make UCS2 arguments work. - Other misc changes @ sql/item.h - Changing MY_COLL_CMP_CONV and MY_COLL_ALLOW_CONV to bit operations instead of hard-coded bit masks. - Addding new method DTCollation.set_numeric(). - Adding new methods to Item. - Adding helper functions to make code look nicer: agg_item_charsets_for_string_result() agg_item_charsets_for_comparison() - Changing charset for Item_num-derived items from my_charset_bin to my_charset_numeric (which is an alias for latin1). @ sql/item_cmpfunc.cc - Using new helper functions - Other misc changes @ sql/item_cmpfunc.h - Fixing strcmp() to return max_length=2. Previously it returned 1, which was wrong, because it did not fit '-1'. @ sql/item_func.cc - Using new helper functions - Other minor changes @ sql/item_func.h - Removing unused functions - Adding helper functions agg_arg_charsets_for_string_result() agg_arg_charsets_for_comparison() - Adding set_numeric() into constructors of numeric items. - Using fix_length_and_charset() and fix_char_length() instead of direct write to max_length. @ sql/item_geofunc.cc - Changing class for Item_func_geometry_type and Item_func_as_wkt from Item_str_func to Item_str_ascii_func, to make them return UCS2 result properly (when character_set_connection=ucs2). @ sql/item_geofunc.h - Changing class for Item_func_geometry_type and Item_func_as_wkt from Item_str_func to Item_str_ascii_func, to make them return UCS2 result properly (when @@character_set_connection=ucs2). @ sql/item_strfunc.cc - Implementing Item_str_func::val_str(). - Renaming val_str to val_str_ascii for some items, to make them work with UCS2 properly. - Using new helper functions - All single-argument functions that expect string result now call this method: agg_arg_charsets_for_string_result(collation, args, 1); This enables character set conversion to @@character_set_connection in case of pure numeric input. @ sql/item_strfunc.h - Introducing Item_str_ascii_func - for functions which return pure ASCII data, for performance purposes, as well as for the cases when the old implementation of val_str() was heavily 8-bit oriented and implementing a UCS2-aware version is tricky. @ sql/item_sum.cc - Using new helper functions. @ sql/item_timefunc.cc - Using my_charset_numeric instead of my_charset_bin. - Using fix_char_length(), fix_length_and_charset() and fix_length_and_charset_datetime() instead of direct write to max_length. - Using tricky-charset aware function str_to_time_with_warn() @ sql/item_timefunc.h - Using new helper functions for charset and length initialization. - Changing base class for Item_func_get_format() to make it return UCS2 properly (when character_set_connection=ucs2). @ sql/item_xmlfunc.cc - Using new helper function @ sql/my_decimal.cc - Adding a new DECIMAL to CHAR converter with real multibyte support (e.g. UCS2) @ sql/mysql_priv.h - Introducing a new derivation level for numeric/datetime data types. - Adding macros for my_charset_numeric and MY_REPERTOIRE_NUMERIC. - Adding prototypes for str_set_decimal() - Adding prototypes for character-set aware str_to_xxx() functions. @ sql/protocol.cc - Changing charsetnr to "binary" client-side metadata for numeric/datetime data types. @ sql/time.cc - Adding to_ascii() helper function, to convert a string in any character set to ascii representation. In the future can be extended to understand digits written in various non-Latin word scripts. - Adding real multy-byte character set aware versions for str_to_XXXX, to make these these type of queries work correct: INSERT INTO t1 SET datetime_column=ucs2_expression; @ strings/ctype-ucs2.c - endptr was not calculated correctly. INSERTing of UCS2 values into numeric columns returned warnings about truncated wrong data.
* Manual merge from mysql-trunk-merge.Alexander Nozdrin2010-01-311-2/+2
|\ | | | | | | | | | | | | | | | | Conflicts: - mysql-test/suite/rpl/r/rpl_binlog_grant.result - mysql-test/suite/rpl/r/rpl_sp.result - mysql-test/suite/rpl/t/rpl_binlog_grant.test - sql/sql_parse.cc - sql/sql_table.cc - sql/sql_test.cc
| * Fix for compiler warnings:Davi Arnaut2010-01-281-2/+2
| | | | | | | | | | | | | | Rename method as to not hide a base. Reorder attributes initialization. Remove unused variable. Rework code to silence a warning due to assignment used as truth value.
* | Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.Alexey Kopytov2009-12-111-1/+12
|\ \ | |/
| * Bug#49141: Encode function is significantly slower in 5.1 compared to 5.0Davi Arnaut2009-12-041-1/+12
| | | | | | | | | | | | | | | | | | | | | | The problem was that the multiple evaluations of a ENCODE or DECODE function within a single statement caused the random generator to be reinitialized at each evaluation, even though the parameters were constants. The solution is to initialize the random generator only once if the password (seed) parameter is constant. This patch borrows code and ideas from Georgi Kodinov's patch.
* | manual merge: mysql-5.1-rep+2-delivery1 --> mysql-5.1-rpl-mergeLuis Soares2009-10-221-0/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts ========= Text conflict in .bzr-mysql/default.conf Text conflict in libmysqld/CMakeLists.txt Text conflict in libmysqld/Makefile.am Text conflict in mysql-test/collections/default.experimental Text conflict in mysql-test/extra/rpl_tests/rpl_row_sp006.test Text conflict in mysql-test/suite/binlog/r/binlog_tmp_table.result Text conflict in mysql-test/suite/rpl/r/rpl_loaddata.result Text conflict in mysql-test/suite/rpl/r/rpl_loaddata_fatal.result Text conflict in mysql-test/suite/rpl/r/rpl_row_create_table.result Text conflict in mysql-test/suite/rpl/r/rpl_row_sp006_InnoDB.result Text conflict in mysql-test/suite/rpl/r/rpl_stm_log.result Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_circular_simplex.result Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_sp006.result Text conflict in mysql-test/t/mysqlbinlog.test Text conflict in sql/CMakeLists.txt Text conflict in sql/Makefile.am Text conflict in sql/log_event_old.cc Text conflict in sql/rpl_rli.cc Text conflict in sql/slave.cc Text conflict in sql/sql_binlog.cc Text conflict in sql/sql_lex.h 21 conflicts encountered. NOTE ==== mysql-5.1-rpl-merge has been made a mirror of mysql-next-mr: - "mysql-5.1-rpl-merge$ bzr pull ../mysql-next-mr" This is the first cset (merge/...) committed after pulling from mysql-next-mr.
| * | WL#5016: Fix header file include guardsMats Kindahl2009-09-231-0/+4
| |/ | | | | | | Adding header include file guards to files that are missing such.
* | WL#4584 Internationalized number formatAlexander Barkov2009-10-051-1/+6
|/ | | | | | | | | | | | | | | | | | | | | | | @ mysql-test/r/func_str.result Adding tests @ mysql-test/t/func_str.test Adding tests @ mysql-test/t/variables.test Fixing error number @ sql/item_create.cc Allowing 2 and 3 arguments to format() @ sql/item_strfunc.cc Adding new formatting code. @ sql/item_strfunc.h Adding new contructors and "locale" member @ sql/mysql_priv.h Adding number formatting members into MY_LOCALE @ sql/sql_locale.cc Adding number formatting data into locale constants @ sql/set_var.cc Using new error message @ sql/share/errmgs.txt Adding new error message
* Manual merge.Alexey Kopytov2009-06-011-2/+2
|\
| * Bug #44767: invalid memory reads in password() and Alexey Kopytov2009-05-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | old_password() functions The PASSWORD() and OLD_PASSWORD() functions could lead to memory reads outside of an internal buffer when used with BLOB arguments. String::c_ptr() assumes there is at least one extra byte in the internally allocated buffer when adding the trailing '\0'. This, however, may not be the case when a String object was initialized with externally allocated buffer. The bug was fixed by adding an additional "length" argument to make_scrambled_password_323() and make_scrambled_password() in order to avoid String::c_ptr() calls for PASSWORD()/OLD_PASSWORD(). However, since the make_scrambled_password[_323] functions are a part of the client library ABI, the functions with the new interfaces were implemented with the 'my_' prefix in their names, with the old functions changed to be wrappers around the new ones to maintain interface compatibility.
* | merged bug 35087 to 5.1-bugteamGeorgi Kodinov2009-04-171-3/+12
|\ \ | |/
| * Bug #35087: Inserting duplicate values at one time with DES_ENCRYPT leads Georgi Kodinov2009-04-171-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to wrong results 3 problems found with DES_ENCRYPT/DES_DECRYPT : 1. The max length was not calculated properly. Fixed in fix_length_and_dec() 2. DES_ENCRYPT had a side effect of sometimes reallocating and changing the value of its argument. Fixed by explicitly pre-allocating the necessary space to pad the argument with trailing '*' (stars) when calculating the DES digest. 3. in DES_ENCRYPT the string buffer for the result value was not reallocated to the correct size and only string length was assigned to it. Fixed by making sure there's enough space to hold the result.
| * Bug#29125 Windows Server X64: so many compiler warningsIgnacio Galarza2009-02-101-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
| * bug#35558 Wrong server metadata blows up the clientSergey Glukhov2008-12-091-2/+3
| | | | | | | | | | the problem: FORMAT func max_length value was calculated incorrectly the fix: correct calculation of max_length
| * Merge bk-internal.mysql.com:/home/bk/mysql-5.0cmiller@zippy.cornsilk.net2007-11-161-3/+3
| |\ | | | | | | | | | into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
* | | Fix for Bug#30217: Views: changes in metadata behaviouranozdrin/alik@quad.2008-02-221-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | between 5.0 and 5.1. The problem was that in the patch for Bug#11986 it was decided to store original query in UTF8 encoding for the INFORMATION_SCHEMA. This approach however turned out to be quite difficult to implement properly. The main problem is to preserve the same IS-output after dump/restore. So, the fix is to rollback to the previous functionality, but also to fix it to support multi-character-set-queries properly. The idea is to generate INFORMATION_SCHEMA-query from the item-tree after parsing view declaration. The IS-query should: - be completely in UTF8; - not contain character set introducers. For more information, see WL4052.
* | | Merge ramayana.hindu.god:/home/tsmith/m/bk/51tsmith@ramayana.hindu.god2007-12-051-1/+6
|\ \ \ | | | | | | | | | | | | into ramayana.hindu.god:/home/tsmith/m/bk/maint/51-merge
| * \ \ Merge mysql.com:/home/ram/work/b31349/b31349.5.0ramil/ram@ramil.myoffice.izhnet.ru2007-10-231-1/+6
| |\ \ \ | | |/ / | | | | | | | | into mysql.com:/home/ram/work/b31349/b31349.5.1
| | * | Fix for bug #31349: ERROR 1062 (23000): Duplicate entry '' for key 'group_key'ramil/ram@mysql.com/ramil.myoffice.izhnet.ru2007-10-191-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: lying to the optimizer that a function (Item_func_inet_ntoa) cannot return NULL values leads to unexpected results (in the case group keys creation/comparison is broken). Fix: Item_func_inet_ntoa::maybe_null should be set properly.
* | | | Merge mysql.com:/home/hf/work/31758/my50-31758holyfoot/hf@hfmain.(none)2007-11-051-2/+3
|\ \ \ \ | | |_|/ | |/| | | | | | into mysql.com:/home/hf/work/31758/my51-31758
| * | | Merge mysql.com:/home/hf/work/31758/my41-31758holyfoot/hf@hfmain.(none)2007-11-051-2/+3
| |\ \ \ | | | | | | | | | | | | | | | into mysql.com:/home/hf/work/31758/my50-31758
| | * | | Bug #31758 inet_ntoa, oct crashes server with null+filesortholyfoot/hf@mysql.com/hfmain.(none)2007-10-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_func_inet_ntoa and Item_func_conv inherit 'maybe_null' flag from an argument, which is wrong. Both can be NULL with notnull arguments, so that's fixed.
* | | | | Merge polly.(none):/home/kaa/src/opt/bug28550/my50-bug28550kaa@polly.(none)2007-10-211-1/+1
|\ \ \ \ \ | |/ / / / | | | | | | | | | | into polly.(none):/home/kaa/src/opt/bug28550/my51-bug28550
| * | | | Bug #28550 "Potential bugs related to the return type of the CHAR function".kaa@polly.(none)2007-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since, as of MySQL 5.0.15, CHAR() arguments larger than 255 are converted into multiple result bytes, a single CHAR() argument can now take up to 4 bytes. This patch fixes Item_func_char::fix_length_and_dec() to take this into account. This patch also fixes a regression introduced by the patch for bug21513. As now we do not always have the 'name' member of Item set for Item_hex_string and Item_bin_string, an own print() method has been added to Item_hex_string so that it could correctly be printed by Item_func::print_args().
* | | | | Merge mysql.com:/home/gluh/MySQL/Merge/5.0-optgluh@eagle.(none)2007-10-111-1/+0
|\ \ \ \ \ | |/ / / / | | | / / | |_|/ / |/| | | into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
| * | | Bug#30981 CHAR(0x41 USING ucs2) doesn't add leading zerogluh@mysql.com/eagle.(none)2007-10-111-1/+0
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Bug#30982 CHAR(..USING..) can return a not-well-formed string Bug#30986 Character set introducer followed by a HEX string can return bad result check_well_formed_result moved to Item from Item_str_func fixed Item_func_char::val_str for proper ucs symbols converting added check for well formed strings for correct conversion of constants with underscore charset
* | | Merge bk-internal.mysql.com:/home/bk/mysql-5.1monty@narttu.mysql.fi2007-08-141-16/+3
|\ \ \ | | | | | | | | | | | | into mysql.com:/home/my/mysql-5.1
| * | | Fixed a lot of compiler warnings and errors detected by Forte C++ on Solarismonty@mysql.com/nosik.monty.fi2007-08-131-16/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Faster thr_alarm() Added 'Opened_files' status variable to track calls to my_open() Don't give warnings when running mysql_install_db Added option --source-install to mysql_install_db I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems index_read() -> index_read_map() index_read_idx() -> index_read_idx_map() index_read_last() -> index_read_last_map()
* | | | Merge mysql.com:/home/hf/work/29878/my50-29878holyfoot/hf@hfmain.(none)2007-07-271-0/+4
|\ \ \ \ | |/ / / |/| / / | |/ / into mysql.com:/home/hf/work/29878/my51-29878
| * | Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.holyfoot/hf@mysql.com/hfmain.(none)2007-07-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item_func_user doesn't calculate anything in it's val_str() method, just returns saved str_value. Though Item::save_in_field method can destroy str_value, relying on val_str() return. As a result we get the garbage stored in field. We cannot use Item::save_in_field implementation for Item_func_user, reimplement it in simpler way.
* | | Merge dator6.(none):/home/mikael/mysql_clones/clean-mysql-5.1mikael@dator6.(none)2007-06-131-14/+0
|\ \ \ | | | | | | | | | | | | into dator6.(none):/home/mikael/mysql_clones/bug18198
| * \ \ Merge mronstrom@bk-internal.mysql.com:/home/bk/mysql-5.1mikron@mikael-ronstr-ms-dator.local2007-04-041-14/+0
| |\ \ \ | | | | | | | | | | | | | | | into mikael-ronstr-ms-dator.local:/Users/mikron/mysql_clones/bug18198
| | * | | Reapplied patch for bug18198mikron@mikael-ronstr-ms-dator.local2007-04-041-14/+0
| | | | |
* | | | | WL#3817: Simplify string / memory area types and make things more consistent ↵monty@mysql.com/narttu.mysql.fi2007-05-101-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (first part) The following type conversions was done: - Changed byte to uchar - Changed gptr to uchar* - Change my_string to char * - Change my_size_t to size_t - Change size_s to size_t Removed declaration of byte, gptr, my_string, my_size_t and size_s. Following function parameter changes was done: - All string functions in mysys/strings was changed to use size_t instead of uint for string lengths. - All read()/write() functions changed to use size_t (including vio). - All protocoll functions changed to use size_t instead of uint - Functions that used a pointer to a string length was changed to use size_t* - Changed malloc(), free() and related functions from using gptr to use void * as this requires fewer casts in the code and is more in line with how the standard functions work. - Added extra length argument to dirname_part() to return the length of the created string. - Changed (at least) following functions to take uchar* as argument: - db_dump() - my_net_write() - net_write_command() - net_store_data() - DBUG_DUMP() - decimal2bin() & bin2decimal() - Changed my_compress() and my_uncompress() to use size_t. Changed one argument to my_uncompress() from a pointer to a value as we only return one value (makes function easier to use). - Changed type of 'pack_data' argument to packfrm() to avoid casts. - Changed in readfrm() and writefrom(), ha_discover and handler::discover() the type for argument 'frmdata' to uchar** to avoid casts. - Changed most Field functions to use uchar* instead of char* (reduced a lot of casts). - Changed field->val_xxx(xxx, new_ptr) to take const pointers. Other changes: - Removed a lot of not needed casts - Added a few new cast required by other changes - Added some cast to my_multi_malloc() arguments for safety (as string lengths needs to be uint, not size_t). - Fixed all calls to hash-get-key functions to use size_t*. (Needed to be done explicitely as this conflict was often hided by casting the function to hash_get_key). - Changed some buffers to memory regions to uchar* to avoid casts. - Changed some string lengths from uint to size_t. - Changed field->ptr to be uchar* instead of char*. This allowed us to get rid of a lot of casts. - Some changes from true -> TRUE, false -> FALSE, unsigned char -> uchar - Include zlib.h in some files as we needed declaration of crc32() - Changed MY_FILE_ERROR to be (size_t) -1. - Changed many variables to hold the result of my_read() / my_write() to be size_t. This was needed to properly detect errors (which are returned as (size_t) -1). - Removed some very old VMS code - Changed packfrm()/unpackfrm() to not be depending on uint size (portability fix) - Removed windows specific code to restore cursor position as this causes slowdown on windows and we should not mix read() and pread() calls anyway as this is not thread safe. Updated function comment to reflect this. Changed function that depended on original behavior of my_pwrite() to itself restore the cursor position (one such case). - Added some missing checking of return value of malloc(). - Changed definition of MOD_PAD_CHAR_TO_FULL_LENGTH to avoid 'long' overflow. - Changed type of table_def::m_size from my_size_t to ulong to reflect that m_size is the number of elements in the array, not a string/memory length. - Moved THD::max_row_length() to table.cc (as it's not depending on THD). Inlined max_row_length_blob() into this function. - More function comments - Fixed some compiler warnings when compiled without partitions. - Removed setting of LEX_STRING() arguments in declaration (portability fix). - Some trivial indentation/variable name changes. - Some trivial code simplifications: - Replaced some calls to alloc_root + memcpy to use strmake_root()/strdup_root(). - Changed some calls from memdup() to strmake() (Safety fix) - Simpler loops in client-simple.c
* | | | | Merge moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.0-optevgen@moonbone.local2007-04-211-1/+1
|\ \ \ \ \ | | |_|/ / | |/| | | | | | | | into moonbone.local:/mnt/gentoo64/work/bk-trees/mysql-5.1-opt
| * | | | Bug #27530:gkodinov/kgeorge@magare.gmz2007-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function CRC32() returns unsigned integer. But the metadata (the unsigned flag) for the function was set incorrectly. As a result type arithmetics based on the function's metadata (like finding the concise type of an temporary table column to hold the result) returned incorrect results. Fixed by returning correct type information. This fix is based on code contributed by Martin Friebe (martin@hybyte.com) on 2007-03-30.
* | | | | Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with ↵gluh@mysql.com/eagle.(none)2007-04-031-2/+2
| |/ / / |/| | | | | | | | | | | multi-byte
* | | | Merge mysql.com:/home/hf/work/mrg/mysql-5.0-optholyfoot/hf@hfmain.(none)2007-03-081-1/+5
|\ \ \ \ | |/ / / | | / / | |/ / |/| | into mysql.com:/home/hf/work/mrg/mysql-5.1-opt
| * | Bug #26537: item_unhex() was not expected gkodinov/kgeorge@magare.gmz2007-03-021-1/+5
| | | | | | | | | | | | | | | | | | | | | to return NULL for non-NULL arguments. This is not the case as it can return NULL for invalid hexidecimal strings. Fixed by setting the maybe_null flag.
| * | Merge moonbone.local:/work/latest-4.1-opt-mysqlevgen@moonbone.local2007-01-121-3/+8
| |\ \ | | |/ | | | | | | into moonbone.local:/work/latest-5.0-opt-mysql
| | * Bug#23409: Arguments of the ENCODE() and the DECODE() functions were not printedevgen@moonbone.local2007-01-111-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | correctly. The Item_func::print method was used to print the Item_func_encode and the Item_func_decode objects. The last argument to ENCODE and DECODE functions is a plain C string and thus Item_func::print wasn't able to print it. The print() method is added to the Item_func_encode class. It correctly prints the Item_func_encode and the Item_func_decode objects.
| | * Merge siva.hindu.god:/usr/home/tim/m/bk/b20536-41tsmith/tim@siva.hindu.god2006-08-231-4/+22
| | |\ | | | | | | | | | | | | into siva.hindu.god:/usr/home/tim/m/bk/41
* | | \ Merge mysql.com:/home/kent/bk/main/mysql-5.0kent@kent-amd64.(none)2006-12-231-2/+1
|\ \ \ \ | |/ / / | | | | | | | | into mysql.com:/home/kent/bk/main/mysql-5.1
| * | | Many files:kent@mysql.com/kent-amd64.(none)2006-12-231-2/+1
| | | | | | | | | | | | | | | | Changed header to GPL version 2 only
* | | | Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtimemalff/marcsql@weblab.(none)2006-11-161-13/+5
|\ \ \ \ | | | | | | | | | | | | | | | into weblab.(none):/home/marcsql/TREE/mysql-5.1-22684
| * | | | Bug#22684 (BENCHMARK, ENCODE, DECODE and FORMAT are not real functions)malff/marcsql@weblab.(none)2006-11-161-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, the functions BENCHMARK, ENCODE, DECODE and FORMAT could only accept a constant for some parameters. After this change, this restriction has been removed. An implication is that these functions can also be used in prepared statements. The change consist of changing the following classes: - Item_func_benchmark - Item_func_encode - Item_func_decode - Item_func_format to: - only accept Item* in the constructor, - and evaluate arguments during calls to val_xxx() which fits the general design of all the other functions. The 'TODO' items identified in item_create.cc during the work done for Bug 21114 are addressed by this fix, as a natural consequence of aligning the design. In the 'func_str' test, a single very long test line involving an explain extended select with many functions has been rewritten into multiple separate tests, to improve maintainability. The result of explain extended select decode(encode(...)) has changed, since the encode and decode functions now print all their parameters.
* | | | | Merge moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.0-bug17047kroki/tomash@moonlight.intranet2006-11-161-3/+3
|\ \ \ \ \ | |/ / / / |/| / / / | |/ / / into moonlight.intranet:/home/tomash/src/mysql_ab/mysql-5.1-bug17047
| * | | Add 5.0 part of fix for bug 17047.kroki/tomash@moonlight.intranet2006-11-161-3/+3
| | | |
| * | | Merge shellback.(none):/home/msvensson/mysql/mysql-5.0msvensson@shellback.(none)2006-08-311-8/+1
| |\ \ \ | | | | | | | | | | | | | | | into shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
| | * \ \ Merge bk-internal.mysql.com:/home/bk/mysql-5.0kostja@bodhi.local2006-08-301-8/+1
| | |\ \ \ | | | | | | | | | | | | | | | | | | into bodhi.local:/opt/local/work/mysql-5.0-14897