Commit 2415189c authored by unknown's avatar unknown

Fix for bug #7223: information_schema: error in "views"

parent b8bfcf5a
......@@ -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
......
......@@ -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}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment