diff options
author | unknown <Sinisa@sinisa.nasamreza.org> | 2001-12-26 17:42:06 +0200 |
---|---|---|
committer | unknown <Sinisa@sinisa.nasamreza.org> | 2001-12-26 17:42:06 +0200 |
commit | ececdf09088c0bcf142ae4737c724bf718952fab (patch) | |
tree | 89ec1a3a0a7c33283b19588a9a564d110058eed0 /scripts | |
parent | 20aa6caa56670950d9430ca3a62c069ffe0bdd9d (diff) | |
parent | 71ce58a3b1f0b2d4ec776bc7864076603b3170f4 (diff) | |
download | mariadb-git-ececdf09088c0bcf142ae4737c724bf718952fab.tar.gz |
Changes for the BitKeeper resolve.
One more notice:
limiting number of queries per hour for different users has been done
on 4.0.1 , but I can port it to 3.23.*
This will require only certain changes, like number of columns in user
table.
I will also make a test case for it, after it is approved by Monty,
as result file will depend on the error message text.
BitKeeper/etc/ignore:
auto-union
libmysqld/lib_sql.cc:
Auto merged
scripts/mysql_install_db.sh:
Auto merged
sql/item_timefunc.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_acl.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_update.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/lex.h:
Changes for BitKeeper resolve...
sql/sql_class.h:
Changes for BitKeeper resolve...
sql/sql_lex.h:
Changes for BitKeeper resolve...
sql/sql_parse.cc:
Changes for BitKeeper resolve...
sql/sql_yacc.yy:
Changes for BitKeeper resolve...
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_install_db.sh | 15 | ||||
-rw-r--r-- | scripts/mysql_new_fix_privilege_tables.sh | 24 |
2 files changed, 33 insertions, 6 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index bf577a6cc5c..473b182de25 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 |