From 4605a107ae8af498ef8d8fb7769b826cc7e93462 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Mar 2005 17:40:43 -0800 Subject: Add all SQL_MODE settings to proc table. (Bug #8902) sql/mysql_priv.h: Add note about updated scripts with new SQL_MODE settings scripts/mysql_create_system_tables.sh: Add new SQL_MODE settings mysql-test/include/system_db_struct.inc: Add proc table to system_mysql_db tests. mysql-test/r/system_mysql_db.result: Include proc table output scripts/mysql_fix_privilege_tables.sql: Make sure full list of SQL_MODE settings is in proc table --- scripts/mysql_create_system_tables.sh | 12 ++++++++- scripts/mysql_fix_privilege_tables.sql | 46 ++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh index ea4c85d7a2c..d87113d3656 100644 --- a/scripts/mysql_create_system_tables.sh +++ b/scripts/mysql_create_system_tables.sh @@ -702,7 +702,17 @@ then c_p="$c_p 'MYSQL323'," c_p="$c_p 'MYSQL40'," c_p="$c_p 'ANSI'," - c_p="$c_p 'NO_AUTO_VALUE_ON_ZERO'" + c_p="$c_p 'NO_AUTO_VALUE_ON_ZERO'," + c_p="$c_p 'NO_BACKSLASH_ESCAPES'," + c_p="$c_p 'STRICT_TRANS_TABLES'," + c_p="$c_p 'STRICT_ALL_TABLES'," + c_p="$c_p 'NO_ZERO_IN_DATE'," + c_p="$c_p 'NO_ZERO_DATE'," + c_p="$c_p 'INVALID_DATES'," + c_p="$c_p 'ERROR_FOR_DIVISION_BY_ZERO'," + c_p="$c_p 'TRADITIONAL'," + c_p="$c_p 'NO_AUTO_CREATE_USER'," + c_p="$c_p 'HIGH_NOT_PRECEDENCE'" c_p="$c_p ) DEFAULT 0 NOT NULL," c_p="$c_p comment char(64) binary DEFAULT '' NOT NULL," c_p="$c_p PRIMARY KEY (db,name,type)" diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql index e8012ecc03a..2310e8d0bef 100644 --- a/scripts/mysql_fix_privilege_tables.sql +++ b/scripts/mysql_fix_privilege_tables.sql @@ -422,7 +422,17 @@ CREATE TABLE IF NOT EXISTS proc ( 'MYSQL323', 'MYSQL40', 'ANSI', - 'NO_AUTO_VALUE_ON_ZERO' + 'NO_AUTO_VALUE_ON_ZERO', + 'NO_BACKSLASH_ESCAPES', + 'STRICT_TRANS_TABLES', + 'STRICT_ALL_TABLES', + 'NO_ZERO_IN_DATE', + 'NO_ZERO_DATE', + 'INVALID_DATES', + 'ERROR_FOR_DIVISION_BY_ZERO', + 'TRADITIONAL', + 'NO_AUTO_CREATE_USER', + 'HIGH_NOT_PRECEDENCE' ) DEFAULT 0 NOT NULL, comment char(64) binary DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) @@ -436,4 +446,36 @@ ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL, 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' - ) DEFAULT 'CONTAINS_SQL' NOT NULL; + ) DEFAULT 'CONTAINS_SQL' NOT NULL, + MODIFY sql_mode + set('REAL_AS_FLOAT', + 'PIPES_AS_CONCAT', + 'ANSI_QUOTES', + 'IGNORE_SPACE', + 'NOT_USED', + 'ONLY_FULL_GROUP_BY', + 'NO_UNSIGNED_SUBTRACTION', + 'NO_DIR_IN_CREATE', + 'POSTGRESQL', + 'ORACLE', + 'MSSQL', + 'DB2', + 'MAXDB', + 'NO_KEY_OPTIONS', + 'NO_TABLE_OPTIONS', + 'NO_FIELD_OPTIONS', + 'MYSQL323', + 'MYSQL40', + 'ANSI', + 'NO_AUTO_VALUE_ON_ZERO', + 'NO_BACKSLASH_ESCAPES', + 'STRICT_TRANS_TABLES', + 'STRICT_ALL_TABLES', + 'NO_ZERO_IN_DATE', + 'NO_ZERO_DATE', + 'INVALID_DATES', + 'ERROR_FOR_DIVISION_BY_ZERO', + 'TRADITIONAL', + 'NO_AUTO_CREATE_USER', + 'HIGH_NOT_PRECEDENCE' + ) DEFAULT 0 NOT NULL; -- cgit v1.2.1