summaryrefslogtreecommitdiff
path: root/mysql-test/r/case.result
Commit message (Collapse)AuthorAgeFilesLines
* Create 'main' test directory and move 't' and 'r' thereMichael Widenius2018-03-291-546/+0
|
* Merge branch '10.2' into 10.3Sergei Golubchik2018-03-281-1/+34
|\
| * MDEV-11839 move value caching from get_datetime_value to fix_fields timeSergei Golubchik2018-03-141-0/+34
| | | | | | | | | | | | | | | | | | Refactor get_datetime_value() not to create Item_cache_temporal(), but do it always in ::fix_fields() or ::fix_length_and_dec(). Creating items at the execution time doesn't work very well with virtual columns and check constraints that are fixed and executed in different THDs.
* | Merge remote-tracking branch 'origin/10.2' into bb-10.2-extAlexander Barkov2017-10-301-0/+16
|\ \ | |/
| * Merge branch '10.1' into 10.2Sergei Golubchik2017-10-241-0/+16
| |\
| | * Merge branch '10.0' into 10.1Sergei Golubchik2017-10-221-0/+16
| | |\
| | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2017-10-171-0/+16
| | | |\
| | | | * Bug#19875294 ASSERTION `SRC' FAILED IN MY_STRNXFRM_UNICODE (SIG 6 ↵Tor Didriksen2017-08-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -STRINGS/CTYPE-UTF8.C:5151) Backport from 5.7 to 5.5 Field_set::val_str() should return String("", 0, cs) rather than String(NULL, 0, cs)
| | | | * Bug#54916 GROUP_CONCAT + IFNULL truncates outputAlexander Barkov2010-08-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: a few functions did not calculate their max_length correctly. This is an after-fix for WL#2649 Number-to-string conversions". Fix: changing the buggy functions to calculate max_length using fix_char_length() introduced in WL#2649, instead of setting max_length directly mysql-test/include/ctype_numconv.inc Adding new tests mysql-test/r/ctype_binary.result Adding new tests mysql-test/r/ctype_cp1251.result Adding new tests mysql-test/r/ctype_latin1.result Adding new tests mysql-test/r/ctype_ucs.result Adding new tests mysql-test/r/ctype_utf8.result Adding new tests mysql-test/t/ctype_utf8.test Including ctype_numconv sql/item.h - Introducing new method fix_char_length_ulonglong(), for the cases when length is potentially greater than UINT_MAX32. This method removes a few instances of duplicate code, e.g. in item_strfunc.cc. - Setting collation in Item_copy properly. This change fixes wrong metadata on client side in some cases, when "binary" instead of the real character set was reported. sql/item_cmpfunc.cc - Using fix_char_length() and max_char_length() methods, instead of direct access to max_length, to calculate item length properly. - Moving count_only_length() in COALESCE after agg_arg_charsets_for_string_result(). The old order was incorrect and led to wrong length calucation in case of multi-byte character sets. sql/item_func.cc Fixing that count_only_length() didn't work properly for multi-byte character sets. Using fix_char_length() and max_char_length() instead of direct access to max_length. sql/item_strfunc.cc - Using fix_char_length(), fix_char_length_ulonglong(), max_char_length() instead of direct access to max_length. - Removing wierd condition: "if (collation.collation->mbmaxlen > 0)", which is never FALSE.
| | | | * WL#2649 Number-to-string conversionsAlexander Barkov2010-02-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| | | | * Fix for Bug#32538: View definition picks up character set,anozdrin/alik@quad.2008-02-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | but not collation. The problem here was that text literals in a view were always dumped with character set introducer. That lead to loosing collation information. The fix is to dump character set introducer only if it was in the original query. That is now possible because there is no problem any more of loss of character set of string literals in views -- after WL#4052 the view is dumped in the original character set.
| | | | * Merge mysql.com:/home/ram/work/b30782/b30782.5.0ramil/ram@ramil.myoffice.izhnet.ru2007-10-291-1/+19
| | | | |\ | | | | | | | | | | | | | | | | | | into mysql.com:/home/ram/work/b30782/b30782.5.1
| | | | | * Fix for bug #30782: Truncated UNSIGNED BIGINT columns only in SELECT w/ CASE, ramil/ram@mysql.com/ramil.myoffice.izhnet.ru2007-10-291-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JOIN, and ORDER BY Problem: improper maximum length calculation of the CASE function leads to decimal value truncation (storing/retrieving decimal field values). Fix: accurately calculate maximum length/unsigned flag/decimals parameters of the CASE function.
| | | | * | BUG#14940 "MySQL choose wrong index", v.2sergefp@mysql.com2006-07-281-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make the range-et-al optimizer produce E(#table records after table condition is applied), - Make the join optimizer use this value, - Add "filtered" column to EXPLAIN EXTENDED to show fraction of records left after table condition is applied - Adjust test results, add comments
| | | | * | type_newdecimal.result, case.result:kent@mysql.com2006-05-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Adjusted merge
| | | | * | Merge mysql.com:/data0/mysqldev/my/tmp_mergekent@mysql.com2006-05-171-1/+1
| | | | |\ \ | | | | | |/ | | | | | | | | | | | | into mysql.com:/tmp/mysql-5.1-new
| | | | | * Bug#17048 CREATE TABLE ... SELECT truncate valuesgluh@eagle.intranet.mysql.r18.ru2006-05-131-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | remove initialization of unsigned_flag for Item_decimal
| | | | * | Merge mysql.com:/home/elkin/MySQL/BARE/5.0aelkin@mysql.com2006-04-251-0/+8
| | | | |\ \ | | | | | |/ | | | | | | | | | | | | into mysql.com:/home/elkin/MySQL/MERGE/5.1-new
| | | | | * Merge mysql.com:/usr/local/mysql/mysql-4.1knielsen@mysql.com2006-04-241-0/+8
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | into mysql.com:/usr/local/mysql/mysql-5.0-mtr-fix
| | | | | | * Fix for bug #17896: MIN of CASE WHEN returns non-minimum value!ramil@mysql.com2006-03-061-0/+8
| | | | | | |
| | | | * | | Merge neptunus.(none):/home/msvensson/mysql/bug10460/my51-bug10460msvensson@neptunus.(none)2006-03-061-19/+19
| | | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | into neptunus.(none):/home/msvensson/mysql/mysql-5.1
| | | | | * | | Bug#10460 SHOW CREATE TABLE uses inconsistent upper/lower casemsvensson@neptunus.(none)2006-02-221-19/+19
| | | | | |/ /
| | | | * | | This patch cleans up two tests which were a bit fragile from other failing ↵brian@zim.(none)2006-02-241-1/+1
| | | | |/ / | | | | | | | | | | | | | | | | | | tests. It also removes some variables associated with removed RAID support.
| | | | * | Fixed BUG#12589: Assert when creating temp. table from decimal storedpem@mysql.com2005-09-271-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | procedure variable Second version, after review. Keep the unsigned_flag in Item_decimal updated. Note that this also changed the result of several old test results - creating tables from decimal templates now gives unsigned columns and different sizes. (Several tests had Length > Max_length before.)
| | | | * | Mergesergefp@mysql.com2005-06-231-0/+15
| | | | |\ \ | | | | | |/
| | | | | * Fix for BUG#10151: In Item_func_case::find_item don't assume that parameter ↵sergefp@mysql.com2005-06-201-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | str != &(this->str_value)
| | | | | * 1. Item now uses my_charset_bin by default,bar@mysql.com2005-01-181-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not default_charset_into. It fixes the problem that in some cases numbers where treated as CHAR(N), not as BINARY(N), e.g. wrong 'charsetnr' when sent to the client side. 2. IFNULL didn't aggregate argument charsets and collations, so IFNULL(1,'a') produced a CHAR(N). Now produces a BINARY(N). 3. SELECT PROCEDURE ANALIZE now returns BINARY columns, which is much better than it worked previously: CHAR with the default character set. But in the future it's worth to fix the fields 'Field_name' and 'Optimal_fieldtype' to use UTF8, and 'Min_value' and 'Max_value' to inherit their charsets from the original items. But it is not important, and BINARY(N) is OK for now. 4. Tests were fixed accordingly. No new tests were made, as the old onces cover everything.
| | | | * | item_func.h:igor@igor-inspiron.creware.com2005-06-021-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed bug #9939: a wrong conversion of arguments for functions COALESCE and IFNULL. The str_op virtual method was added into Item_func_numhybrid. item_func.cc: Fixed bug #9939: a wrong conversion of arguments for functions COALESCE and IFNULL. The str_op virtual method was added into Item_func_numhybrid. item_cmpfunc.h, item_cmpfunc.cc: Fixed bug #9939: a wrong conversion of arguments for functions COALESCE and IFNULL. Item_func_coalesce and Item_func_ifnull now inherit from a modified Item_func_numhybrid. case.test, case.result: Added test cases for bug #9939.
| | | | * | Tests and results fixed with last precision/decimal related modificationsholyfoot@hf-ibm.(none)2005-05-061-5/+5
| | | | | |
| | | | * | Precision Math implementationhf@deer.(none)2005-02-091-9/+15
| | | | | |
| | | | * | After-merge clean-upbar@mysql.com2005-01-181-6/+6
| | | | | |
| | | | * | Update results for new varchar handlingmonty@mysql.com2004-12-071-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed compiler warnings String results in CREATE ... SELECT are now created as CHAR(0), VARCHAR(X) or TEXT() depending on item->max_length
| | | | * | fixed open_and_lock_tables result processing (all open_and_lock_tables revision)bell@sanja.is.com.ua2004-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixed printing of COLLATE operation (BUG#5155)
| | | | * | mark subquery in the FROM clause like derived and quoate all identifiers ↵bell@sanja.is.com.ua2004-07-201-1/+1
| | | | |/ | | | | | | | | | | | | | | | (BUG#4609)
| | | | * fixed flags of printed querybell@sanja.is.com.ua2004-05-131-3/+3
| | | | |
| | | | * WorkLog#1323antony@ltantony.rdg.cyberkinetica.homeunix.net2003-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | Deprecate the use of TYPE=... Preferred syntax is ENGINE=
| | | | * Merge key cache structures to onemonty@mysql.com2003-11-201-9/+11
| | | | | | | | | | | | | | | | | | | | Fixed compiler warnings (IRIX C compiler and VC++)
| | | | * CLIENT_MULTI_QUERIES -> CLIENT_MULTI_STATEMENTSmonty@mashka.mysql.fi2003-11-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New multi-key-cache handling. This was needed becasue the old one didn't work reliable with MERGE tables. ALTER TABLE table_name ... CHARACTER SET ... now changes all char/varchar/text columns to the given character set (One must use ALTER TABLE ... DEFAULT CHARACTER SET ... to change the default character set) Fixed that have_compress is detected properly (fixes problems with func_compress.test on platforms without zlib) New syntax for CACHE INDEX ('keys' is optional if no index name is given and one mentions the key cache name only ones) Removed compiler warnings Added mysql_set_server_option() to allow clients like PHP to easaily set/reset the multi-statement flag.
| | | | * added code covarage for functions convert(), nullif(), crc32(), ↵bell@sanja.is.com.ua2003-10-301-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is_used_lock(), char_lengtrh(), bit_xor() added string length for more speed made code covarage for print() method of Item fixed printability of some items (SCRUM) (WL#1274)
| | | | * Some fixes in CASE.bar@bar.mysql.r18.ru2003-07-181-2/+44
| | | | | | | | | | | | | | | | | | | | Test suit was extended to conver various arguments mixes.
| | | | * COALESCE now aggregates its argument types in this way:bar@bar.mysql.r18.ru2003-07-141-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | if some of the arguments is STRING_RESULT the STRING_RESULT else if some of the arguments is REAL_RESULT then REAL_RESULT else INT_RESULT
| | | | * Merge with 4.0.8monty@mashka.mysql.fi2003-01-031-0/+8
| | | | |\
| | | | | * Test cleanupmonty@mashka.mysql.fi2002-12-261-2/+1
| | | | | |
| | | | | * Update of test resultsmonty@mashka.mysql.fi2002-12-261-0/+5
| | | | | |
| | | | | * Merge with 3.23:monty@mashka.mysql.fi2002-12-211-0/+4
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove duplicate casedn_str() in mysql_change_db() Fix for null handling in CASE
| | | | | | * fix for a bug in CASE ...WHEN ...Sinisa@sinisa.nasamreza.org2002-12-161-0/+4
| | | | | | |
| | | | * | | rename of net_pkg.cc to protocol.ccmonty@mashka.mysql.fi2002-12-111-2/+2
| | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Class for sending data from server to client (Protocol) This handles both the old ( <= 4.0 ) protocol and then new binary protocol that is used for prepared statements.
| | | | * | client/mysqlmanagerc.csasha@mysql.sashanet.com2001-09-271-0/+23
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | added support for quiet increased line buffer size client/mysqltest.c fixed memory leak added query logging to result file added error message logging to result file added enable_query_log/disable_query_log mysql-test/mysql-test-run.sh converted tests to use mysqlmanager Updated test results
| | | | * New myisamchk option --sort-recovermonty@donna.mysql.com2001-01-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow delete of crashed MyISAM tables Fixed bug when BLOB was first part of key Fixed bug when using result from CASE in GROUP BY Fixed core-dump bug in monthname() Optimized calling of check_db_name()
| | | | * Added support for hex strings to mysqlimportmonty@donna.mysql.com2000-12-281-0/+34
| | | | | | | | | | | | | | | | | | | | A lot of new tests to mysqltest Fixed bug with BDB tables and autocommit