mariadb/mysql-test/include
Alexander Barkov 702166bcde WL#2649 Number-to-string conversions
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.
2010-02-11 08:17:25 +04:00
..
add_anonymous_users.inc
analyze-sync_with_master.test
analyze-timeout.test
big_test.inc
binlog_inject_error.inc
bug38347.inc
check-testcase.test
check-warnings.test
check_events_off.inc
check_ipv6.inc
check_key_reads.inc
check_key_req.inc
check_var_limit.inc
circular_rpl_for_4_hosts_init.inc
circular_rpl_for_4_hosts_sync.inc
cleanup_fake_relay_log.inc
commit.inc
common-tests.inc
concurrent.inc
connect2.inc
count_sessions.inc
ctype_common.inc
ctype_filesort.inc
ctype_german.inc
ctype_innodb_like.inc
ctype_like_escape.inc
ctype_like_range_f1f2.inc
ctype_numconv.inc WL#2649 Number-to-string conversions 2010-02-11 08:17:25 +04:00
ctype_regex.inc
ddl_i18n.check_events.inc
ddl_i18n.check_sp.inc
ddl_i18n.check_triggers.inc
ddl_i18n.check_views.inc
deadlock.inc
default_client.cnf
default_my.cnf
default_mysqld.cnf
default_ndbd.cnf
delete_anonymous_users.inc
diff_master_slave.inc
diff_tables.inc
endspace.inc
get_binlog_dump_thread_id.inc
gis_generic.inc
gis_keys.inc
grant_cache.inc
handler.inc
have_32bit.inc
have_64bit.inc
have_archive.inc
have_big5.inc
have_binlog_format_mixed.inc
have_binlog_format_mixed_or_row.inc
have_binlog_format_mixed_or_statement.inc
have_binlog_format_row.inc
have_binlog_format_row_or_statement.inc
have_binlog_format_statement.inc
have_blackhole.inc
have_case_insensitive_file_system.inc
have_case_insensitive_fs.inc
have_case_sensitive_file_system.inc
have_compress.inc
have_cp866.inc
have_cp932.inc
have_cp1250_ch.inc
have_cp1251.inc
have_crypt.inc
have_csv.inc
have_debug.inc
have_debug_sync.inc
have_dynamic_loading.inc
have_eucjpms.inc
have_euckr.inc
have_example_plugin.inc
have_exampledb.inc
have_gb2312.inc
have_gbk.inc
have_geometry.inc
have_innodb.inc
have_koi8r.inc
have_latin2_ch.inc
have_local_infile.inc
have_log_bin.inc
have_lowercase0.inc
have_lowercase1.inc
have_lowercase2.inc
have_multi_ndb.inc
have_mysql_upgrade.inc
have_ndb.inc
have_ndb_extra.inc
have_ndbapi_examples.inc
have_nodebug.inc
have_not_innodb_plugin.inc
have_outfile.inc
have_partition.inc
have_perfschema.inc
have_profiling.inc
have_query_cache.inc
have_semisync_plugin.inc
have_simple_parser.inc
have_sjis.inc
have_ssl.inc
have_ssl_communication.inc
have_symlink.inc
have_thread_concurrency.inc
have_tis620.inc
have_ucs2.inc
have_udf.inc
have_ujis.inc
have_utf8.inc
index_merge1.inc
index_merge2.inc
index_merge_2sweeps.inc
index_merge_ror.inc
index_merge_ror_cpk.inc
innodb_rollback_on_timeout.inc
innodb_trx_weight.inc
ipv6.inc
ipv6_clients.inc
is_embedded.inc
kill_query.inc
kill_query_and_diff_master_slave.inc
linux_sys_vars.inc
load_sysvars.inc
loaddata_autocom.inc
master-slave-end.inc
master-slave-reset.inc
master-slave.inc
mix1.inc
mix2.inc
mix2_ucs2.inc
mtr_check.sql
mtr_warnings.sql
mysqlbinlog_row_engine.inc
mysqld--help.inc
mysqldump.inc
mysqltest-x.inc
ndb_backup.inc
ndb_backup_print.inc
ndb_default_cluster.inc
ndb_master-slave.inc
ndb_master-slave_2ch.inc
ndb_not_readonly.inc
ndb_restore_master.inc
ndb_restore_slave_eoption.inc
ndb_setup_slave.inc
ndb_wait_connected.inc
no_running_event_scheduler.inc
no_running_events.inc
no_valgrind_without_big.inc
not_as_root.inc
not_embedded.inc
not_ndb.inc
not_ndb_default.inc
not_openssl.inc
not_valgrind.inc
not_windows.inc
not_windows_embedded.inc
one_thread_per_connection.inc
parser_bug21114.inc
partition_date_range.inc
ps_conv.inc
ps_create.inc
ps_ddl_1.inc
ps_modify.inc
ps_modify1.inc
ps_query.inc
ps_renew.inc
query_cache.inc
query_cache_sql_prepare.inc
read_many_rows.inc
report-features.test
reset_master_and_slave.inc
restart_mysqld.inc
rowid_order.inc
rpl_events.inc
rpl_ip_mix.inc
rpl_ip_mix2.inc
rpl_ipv6.inc
rpl_loaddata_charset.inc
rpl_multi_engine.inc
rpl_multi_engine2.inc
rpl_multi_engine3.inc
rpl_stmt_seq.inc
rpl_udf.inc
running_event_scheduler.inc
safe_set_to_maybe_ro_var.inc
select_ndb_apply_status.inc
set_binlog_format_mixed.sql
set_binlog_format_row.sql
set_binlog_format_statement.sql
setup_fake_relay_log.inc Manual merge from mysql-5.1-bugteam. 2010-02-03 20:22:58 +03:00
show_binary_logs.inc
show_binlog_events.inc
show_binlog_events2.inc
show_binlog_using_logname.inc
show_master_logs.inc
show_master_status.inc
show_msg.inc
show_msg80.inc
show_relaylog_events.inc
show_rpl_debug_info.inc
show_slave_status.inc
show_slave_status2.inc
sp-vars.inc
start_slave.inc
stop_slave.inc
strict_autoinc.inc
sync_slave_io_with_master.inc
system_db_struct.inc
test_fieldsize.inc
test_outfile.inc
testdb_only.inc
tpcb.inc
tpcb_disk_data.inc
truncate_file.inc
unsafe_binlog.inc
uses_vardir.inc
varchar.inc
wait_condition.inc
wait_condition_sp.inc
wait_for_binlog_event.inc
wait_for_ndb_to_binlog.inc
wait_for_query_to_succeed.inc
wait_for_slave_io_error.inc
wait_for_slave_io_to_start.inc
wait_for_slave_io_to_stop.inc
wait_for_slave_param.inc
wait_for_slave_sql_error.inc
wait_for_slave_sql_error_and_skip.inc
wait_for_slave_sql_to_start.inc
wait_for_slave_sql_to_stop.inc
wait_for_slave_to_start.inc
wait_for_slave_to_stop.inc
wait_for_status_var.inc
wait_show_condition.inc
wait_until_connected_again.inc
wait_until_count_sessions.inc
wait_until_disconnected.inc
wait_until_rows_count.inc
windows.inc
windows_sys_vars.inc