diff options
author | kostja@bodhi.(none) <> | 2007-07-16 17:22:33 +0400 |
---|---|---|
committer | kostja@bodhi.(none) <> | 2007-07-16 17:22:33 +0400 |
commit | be4f73c44fdf563e1f5b1393316fd23b7f286c3f (patch) | |
tree | 2871e2ea453c7f2ac10d1123bf0bf7bc9ab5663c /sql/sql_show.cc | |
parent | 28a620213f462e70e47cb6329140063a300b74b5 (diff) | |
parent | eec9f7c59d3a60101d37275eacb4dce4d963ecf9 (diff) | |
download | mariadb-git-be4f73c44fdf563e1f5b1393316fd23b7f286c3f.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into bodhi.(none):/opt/local/work/mysql-5.1-runtime
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 593e0f74596..b65515c9e01 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -639,7 +639,8 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list) if (table_list->view) { - protocol->store(buffer.ptr(), buffer.length(), &my_charset_bin); + protocol->store(buffer.ptr(), buffer.length(), + table_list->view_creation_ctx->get_client_cs()); protocol->store(table_list->view_creation_ctx->get_client_cs()->csname, system_charset_info); @@ -5967,6 +5968,8 @@ static bool show_create_trigger_impl(THD *thd, LEX_STRING trg_connection_cl_name; LEX_STRING trg_db_cl_name; + CHARSET_INFO *trg_client_cs; + /* TODO: Check privileges here. This functionality will be added by implementation of the following WL items: @@ -5992,6 +5995,11 @@ static bool show_create_trigger_impl(THD *thd, trg_sql_mode, &trg_sql_mode_str); + /* Resolve trigger client character set. */ + + if (resolve_charset(trg_client_cs_name.str, NULL, &trg_client_cs)) + return TRUE; + /* Send header. */ fields.push_back(new Item_empty_string("Trigger", NAME_LEN)); @@ -6038,7 +6046,7 @@ static bool show_create_trigger_impl(THD *thd, p->store(trg_sql_original_stmt.str, trg_sql_original_stmt.length, - &my_charset_bin); + trg_client_cs); p->store(trg_client_cs_name.str, trg_client_cs_name.length, |