summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2001-12-26 16:49:10 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2001-12-26 16:49:10 +0200
commit71ce58a3b1f0b2d4ec776bc7864076603b3170f4 (patch)
tree1924b9282a4aed314ccafcecea76220ffcee2576 /scripts
parent1baa552749eab973ce7814a47d4f3826ffd71bfe (diff)
downloadmariadb-git-71ce58a3b1f0b2d4ec776bc7864076603b3170f4.tar.gz
This is a large push. Included are :
* multi-table updates * new paid feature for limiting number of queries per hour for users * optional syntax for multi-table deletes * optimization for SQL_CALC_FOUND_ROWS * a small addition for CREATE .. SELECT that will be of future use I know that all this will require many additions to documentation, which I have not done, but I am at Arjen's disposal to help him document all this. libmysqld/lib_sql.cc: This is a small change required due to new paid feature of limiting number of queries per hour for each user. mysql-test/r/multi_update.result: Change of the result to accomodate multi-table updates mysql-test/t/multi_update.test: Change in multi-table tests to accomodate multi-table updates BitKeeper/etc/ignore: Added 50 sql/new.cc to the ignore list scripts/mysql_install_db.sh: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/item_timefunc.h: This is a small feature that will be of use later in the proper creation of the tables out of CREATE ... SELECT... Further changes will come after this resolve/push/test passes .. sql/lex.h: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/mysql_priv.h: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/mysqld.cc: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/sql_acl.cc: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/sql_acl.h: This is a small change required due to new paid feature of limiting number of queries per hour for each user. sql/sql_class.h: These are changes required for multi-table updates. sql/sql_lex.h: Changes required for both multi-table updates and limiting number of queries per hour (paid feature). sql/sql_parse.cc: Ha ! So many changes. * multi-table updates * limiting number of queries per hour for users sql/sql_select.cc: Optimisation for SQL_CALC_FOUND_ROWS, when a query involves a single table, without WHERE or GROUP clause sql/sql_update.cc: multi-table updates sql/sql_yacc.yy: Many things : * multi-table updates * limiting number of queries per hour for users * new optional syntax for multi-table deletes. This one is different from the one demanded by user. USING clause MUST include ALL tables, not just the ones that are used and not deleted from.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_install_db.sh15
-rw-r--r--scripts/mysql_new_fix_privilege_tables.sh24
2 files changed, 33 insertions, 6 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 0da457582f1..3f4292b3fd7 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -228,18 +228,21 @@ then
c_u="$c_u ssl_cipher BLOB NOT NULL,"
c_u="$c_u x509_issuer BLOB NOT NULL,"
c_u="$c_u x509_subject BLOB NOT NULL,"
+ c_u="$c_u max_questions int(11) unsigned DEFAULT 0 NOT NULL,"
+ c_u="$c_u max_updates int(11) unsigned DEFAULT 0 NOT NULL,"
+ c_u="$c_u max_connections int(11) unsigned DEFAULT 0 NOT NULL,"
c_u="$c_u PRIMARY KEY Host (Host,User)"
c_u="$c_u )"
c_u="$c_u comment='Users and global privileges';"
- i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','NONE','','','');
- INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','NONE','','','');
+ i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','NONE','','','',0,0,0);
+ INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','NONE','','','',0,0,0);
- REPLACE INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','NONE','','','');
- REPLACE INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','NONE','','','');
+ REPLACE INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','NONE','','','',0,0,0);
+ REPLACE INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','NONE','','','',0,0,0);
- INSERT INTO user VALUES ('localhost','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','NONE','','','');
- INSERT INTO user VALUES ('$hostname','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','NONE','','','');"
+ INSERT INTO user VALUES ('localhost','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','NONE','','','',0,0,0);
+ INSERT INTO user VALUES ('$hostname','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','NONE','','','',0,0,0);"
fi
if test ! -f $mdata/func.frm
diff --git a/scripts/mysql_new_fix_privilege_tables.sh b/scripts/mysql_new_fix_privilege_tables.sh
new file mode 100644
index 00000000000..71c6de4ffd1
--- /dev/null
+++ b/scripts/mysql_new_fix_privilege_tables.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+echo "This scripts updates the mysql.user, mysql.db, mysql.host and the"
+echo "mysql.func table to MySQL 3.22.14 and above."
+echo ""
+echo "This is needed if you want to use the new GRANT functions,"
+echo "CREATE AGGREAGATE FUNCTION or want to use the more secure passwords in 3.23"
+echo ""
+echo "If you get Access denied errors, you should run this script again"
+echo "and give the MySQL root user password as a argument!"
+
+root_password="$1"
+host="localhost"
+
+# Fix old password format, add File_priv and func table
+echo ""
+echo "If your tables are already up to date or partially up to date you will"
+echo "get some warnings about 'Duplicated column name'. You can safely ignore these!"
+
+@bindir@/mysql -f --user=root --password="$root_password" --host="$host" mysql <<END_OF_DATA
+alter table user add max_questions int(11) unsigned DEFAULT 0 NOT NULL;
+alter table user add max_updates int(11) unsigned DEFAULT 0 NOT NULL;
+alter table user add max_connections int(11) unsigned DEFAULT 0 NOT NULL;
+END_OF_DATA