diff options
author | Sergei Golubchik <serg@mariadb.org> | 2014-12-02 22:25:16 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2014-12-02 22:25:16 +0100 |
commit | 853077ad7e81be1ade20b4beab1b95d5766d87b1 (patch) | |
tree | 4c158691947ba7beb4577f26b160f243eabf39ef /scripts | |
parent | bf3b4a23f75de50e0f1ab4a562e5801dabc7305b (diff) | |
parent | 2b5db1d5bcd7b46b654d59a07fc119ef6a6b8651 (diff) | |
download | mariadb-git-853077ad7e81be1ade20b4beab1b95d5766d87b1.tar.gz |
Merge branch '10.0' into bb-10.1-merge
Conflicts:
.bzrignore
VERSION
cmake/plugin.cmake
debian/dist/Debian/control
debian/dist/Ubuntu/control
mysql-test/r/join_outer.result
mysql-test/r/join_outer_jcl6.result
mysql-test/r/null.result
mysql-test/r/old-mode.result
mysql-test/r/union.result
mysql-test/t/join_outer.test
mysql-test/t/null.test
mysql-test/t/old-mode.test
mysql-test/t/union.test
packaging/rpm-oel/mysql.spec.in
scripts/mysql_config.sh
sql/ha_ndbcluster.cc
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_cond.cc
sql/item_cmpfunc.h
sql/lock.cc
sql/sql_select.cc
sql/sql_show.cc
sql/sql_update.cc
sql/sql_yacc.yy
storage/innobase/buf/buf0flu.cc
storage/innobase/fil/fil0fil.cc
storage/innobase/include/srv0srv.h
storage/innobase/lock/lock0lock.cc
storage/tokudb/CMakeLists.txt
storage/xtradb/buf/buf0flu.cc
storage/xtradb/fil/fil0fil.cc
storage/xtradb/include/srv0srv.h
storage/xtradb/lock/lock0lock.cc
support-files/mysql.spec.sh
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/CMakeLists.txt | 1 | ||||
-rw-r--r-- | scripts/comp_sql.c | 1 | ||||
-rw-r--r-- | scripts/fill_help_tables.sql | 2 | ||||
-rw-r--r-- | scripts/mysql_secure_installation.sh | 5 | ||||
-rw-r--r-- | scripts/mysql_system_tables_fix.sql | 24 |
5 files changed, 30 insertions, 3 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index c0fc67c0564..4dfe033050e 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -15,6 +15,7 @@ # Build comp_sql - used for embedding SQL in C or C++ programs IF(NOT CMAKE_CROSSCOMPILING) + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include) ADD_EXECUTABLE(comp_sql comp_sql.c) TARGET_LINK_LIBRARIES(comp_sql) ENDIF() diff --git a/scripts/comp_sql.c b/scripts/comp_sql.c index 20dedfdfa14..bcc653a3b7f 100644 --- a/scripts/comp_sql.c +++ b/scripts/comp_sql.c @@ -23,6 +23,7 @@ into other programs */ +#include <my_config.h> #include <stdarg.h> #include <stdlib.h> #include <stdio.h> diff --git a/scripts/fill_help_tables.sql b/scripts/fill_help_tables.sql index 939f15ed45a..15f29c8adc3 100644 --- a/scripts/fill_help_tables.sql +++ b/scripts/fill_help_tables.sql @@ -23,6 +23,8 @@ set names 'utf8'; +set sql_log_bin = 0; + delete from help_topic; delete from help_category; delete from help_keyword; diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh index 9e9bce9fa87..8eca327028e 100644 --- a/scripts/mysql_secure_installation.sh +++ b/scripts/mysql_secure_installation.sh @@ -182,7 +182,7 @@ else fi mysql_command=`find_in_basedir mysql $bindir` -if test -z "$print_defaults" +if test -z "$mysql_command" then cannot_find_file mysql $bindir exit 1 @@ -204,7 +204,7 @@ prepare() { do_query() { echo "$1" >$command #sed 's,^,> ,' < $command # Debugging - $bindir/mysql --defaults-file=$config <$command + $mysql_command --defaults-file=$config <$command return $? } @@ -376,7 +376,6 @@ clean_and_exit() { # The actual script starts here prepare -find_mysql_client set_echo_compat echo diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index dab38bbd48c..231c5951a2d 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -649,6 +649,23 @@ INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now( INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0; DROP TABLE tmp_proxies_priv; +-- Checking for any duplicate hostname and username combination are exists. +-- If exits we will throw error. +DROP PROCEDURE IF EXISTS mysql.count_duplicate_host_names; +DELIMITER // +CREATE PROCEDURE mysql.count_duplicate_host_names() +BEGIN + SET @duplicate_hosts=(SELECT count(*) FROM mysql.user GROUP BY user, lower(host) HAVING count(*) > 1 LIMIT 1); + IF @duplicate_hosts > 1 THEN + SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Multiple accounts exist for @user_name, @host_name that differ only in Host lettercase; remove all except one of them'; + END IF; +END // +DELIMITER ; +CALL mysql.count_duplicate_host_names(); +-- Get warnings (if any) +SHOW WARNINGS; +DROP PROCEDURE mysql.count_duplicate_host_names; + # Convering the host name to lower case for existing users UPDATE user SET host=LOWER( host ) WHERE LOWER( host ) <> host; @@ -694,3 +711,10 @@ alter table tables_priv modify Grantor char(141) COLLATE utf8_bin not null flush privileges; +-- +-- Upgrade help tables +-- + +ALTER TABLE help_category MODIFY url TEXT NOT NULL; +ALTER TABLE help_topic MODIFY url TEXT NOT NULL; + |