Commit 15092975 authored by unknown's avatar unknown

changed field names, fields order according to WL description

fixed bug: "create view v7 as select * from information_schema.tables;" failed


mysql-test/r/information_schema.result:
  changed field names, fields order according to WL description
mysql-test/t/information_schema.test:
  changed field names, fields order according to WL description
sql/sql_show.cc:
  changed field names, fields order according to WL description
sql/sql_view.cc:
  fixed bug: "create view v7 as select * from information_schema.tables;" failed
tests/client_test.c:
  changed field names, fields order according to WL description
parent b7ae32a0
This diff is collapsed.
...@@ -217,6 +217,7 @@ end;// ...@@ -217,6 +217,7 @@ end;//
call px5()// call px5()//
call px5()// call px5()//
delimiter ;// delimiter ;//
select sql_mode from information_schema.ROUTINES;
create table t1 (a int not null auto_increment,b int, primary key (a)); create table t1 (a int not null auto_increment,b int, primary key (a));
insert into t1 values (1,1),(NULL,3),(NULL,4); insert into t1 values (1,1),(NULL,3),(NULL,4);
...@@ -240,5 +241,14 @@ where CHARACTER_SET_NAME like "latin1"; ...@@ -240,5 +241,14 @@ where CHARACTER_SET_NAME like "latin1";
select * from t1; select * from t1;
alter table t1 default character set utf8; alter table t1 default character set utf8;
show create table t1; show create table t1;
drop table t1; drop table t1;
create view v1 as select * from information_schema.TABLES;
drop view v1;
create table t1(a NUMERIC(5,3), b NUMERIC(5,1), c float(5,2),
d NUMERIC(6,4), e float, f DECIMAL(6,3), g int(11), h DOUBLE(10,3),
i DOUBLE);
select COLUMN_NAME,COLUMN_TYPE, CHARACTER_MAXIMUM_LENGTH,
CHARACTER_OCTET_LENGTH, NUMERIC_PRECISION, NUMERIC_SCALE
from information_schema.columns where table_name= 't1';
drop table t1;
This diff is collapsed.
...@@ -283,7 +283,7 @@ bool mysql_create_view(THD *thd, ...@@ -283,7 +283,7 @@ bool mysql_create_view(THD *thd,
/* /*
Do we have more privileges on view field then underlying table field? Do we have more privileges on view field then underlying table field?
*/ */
if ((~fld->have_privileges & priv)) if (!fld->field->table->tmp_table && (~fld->have_privileges & priv))
{ {
/* VIEW column has more privileges */ /* VIEW column has more privileges */
my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0), my_error(ER_COLUMNACCESS_DENIED_ERROR, MYF(0),
......
...@@ -7263,13 +7263,13 @@ static void test_explain_bug() ...@@ -7263,13 +7263,13 @@ static void test_explain_bug()
verify_prepare_field(result, 0, "Field", "COLUMN_NAME", verify_prepare_field(result, 0, "Field", "COLUMN_NAME",
MYSQL_TYPE_STRING, 0, 0, "", 192, 0); MYSQL_TYPE_STRING, 0, 0, "", 192, 0);
verify_prepare_field(result, 1, "Type", "TYPE", verify_prepare_field(result, 1, "Type", "COLUMN_TYPE",
MYSQL_TYPE_STRING, 0, 0, "", 120, 0); MYSQL_TYPE_STRING, 0, 0, "", 120, 0);
verify_prepare_field(result, 2, "Null", "IS_NULLABLE", verify_prepare_field(result, 2, "Null", "IS_NULLABLE",
MYSQL_TYPE_STRING, 0, 0, "", 9, 0); MYSQL_TYPE_STRING, 0, 0, "", 9, 0);
verify_prepare_field(result, 3, "Key", "KEY", verify_prepare_field(result, 3, "Key", "COLUMN_KEY",
MYSQL_TYPE_STRING, 0, 0, "", 9, 0); MYSQL_TYPE_STRING, 0, 0, "", 9, 0);
verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT", verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT",
......
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