summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mysql.com>2010-02-11 18:28:28 +0400
committerAlexander Barkov <bar@mysql.com>2010-02-11 18:28:28 +0400
commit678096199e54ca7afa5b5365f73281e1f799d5d0 (patch)
tree33ef5ce78a58e6d219366983da93883714e2c8ca /libmysqld
parent702166bcdec5705dd90d8567a88056893433c719 (diff)
downloadmariadb-git-678096199e54ca7afa5b5365f73281e1f799d5d0.tar.gz
A post-fix for WL#2649 Number-to-string conversion
Fixing problems discovered by "mtr --embedded" and "mtr --ps" @ libmysqld/lib_sql.cc "mtr --embedded --do-test=ps" failed. Applying a similar change to the one previously done in protocol.cc, to make embedded version work the same with client/server version. (a bug in the WL#2649 patch) @ mysql-test/include/ctype_numconv.inc @ mysql-test/r/ctype_binary.result @ mysql-test/r/ctype_cp1251.result @ mysql-test/r/ctype_latin1.result @ mysql-test/r/ctype_ucs.result - Changing tinyint(30) to tinyint(4) due to problems with "mtr --ps" Possibly a bug in libmysql.cc, in function fetch_long_with_conversion(). Zerofill buffer is to short. - Commenting tests with get_lock/release_lock "mtr --ps" failed for some reasons in ctype_cp1251.
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index d56ada00266..78e07110d7b 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -941,10 +941,10 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
strlen(server_field.org_table_name), cs, thd_cs);
client_field->org_name= dup_str_aux(field_alloc, server_field.org_col_name,
strlen(server_field.org_col_name), cs, thd_cs);
- if (item->collation.collation == &my_charset_bin || thd_cs == NULL)
+ if (item->charset_for_protocol() == &my_charset_bin || thd_cs == NULL)
{
/* No conversion */
- client_field->charsetnr= server_field.charsetnr;
+ client_field->charsetnr= item->charset_for_protocol()->number;
client_field->length= server_field.length;
}
else