From 21ee3fc93f621623d2f957b111575b9caaa49fb6 Mon Sep 17 00:00:00 2001 From: "gluh@gluh.mysql.r18.ru" <> Date: Tue, 14 Dec 2004 13:41:32 +0300 Subject: [PATCH] Fix for bug #7223: information_schema: error in "views" --- mysql-test/r/information_schema.result | 6 +++--- sql/sql_show.cc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index ab6e180e6b7..3580a7f4f18 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -410,9 +410,9 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION; create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION; select * from information_schema.views; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE -NULL test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` WITH CASCADED CHECK OPTION YES -NULL test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` WITH LOCAL CHECK OPTION YES -NULL test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` WITH CASCADED CHECK OPTION YES +NULL test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES +NULL test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES +NULL test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES grant select (a) on test.t1 to joe@localhost with grant option; select * from INFORMATION_SCHEMA.COLUMN_PRIVILEGES; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE diff --git a/sql/sql_show.cc b/sql/sql_show.cc index c61d82ae690..383b16cca18 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -2824,9 +2824,9 @@ static int get_schema_views_record(THD *thd, struct st_table_list *tables, if (tables->with_check != VIEW_CHECK_NONE) { if (tables->with_check == VIEW_CHECK_LOCAL) - table->field[4]->store("WITH LOCAL CHECK OPTION", 23, cs); + table->field[4]->store("LOCAL", 5, cs); else - table->field[4]->store("WITH CASCADED CHECK OPTION", 26, cs); + table->field[4]->store("CASCADED", 8, cs); } else table->field[4]->store("NONE", 4, cs); @@ -3522,7 +3522,7 @@ ST_FIELD_INFO view_fields_info[]= {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"VIEW_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 0, 0}, - {"CHECK_OPTION", 30, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CHECK_OPTION", 8, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_UPDATABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} };