diff options
author | Mayank Prasad <mayank.prasad@oracle.com> | 2011-06-10 19:56:35 +0530 |
---|---|---|
committer | Mayank Prasad <mayank.prasad@oracle.com> | 2011-06-10 19:56:35 +0530 |
commit | eecaad9dccd790f82dc2c032d6bb8101feab1fdf (patch) | |
tree | 909ed1b5c60eb44e690847a088e23a71cca97735 /sql | |
parent | f089d2e87095f10785b0b6d8a023fca397674558 (diff) | |
download | mariadb-git-eecaad9dccd790f82dc2c032d6bb8101feab1fdf.tar.gz |
Bug#12337762 : MYSQL_LIST_FIELDS() RETURNS WRONG CHARSET FOR CHAR/VARCHAR/TEXT
COLUMNS IN VIEWS
Issue:
charset value for a Column, returned by MYSQL_LIST_FIELDS(), was not same
for Table and View. This was because, for view, field charset was not being
returned.
Solution:
Added definition of function "charset_for_protocol()" in calss
Item_ident_for_show to return field charset value.
sql/item.h:
Added definition for charset_for_protocol() function to return field charset.
tests/mysql_client_test.c:
Added a test case test_bug12337762 for the changes done.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h index 96b8c9eb2e4..46916346ebe 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1672,6 +1672,8 @@ public: String *val_str(String *str) { return field->val_str(str); } my_decimal *val_decimal(my_decimal *dec) { return field->val_decimal(dec); } void make_field(Send_field *tmp_field); + CHARSET_INFO *charset_for_protocol(void) const + { return field->charset_for_protocol(); } }; |