summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/client_priv.h2
-rw-r--r--mysql-test/include/not_windows.inc4
-rw-r--r--mysql-test/r/create.result2
-rw-r--r--mysql-test/r/information_schema.result50
-rw-r--r--mysql-test/r/information_schema_db.result20
-rw-r--r--mysql-test/r/query_cache.result24
-rw-r--r--mysql-test/r/type_datetime.result10
-rw-r--r--mysql-test/r/view.result22
-rw-r--r--mysql-test/t/packet.test3
-rw-r--r--mysql-test/t/query_cache.test6
-rw-r--r--mysql-test/t/rpl_flush_tables.test5
-rw-r--r--mysql-test/t/type_datetime.test10
-rw-r--r--sql-common/my_time.c12
-rw-r--r--sql/sql_show.cc44
-rw-r--r--sql/table.h25
15 files changed, 144 insertions, 95 deletions
diff --git a/client/client_priv.h b/client/client_priv.h
index 997f9ffe552..74bc0b41006 100644
--- a/client/client_priv.h
+++ b/client/client_priv.h
@@ -50,5 +50,5 @@ enum options_client
OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
#endif
OPT_TRIGGERS,
- OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
+ OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE
};
diff --git a/mysql-test/include/not_windows.inc b/mysql-test/include/not_windows.inc
index 0db231ddb81..54e9e0e817a 100644
--- a/mysql-test/include/not_windows.inc
+++ b/mysql-test/include/not_windows.inc
@@ -1,4 +1,4 @@
--require r/true.require
---disable_query_log;
+disable_query_log;
select convert(@@version_compile_os using latin1) NOT IN ("Win32","Win64","Windows") as "TRUE";
---enable_query_log;
+enable_query_log;
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 293be36e5ab..82a5ccc3e82 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -606,6 +606,6 @@ create database mysqltest;
use mysqltest;
create view v1 as select 'foo' from dual;
create table t1 like v1;
-ERROR HY000: 'mysqltest.v1' is not a table
+ERROR HY000: 'mysqltest.v1' is not BASE TABLE
drop view v1;
drop database mysqltest;
diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result
index e6a929d7e3e..5688d8c2145 100644
--- a/mysql-test/r/information_schema.result
+++ b/mysql-test/r/information_schema.result
@@ -33,22 +33,22 @@ create table mysqltest.t4(a int);
create view v1 (c) as select table_name from information_schema.TABLES;
select * from v1;
c
-SCHEMATA
-TABLES
-COLUMNS
CHARACTER_SETS
COLLATIONS
COLLATION_CHARACTER_SET_APPLICABILITY
+COLUMNS
+COLUMN_PRIVILEGES
+KEY_COLUMN_USAGE
ROUTINES
-STATISTICS
-VIEWS
-USER_PRIVILEGES
+SCHEMATA
SCHEMA_PRIVILEGES
-TABLE_PRIVILEGES
-COLUMN_PRIVILEGES
+STATISTICS
+TABLES
TABLE_CONSTRAINTS
-KEY_COLUMN_USAGE
+TABLE_PRIVILEGES
TRIGGERS
+VIEWS
+USER_PRIVILEGES
columns_priv
db
func
@@ -76,8 +76,8 @@ inner join information_schema.TABLES v2 on (v1.c=v2.table_name)
where v1.c like "t%";
c table_name
TABLES TABLES
-TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
+TABLE_PRIVILEGES TABLE_PRIVILEGES
TRIGGERS TRIGGERS
tables_priv tables_priv
time_zone time_zone
@@ -94,8 +94,8 @@ left join information_schema.TABLES v2 on (v1.c=v2.table_name)
where v1.c like "t%";
c table_name
TABLES TABLES
-TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
+TABLE_PRIVILEGES TABLE_PRIVILEGES
TRIGGERS TRIGGERS
tables_priv tables_priv
time_zone time_zone
@@ -112,8 +112,8 @@ right join information_schema.TABLES v2 on (v1.c=v2.table_name)
where v1.c like "t%";
c table_name
TABLES TABLES
-TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
+TABLE_PRIVILEGES TABLE_PRIVILEGES
TRIGGERS TRIGGERS
tables_priv tables_priv
time_zone time_zone
@@ -577,13 +577,13 @@ select TABLE_NAME,TABLE_TYPE,ENGINE
from information_schema.tables
where table_schema='information_schema' limit 2;
TABLE_NAME TABLE_TYPE ENGINE
-SCHEMATA TEMPORARY MEMORY
-TABLES TEMPORARY MEMORY
+CHARACTER_SETS TEMPORARY MEMORY
+COLLATIONS TEMPORARY MEMORY
show tables from information_schema like "T%";
Tables_in_information_schema (T%)
TABLES
-TABLE_PRIVILEGES
TABLE_CONSTRAINTS
+TABLE_PRIVILEGES
TRIGGERS
create database information_schema;
ERROR HY000: Can't create database 'information_schema'; database exists
@@ -591,8 +591,8 @@ use information_schema;
show full tables like "T%";
Tables_in_information_schema (T%) Table_type
TABLES TEMPORARY
-TABLE_PRIVILEGES TEMPORARY
TABLE_CONSTRAINTS TEMPORARY
+TABLE_PRIVILEGES TEMPORARY
TRIGGERS TEMPORARY
create table t1(a int);
ERROR 42S02: Unknown table 't1' in information_schema
@@ -603,8 +603,8 @@ use information_schema;
show tables like "T%";
Tables_in_information_schema (T%)
TABLES
-TABLE_PRIVILEGES
TABLE_CONSTRAINTS
+TABLE_PRIVILEGES
TRIGGERS
select table_name from tables where table_name='user';
table_name
@@ -710,18 +710,18 @@ table_schema table_name column_name
information_schema COLUMNS COLUMN_TYPE
information_schema ROUTINES ROUTINE_DEFINITION
information_schema ROUTINES SQL_MODE
-information_schema VIEWS VIEW_DEFINITION
information_schema TRIGGERS ACTION_CONDITION
information_schema TRIGGERS ACTION_STATEMENT
information_schema TRIGGERS SQL_MODE
+information_schema VIEWS VIEW_DEFINITION
select table_name, column_name, data_type from information_schema.columns
where data_type = 'datetime';
table_name column_name data_type
+ROUTINES CREATED datetime
+ROUTINES LAST_ALTERED datetime
TABLES CREATE_TIME datetime
TABLES UPDATE_TIME datetime
TABLES CHECK_TIME datetime
-ROUTINES CREATED datetime
-ROUTINES LAST_ALTERED datetime
TRIGGERS CREATED datetime
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES A
WHERE NOT EXISTS
@@ -756,14 +756,14 @@ grant select on test.* to mysqltest_4@localhost;
SELECT TABLE_NAME, COLUMN_NAME, PRIVILEGES FROM INFORMATION_SCHEMA.COLUMNS
where COLUMN_NAME='TABLE_NAME';
TABLE_NAME COLUMN_NAME PRIVILEGES
-TABLES TABLE_NAME select
COLUMNS TABLE_NAME select
-STATISTICS TABLE_NAME select
-VIEWS TABLE_NAME select
-TABLE_PRIVILEGES TABLE_NAME select
COLUMN_PRIVILEGES TABLE_NAME select
-TABLE_CONSTRAINTS TABLE_NAME select
KEY_COLUMN_USAGE TABLE_NAME select
+STATISTICS TABLE_NAME select
+TABLES TABLE_NAME select
+TABLE_CONSTRAINTS TABLE_NAME select
+TABLE_PRIVILEGES TABLE_NAME select
+VIEWS TABLE_NAME select
delete from mysql.user where user='mysqltest_4';
delete from mysql.db where user='mysqltest_4';
flush privileges;
diff --git a/mysql-test/r/information_schema_db.result b/mysql-test/r/information_schema_db.result
index ece30924055..d3ff310b812 100644
--- a/mysql-test/r/information_schema_db.result
+++ b/mysql-test/r/information_schema_db.result
@@ -1,27 +1,27 @@
use INFORMATION_SCHEMA;
show tables;
Tables_in_information_schema
-SCHEMATA
-TABLES
-COLUMNS
CHARACTER_SETS
COLLATIONS
COLLATION_CHARACTER_SET_APPLICABILITY
+COLUMNS
+COLUMN_PRIVILEGES
+KEY_COLUMN_USAGE
ROUTINES
-STATISTICS
-VIEWS
-USER_PRIVILEGES
+SCHEMATA
SCHEMA_PRIVILEGES
-TABLE_PRIVILEGES
-COLUMN_PRIVILEGES
+STATISTICS
+TABLES
TABLE_CONSTRAINTS
-KEY_COLUMN_USAGE
+TABLE_PRIVILEGES
TRIGGERS
+VIEWS
+USER_PRIVILEGES
show tables from INFORMATION_SCHEMA like 'T%';
Tables_in_information_schema (T%)
TABLES
-TABLE_PRIVILEGES
TABLE_CONSTRAINTS
+TABLE_PRIVILEGES
TRIGGERS
create database `inf%`;
use `inf%`;
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 637435cb080..6ff49951d27 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -941,24 +941,30 @@ KEY `date` (`date`)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('20050326');
INSERT INTO t1 VALUES ('20050325');
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
COUNT(*)
0
Warnings:
-Warning 1292 Incorrect datetime value: '20050327 0:0:0' for column 'date' at row 1
-Warning 1292 Incorrect datetime value: '20050327 0:0:0' for column 'date' at row 1
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 0:0:0';
+Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
+Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
+Warning 1292 Truncated incorrect INTEGER value: '20050327 invalid'
+Warning 1292 Truncated incorrect INTEGER value: '20050327 invalid'
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid';
COUNT(*)
0
Warnings:
-Warning 1292 Incorrect datetime value: '20050328 0:0:0' for column 'date' at row 1
-Warning 1292 Incorrect datetime value: '20050328 0:0:0' for column 'date' at row 1
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
+Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1
+Warning 1292 Incorrect datetime value: '20050328 invalid' for column 'date' at row 1
+Warning 1292 Truncated incorrect INTEGER value: '20050328 invalid'
+Warning 1292 Truncated incorrect INTEGER value: '20050328 invalid'
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
COUNT(*)
0
Warnings:
-Warning 1292 Incorrect datetime value: '20050327 0:0:0' for column 'date' at row 1
-Warning 1292 Incorrect datetime value: '20050327 0:0:0' for column 'date' at row 1
+Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
+Warning 1292 Incorrect datetime value: '20050327 invalid' for column 'date' at row 1
+Warning 1292 Truncated incorrect INTEGER value: '20050327 invalid'
+Warning 1292 Truncated incorrect INTEGER value: '20050327 invalid'
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index 33c7e837997..788478de77e 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -153,3 +153,13 @@ dt
0000-00-00 00:00:00
0000-00-00 00:00:00
drop table t1;
+create table t1 (dt datetime);
+insert into t1 values ("20010101T010101");
+insert into t1 values ("2001-01-01T01:01:01");
+insert into t1 values ("2001-1-1T1:01:01");
+select * from t1;
+dt
+2001-01-01 01:01:01
+2001-01-01 01:01:01
+2001-01-01 01:01:01
+drop table t1;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 20c6b7782b7..f6b5018cf3a 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -2007,17 +2007,6 @@ A
B
DROP VIEW v1;
DROP TABLE t1;
-create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime);
-create view v1 as select * from t1;
-desc v1;
-Field Type Null Key Default Extra
-f1 tinyint(1) YES NULL
-f2 char(1) YES NULL
-f3 varchar(1) YES NULL
-f4 geometry YES NULL
-f5 datetime YES NULL
-drop view v1;
-drop table t1;
CREATE TABLE t1 ( bug_table_seq INTEGER NOT NULL);
CREATE OR REPLACE VIEW v1 AS SELECT * from t1;
DROP PROCEDURE IF EXISTS p1;
@@ -2032,6 +2021,17 @@ CALL p1();
DROP PROCEDURE p1;
DROP VIEW v1;
DROP TABLE t1;
+create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime);
+create view v1 as select * from t1;
+desc v1;
+Field Type Null Key Default Extra
+f1 tinyint(1) YES NULL
+f2 char(1) YES NULL
+f3 varchar(1) YES NULL
+f4 geometry YES NULL
+f5 datetime YES NULL
+drop view v1;
+drop table t1;
create table t1(f1 datetime);
insert into t1 values('2005.01.01 12:0:0');
create view v1 as select f1, subtime(f1, '1:1:1') as sb from t1;
diff --git a/mysql-test/t/packet.test b/mysql-test/t/packet.test
index 04122b42b44..4de284b7824 100644
--- a/mysql-test/t/packet.test
+++ b/mysql-test/t/packet.test
@@ -1,5 +1,8 @@
# Embedded server doesn't support external clients
--source include/not_embedded.inc
+# Windows fails because it disconnects on too-large packets instead of just
+# swallowing them and returning an error
+--source include/not_windows.inc
#
# Check protocol handling
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index 326fd775549..822c27fe40d 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -709,9 +709,9 @@ CREATE TABLE t1 (
INSERT INTO t1 VALUES ('20050326');
INSERT INTO t1 VALUES ('20050325');
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 0:0:0';
-SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 0:0:0';
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050328 invalid';
+SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
show status like "Qcache_queries_in_cache";
show status like "Qcache_inserts";
show status like "Qcache_hits";
diff --git a/mysql-test/t/rpl_flush_tables.test b/mysql-test/t/rpl_flush_tables.test
index eff0a79bc45..48fda818890 100644
--- a/mysql-test/t/rpl_flush_tables.test
+++ b/mysql-test/t/rpl_flush_tables.test
@@ -3,7 +3,10 @@
# RENAME TABLE work with MERGE tables on the slave.
# Test of FLUSH NO_WRITE_TO_BINLOG by the way.
#
-source include/master-slave.inc;
+--source include/master-slave.inc
+# Skipped on Windows because it can't handle a table underlying an open
+# merge table getting renamed.
+--source include/not_windows.inc
create table t1 (a int);
insert into t1 values (10);
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index f60bc5adb16..ca70e35d3cd 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -102,4 +102,14 @@ insert into t1 values ("00-00-00"), ("00-00-00 00:00:00");
select * from t1;
drop table t1;
+#
+# Bug #7308: ISO-8601 date format not handled correctly
+#
+create table t1 (dt datetime);
+insert into t1 values ("20010101T010101");
+insert into t1 values ("2001-01-01T01:01:01");
+insert into t1 values ("2001-1-1T1:01:01");
+select * from t1;
+drop table t1;
+
# End of 4.1 tests
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index ed02021011b..95ac779e0cd 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -207,7 +207,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
{
/* Found date in internal format (only numbers like YYYYMMDD) */
year_length= (digits == 4 || digits == 8 || digits >= 14) ? 4 : 2;
- field_length=year_length-1;
+ field_length= year_length;
is_internal_format= 1;
format_position= internal_format_positions;
}
@@ -237,6 +237,8 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
start_loop= 5; /* Start with first date part */
}
}
+
+ field_length= format_position[0] == 0 ? 4 : 2;
}
/*
@@ -261,7 +263,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
const char *start= str;
ulong tmp_value= (uint) (uchar) (*str++ - '0');
while (str != end && my_isdigit(&my_charset_latin1,str[0]) &&
- (!is_internal_format || field_length--))
+ --field_length)
{
tmp_value=tmp_value*10 + (ulong) (uchar) (*str - '0');
str++;
@@ -275,8 +277,8 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
date[i]=tmp_value;
not_zero_date|= tmp_value;
- /* Length-1 of next field */
- field_length= format_position[i+1] == 0 ? 3 : 1;
+ /* Length of next field */
+ field_length= format_position[i+1] == 0 ? 4 : 2;
if ((last_field_pos= str) == end)
{
@@ -294,7 +296,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
if (*str == '.') /* Followed by part seconds */
{
str++;
- field_length= 5; /* 5 digits after first (=6) */
+ field_length= 6; /* 6 digits */
}
continue;
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 56272b4fdaf..e3c6fa14522 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -3981,46 +3981,46 @@ ST_FIELD_INFO variables_fields_info[]=
ST_SCHEMA_TABLE schema_tables[]=
{
- {"SCHEMATA", schema_fields_info, create_schema_table,
- fill_schema_shemata, make_schemata_old_format, 0, 1, -1, 0},
- {"TABLES", tables_fields_info, create_schema_table,
- get_all_tables, make_old_format, get_schema_tables_record, 1, 2, 0},
- {"COLUMNS", columns_fields_info, create_schema_table,
- get_all_tables, make_columns_old_format, get_schema_column_record, 1, 2, 0},
{"CHARACTER_SETS", charsets_fields_info, create_schema_table,
fill_schema_charsets, make_character_sets_old_format, 0, -1, -1, 0},
{"COLLATIONS", collation_fields_info, create_schema_table,
fill_schema_collation, make_old_format, 0, -1, -1, 0},
{"COLLATION_CHARACTER_SET_APPLICABILITY", coll_charset_app_fields_info,
create_schema_table, fill_schema_coll_charset_app, 0, 0, -1, -1, 0},
- {"ROUTINES", proc_fields_info, create_schema_table,
- fill_schema_proc, make_proc_old_format, 0, -1, -1, 0},
- {"STATISTICS", stat_fields_info, create_schema_table,
- get_all_tables, make_old_format, get_schema_stat_record, 1, 2, 0},
- {"VIEWS", view_fields_info, create_schema_table,
- get_all_tables, 0, get_schema_views_record, 1, 2, 0},
- {"USER_PRIVILEGES", user_privileges_fields_info, create_schema_table,
- fill_schema_user_privileges, 0, 0, -1, -1, 0},
- {"SCHEMA_PRIVILEGES", schema_privileges_fields_info, create_schema_table,
- fill_schema_schema_privileges, 0, 0, -1, -1, 0},
- {"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
- fill_schema_table_privileges, 0, 0, -1, -1, 0},
+ {"COLUMNS", columns_fields_info, create_schema_table,
+ get_all_tables, make_columns_old_format, get_schema_column_record, 1, 2, 0},
{"COLUMN_PRIVILEGES", column_privileges_fields_info, create_schema_table,
fill_schema_column_privileges, 0, 0, -1, -1, 0},
- {"TABLE_CONSTRAINTS", table_constraints_fields_info, create_schema_table,
- get_all_tables, 0, get_schema_constraints_record, 3, 4, 0},
{"KEY_COLUMN_USAGE", key_column_usage_fields_info, create_schema_table,
get_all_tables, 0, get_schema_key_column_usage_record, 4, 5, 0},
- {"TABLE_NAMES", table_names_fields_info, create_schema_table,
- get_all_tables, make_table_names_old_format, 0, 1, 2, 1},
{"OPEN_TABLES", open_tables_fields_info, create_schema_table,
fill_open_tables, make_old_format, 0, -1, -1, 1},
+ {"ROUTINES", proc_fields_info, create_schema_table,
+ fill_schema_proc, make_proc_old_format, 0, -1, -1, 0},
+ {"SCHEMATA", schema_fields_info, create_schema_table,
+ fill_schema_shemata, make_schemata_old_format, 0, 1, -1, 0},
+ {"SCHEMA_PRIVILEGES", schema_privileges_fields_info, create_schema_table,
+ fill_schema_schema_privileges, 0, 0, -1, -1, 0},
+ {"STATISTICS", stat_fields_info, create_schema_table,
+ get_all_tables, make_old_format, get_schema_stat_record, 1, 2, 0},
{"STATUS", variables_fields_info, create_schema_table, fill_status,
make_old_format, 0, -1, -1, 1},
+ {"TABLES", tables_fields_info, create_schema_table,
+ get_all_tables, make_old_format, get_schema_tables_record, 1, 2, 0},
+ {"TABLE_CONSTRAINTS", table_constraints_fields_info, create_schema_table,
+ get_all_tables, 0, get_schema_constraints_record, 3, 4, 0},
+ {"TABLE_NAMES", table_names_fields_info, create_schema_table,
+ get_all_tables, make_table_names_old_format, 0, 1, 2, 1},
+ {"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
+ fill_schema_table_privileges, 0, 0, -1, -1, 0},
{"TRIGGERS", triggers_fields_info, create_schema_table,
get_all_tables, make_old_format, get_schema_triggers_record, 5, 6, 0},
{"VARIABLES", variables_fields_info, create_schema_table, fill_variables,
make_old_format, 0, -1, -1, 1},
+ {"VIEWS", view_fields_info, create_schema_table,
+ get_all_tables, 0, get_schema_views_record, 1, 2, 0},
+ {"USER_PRIVILEGES", user_privileges_fields_info, create_schema_table,
+ fill_schema_user_privileges, 0, 0, -1, -1, 0},
{0, 0, 0, 0, 0, 0, 0, 0, 0}
};
diff --git a/sql/table.h b/sql/table.h
index 13d44766804..22a35e29e87 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -278,11 +278,26 @@ typedef struct st_foreign_key_info
enum enum_schema_tables
{
- SCH_SCHEMATA= 0, SCH_TABLES, SCH_COLUMNS, SCH_CHARSETS, SCH_COLLATIONS,
- SCH_COLLATION_CHARACTER_SET_APPLICABILITY, SCH_PROCEDURES, SCH_STATISTICS,
- SCH_VIEWS, SCH_USER_PRIVILEGES, SCH_SCHEMA_PRIVILEGES, SCH_TABLE_PRIVILEGES,
- SCH_COLUMN_PRIVILEGES, SCH_TABLE_CONSTRAINTS, SCH_KEY_COLUMN_USAGE,
- SCH_TABLE_NAMES, SCH_OPEN_TABLES, SCH_STATUS, SCH_TRIGGERS, SCH_VARIABLES
+ SCH_CHARSETS= 0,
+ SCH_COLLATIONS,
+ SCH_COLLATION_CHARACTER_SET_APPLICABILITY,
+ SCH_COLUMNS,
+ SCH_COLUMN_PRIVILEGES,
+ SCH_KEY_COLUMN_USAGE,
+ SCH_OPEN_TABLES,
+ SCH_PROCEDURES,
+ SCH_SCHEMATA,
+ SCH_SCHEMA_PRIVILEGES,
+ SCH_STATISTICS,
+ SCH_STATUS,
+ SCH_TABLES,
+ SCH_TABLE_CONSTRAINTS,
+ SCH_TABLE_NAMES,
+ SCH_TABLE_PRIVILEGES,
+ SCH_TRIGGERS,
+ SCH_VARIABLES,
+ SCH_VIEWS,
+ SCH_USER_PRIVILEGES
};