From 11d2bb945f676b15da65f197de49b076d2d75258 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 24 Jun 2005 17:59:19 -0700 Subject: If mysql_config is a symlink, resolve it before trying to find the lib and include directories relative to where it is located. (Bug #10986) scripts/mysql_config.sh: If mysql_config is a symlink, try to resolve it --- scripts/mysql_config.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'scripts') diff --git a/scripts/mysql_config.sh b/scripts/mysql_config.sh index a5c8af5ecb2..16e50c044ca 100644 --- a/scripts/mysql_config.sh +++ b/scripts/mysql_config.sh @@ -60,11 +60,19 @@ fix_path () get_full_path () { - case $1 in - /*) echo "$1";; - ./*) tmp=`pwd`/$1; echo $tmp | sed -e 's;/\./;/;' ;; - *) which $1 ;; - esac + file=$1 + + # if the file is a symlink, try to resolve it + if [ -h $file ]; + then + file=`ls -l $file | awk '{ print $NF }'` + fi + + case $file in + /*) echo "$file";; + */*) tmp=`pwd`/$file; echo $tmp | sed -e 's;/\./;/;' ;; + *) which $file ;; + esac } me=`get_full_path $0` -- cgit v1.2.1 From 5c429181187d28a76a555f85aa68425d50bc303f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Jun 2005 05:25:29 +0200 Subject: make_win_src_distribution.sh: Bug#11009, some more cleanup of unneded files from bootstrap scripts/make_win_src_distribution.sh: Bug#11009, some more cleanup of unneded files from bootstrap --- scripts/make_win_src_distribution.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts') diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index b8dd907920c..71d61b7a02d 100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -357,6 +357,9 @@ if [ -d $BASE/SSL/SCCS ] then find $BASE/ -type d -name SCCS -printf " \"%p\"" | xargs rm -r -f fi +find $BASE/ -type d -name .deps -printf " \"%p\"" | xargs rm -r -f +find $BASE/ -type d -name .libs -printf " \"%p\"" | xargs rm -r -f +rm -r -f "$BASE/mysql-test/var" # # Initialize the initial data directory -- cgit v1.2.1 From 200f03fdd4b5a6272789c18a1250f1d790b9e177 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 5 Jul 2005 13:36:36 +0300 Subject: added processing of view grants to table grants (BUG#9795) mysql-test/r/grant.result: test of new table privileges mysql-test/r/system_mysql_db.result: added new table priveleges mysql-test/r/view_grant.result: error changed mysql-test/t/grant.test: test of new table privileges mysql-test/t/view_grant.test: error changed scripts/mysql_create_system_tables.sh: add new table privileges scripts/mysql_fix_privilege_tables.sql: fixed system tables fix script sql/sql_acl.h: fixed coding/decoding new tables grants --- scripts/mysql_create_system_tables.sh | 2 +- scripts/mysql_fix_privilege_tables.sql | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh index a8f6c02b057..bc07d857c4b 100644 --- a/scripts/mysql_create_system_tables.sh +++ b/scripts/mysql_create_system_tables.sh @@ -215,7 +215,7 @@ then c_t="$c_t Table_name char(64) binary DEFAULT '' NOT NULL," c_t="$c_t Grantor char(77) DEFAULT '' NOT NULL," c_t="$c_t Timestamp timestamp(14)," - c_t="$c_t Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') COLLATE utf8_general_ci DEFAULT '' NOT NULL," + c_t="$c_t Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL," c_t="$c_t Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL," c_t="$c_t PRIMARY KEY (Host,Db,User,Table_name)," c_t="$c_t KEY Grantor (Grantor)" diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql index 68b31cf1519..3da2f7504a1 100644 --- a/scripts/mysql_fix_privilege_tables.sql +++ b/scripts/mysql_fix_privilege_tables.sql @@ -260,6 +260,11 @@ ALTER TABLE db ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT ALTER TABLE host ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv; ALTER TABLE user ADD Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER Create_view_priv; +# +# Show/Create views table privileges (v5.0) +# +ALTER TABLE tables_priv MODIFY Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view') COLLATE utf8_general_ci DEFAULT '' NOT NULL; + # # Assign create/show view privileges to people who have create provileges # -- cgit v1.2.1 From 2a04d15596aa2f86fcfc1291f1460e8b92060e39 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 6 Jul 2005 13:58:29 +0200 Subject: - backported a change for make_binary_distribution.sh from 5.0 for easier building of all versions: added an option "--machine" that allows to override the autodetected architecture string (e.g. "i386") that becomes part of the binary package name with a different one - moved the removal of the BASE directory to the end of the make_binary_distribution script scripts/make_binary_distribution.sh: - backported and fixed a change from 5.0 for easier building of all versions: added an option "--machine" that allows to override the autodetected architecture string (e.g. "i386") that becomes part of the binary package name with a different one - moved the removal of the BASE directory to the end of the script --- scripts/make_binary_distribution.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'scripts') diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index ffef1648954..0236d8b8bfe 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -15,6 +15,7 @@ MV="mv" STRIP=1 DEBUG=0 SILENT=0 +MACHINE= TMP=/tmp SUFFIX="" @@ -25,6 +26,7 @@ parse_arguments() { --tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;; --suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;; --no-strip) STRIP=0 ;; + --machine=*) MACHINE=`echo "$arg" | sed -e "s;--machine=;;"` ;; --silent) SILENT=1 ;; *) echo "Unknown argument '$arg'" @@ -252,8 +254,17 @@ if [ -d $BASE/sql-bench/SCCS ] ; then find $BASE/sql-bench -name SCCS -print | xargs rm -r -f fi +# Use the override --machine if present +if [ -n "$MACHINE" ] ; then + machine=$MACHINE +fi + # Change the distribution to a long descriptive name NEW_NAME=mysql@MYSQL_SERVER_SUFFIX@-$version-$system-$machine$SUFFIX + +# Print the platform name for build logs +echo "PLATFORM NAME: $system-$machine" + BASE2=$TMP/$NEW_NAME rm -r -f $BASE2 mv $BASE $BASE2 -- cgit v1.2.1 From 3d2814d6d43bee9e885053f8e910c8c363f00550 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Jul 2005 11:07:05 +0200 Subject: - added mysql-test/t/*.def to the source and binary distributions mysql-test/Makefile.am: - added mysql-test/t/*.def to the source distribution and make sure that "make install" installs it, too. scripts/make_binary_distribution.sh: - added mysql-test/t/*.def to the binary distribution --- scripts/make_binary_distribution.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh index 3b8cc1ca12a..51bebc3ce31 100644 --- a/scripts/make_binary_distribution.sh +++ b/scripts/make_binary_distribution.sh @@ -221,6 +221,7 @@ $CP mysql-test/include/*.inc $BASE/mysql-test/include $CP mysql-test/std_data/*.dat mysql-test/std_data/*.*001 $BASE/mysql-test/std_data $CP mysql-test/std_data/des_key_file $BASE/mysql-test/std_data $CP mysql-test/t/*test mysql-test/t/*.opt mysql-test/t/*.slave-mi mysql-test/t/*.sh $BASE/mysql-test/t +$CP mysql-test/t/*.def $BASE/mysql-test/t $CP mysql-test/r/*result mysql-test/r/*.require $BASE/mysql-test/r if [ $BASE_SYSTEM != "netware" ] ; then -- cgit v1.2.1 From accdff5114b99a3703e73d513db59a33e7da0371 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Jul 2005 16:33:15 +0200 Subject: Fixed BUG#11365: Stored Procedure: Crash on Procedure operation Two separate problems. A key buffer was too small in sp.cc for multi-byte fields, and the creation and fixing of mysql.proc in the scripts hadn't been updated with the correct character sets and collations (like the other system tables had). Note: No special test case, as the use of utf8 for mysql.proc will make any existing crash (if the buffer overrrun wasn't fixed). mysql-test/r/sp-error.result: Updated test case for too long SP names (as the limit has increased with the use of utf8). mysql-test/t/sp-error.test: Updated test case for too long SP names (as the limit has increased with the use of utf8). scripts/mysql_create_system_tables.sh: Use utf8 for mysql.proc, just like for the other system tables. scripts/mysql_fix_privilege_tables.sql: Use utf8 for mysql.proc, just like for the other system tables. (Some tabs also replaced by space) sql/sp.cc: Use a larger key buffer for stored procedures to avoid stack overrun with multi-byte keys. --- scripts/mysql_create_system_tables.sh | 12 +++++---- scripts/mysql_fix_privilege_tables.sql | 45 ++++++++++++++++++++++------------ 2 files changed, 36 insertions(+), 21 deletions(-) (limited to 'scripts') diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh index bc07d857c4b..a3036b5c10b 100644 --- a/scripts/mysql_create_system_tables.sh +++ b/scripts/mysql_create_system_tables.sh @@ -669,7 +669,7 @@ fi if test ! -f $mdata/proc.frm then c_p="$c_p CREATE TABLE proc (" - c_p="$c_p db char(64) binary DEFAULT '' NOT NULL," + c_p="$c_p db char(64) collate utf8_bin DEFAULT '' NOT NULL," c_p="$c_p name char(64) DEFAULT '' NOT NULL," c_p="$c_p type enum('FUNCTION','PROCEDURE') NOT NULL," c_p="$c_p specific_name char(64) DEFAULT '' NOT NULL," @@ -684,7 +684,7 @@ then c_p="$c_p param_list blob DEFAULT '' NOT NULL," c_p="$c_p returns char(64) DEFAULT '' NOT NULL," c_p="$c_p body blob DEFAULT '' NOT NULL," - c_p="$c_p definer char(77) binary DEFAULT '' NOT NULL," + c_p="$c_p definer char(77) collate utf8_bin DEFAULT '' NOT NULL," c_p="$c_p created timestamp," c_p="$c_p modified timestamp," c_p="$c_p sql_mode set(" @@ -718,10 +718,12 @@ then 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 ) DEFAULT '' NOT NULL," + c_p="$c_p comment char(64) collate utf8_bin DEFAULT '' NOT NULL," c_p="$c_p PRIMARY KEY (db,name,type)" - c_p="$c_p ) comment='Stored Procedures';" + c_p="$c_p ) engine=MyISAM" + c_p="$c_p character set utf8" + c_p="$c_p comment='Stored Procedures';" fi cat << END_OF_DATA diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_fix_privilege_tables.sql index 3da2f7504a1..b93e0a47b1b 100644 --- a/scripts/mysql_fix_privilege_tables.sql +++ b/scripts/mysql_fix_privilege_tables.sql @@ -412,22 +412,22 @@ PRIMARY KEY TranTime (Transition_time) # CREATE TABLE IF NOT EXISTS proc ( - db char(64) binary DEFAULT '' NOT NULL, + db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, 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', - 'NO_SQL', - 'READS_SQL_DATA', - 'MODIFIES_SQL_DATA' - ) DEFAULT 'CONTAINS_SQL' NOT NULL, + '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, returns char(64) DEFAULT '' NOT NULL, body blob DEFAULT '' NOT NULL, - definer char(77) binary DEFAULT '' NOT NULL, + definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp, modified timestamp, sql_mode set( @@ -461,20 +461,22 @@ CREATE TABLE IF NOT EXISTS proc ( 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' - ) DEFAULT 0 NOT NULL, - comment char(64) binary DEFAULT '' NOT NULL, + ) DEFAULT '' NOT NULL, + comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) -) comment='Stored Procedures'; +) engine=MyISAM + character set utf8 + comment='Stored Procedures'; # 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 sql_data_access - enum('CONTAINS_SQL', - 'NO_SQL', - 'READS_SQL_DATA', - 'MODIFIES_SQL_DATA' - ) DEFAULT 'CONTAINS_SQL' NOT NULL, + MODIFY sql_data_access + enum('CONTAINS_SQL', + 'NO_SQL', + 'READS_SQL_DATA', + 'MODIFIES_SQL_DATA' + ) DEFAULT 'CONTAINS_SQL' NOT NULL, MODIFY sql_mode set('REAL_AS_FLOAT', 'PIPES_AS_CONCAT', @@ -506,4 +508,15 @@ ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL, 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' - ) DEFAULT 0 NOT NULL; + ) DEFAULT '' NOT NULL + DEFAULT CHARACTER SET utf8; + +# Correct the character set and collation +ALTER TABLE proc CONVERT TO CHARACTER SET utf8; +# Reset some fields after the conversion +ALTER TABLE proc MODIFY db + char(64) collate utf8_bin DEFAULT '' NOT NULL, + MODIFY definer + char(77) collate utf8_bin DEFAULT '' NOT NULL, + MODIFY comment + char(64) collate utf8_bin DEFAULT '' NOT NULL; -- cgit v1.2.1