diff options
author | unknown <pem@mysql.comhem.se> | 2004-10-14 18:07:09 +0200 |
---|---|---|
committer | unknown <pem@mysql.comhem.se> | 2004-10-14 18:07:09 +0200 |
commit | f7635ca52c37521fe758e950a9ef60b574b899bf (patch) | |
tree | 60fbcabd11aa23d99818bc782b6d0eedaf744703 /scripts | |
parent | 4250868b62af2eee215a59624bce81cd61833a42 (diff) | |
download | mariadb-git-f7635ca52c37521fe758e950a9ef60b574b899bf.tar.gz |
Implemented the stored procedure data access characteristics:
NO SQL
CONTAINS SQL (default)
READS SQL DATA
MODIFIES SQL DATA
These are needed as hints for the replication.
(Before this, we did have the default in the mysql.proc table, but no support in the parser.)
mysql-test/r/sp.result:
Modified test cases for new data access characteristics.
mysql-test/t/sp.test:
Modified test cases for new data access characteristics.
scripts/mysql_create_system_tables.sh:
We now support all the SP data access characteristics (not just CONTAINS SQL).
scripts/mysql_fix_privilege_tables.sql:
We now support all the SP data access characteristics (not just CONTAINS SQL).
sql/lex.h:
New tokens for SP data access characteristics.
sql/sp.cc:
Store, print and support alter of data access characteristics.
sql/sp_head.cc:
Added SP_ prefix to some symbols.
sql/sql_lex.h:
Added SP_ prefix to some symbols, and added SP data access enum.
sql/sql_yacc.yy:
Parse SP data access characteristics.
(And allow "alter ... language sql", mostly as a formality, it was accidently
put in the wrong clause before.)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_create_system_tables.sh | 6 | ||||
-rw-r--r-- | scripts/mysql_fix_privilege_tables.sql | 16 |
2 files changed, 18 insertions, 4 deletions
diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh index 5a2a45c4b3d..7a4da55f851 100644 --- a/scripts/mysql_create_system_tables.sh +++ b/scripts/mysql_create_system_tables.sh @@ -644,7 +644,11 @@ then c_p="$c_p type enum('FUNCTION','PROCEDURE') NOT NULL," c_p="$c_p specific_name char(64) DEFAULT '' NOT NULL," c_p="$c_p language enum('SQL') DEFAULT 'SQL' NOT NULL," - c_p="$c_p sql_data_access enum('CONTAINS_SQL') DEFAULT 'CONTAINS_SQL' NOT NULL," + c_p="$c_p sql_data_access enum('CONTAINS_SQL'," + c_p="$c_p 'NO_SQL'," + c_p="$c_p 'READS_SQL_DATA'," + c_p="$c_p 'MODIFIES_SQL_DATA'" + c_p="$c_p ) DEFAULT 'CONTAINS_SQL' NOT NULL," c_p="$c_p is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL," c_p="$c_p security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL," c_p="$c_p param_list blob DEFAULT '' NOT NULL," diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql index 3c01b69f57e..cae6a1d07b9 100644 --- a/scripts/mysql_fix_privilege_tables.sql +++ b/scripts/mysql_fix_privilege_tables.sql @@ -254,7 +254,11 @@ CREATE TABLE IF NOT EXISTS proc ( type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, - sql_data_access enum('CONTAINS_SQL') DEFAULT 'CONTAINS_SQL' NOT NULL, + sql_data_access enum('CONTAINS_SQL', + 'NO_SQL', + 'READS_SQL_DATA', + 'MODIFIES_SQL_DATA' + ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob DEFAULT '' NOT NULL, @@ -289,6 +293,12 @@ CREATE TABLE IF NOT EXISTS proc ( PRIMARY KEY (db,name,type) ) comment='Stored Procedures'; -# Correct the name fields to not binary +# Correct the name fields to not binary, and expand sql_data_access ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL, - MODIFY specific_name char(64) DEFAULT '' NOT NULL; + MODIFY specific_name char(64) DEFAULT '' NOT NULL, + MODIFY sql_data_access + enum('CONTAINS_SQL', + 'NO_SQL', + 'READS_SQL_DATA', + 'MODIFIES_SQL_DATA' + ) DEFAULT 'CONTAINS_SQL' NOT NULL; |