diff --git a/.bzrignore b/.bzrignore index 9b90cd97d84..2b5b42cb87f 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1351,3 +1351,5 @@ win/vs71cache.txt win/vs8cache.txt zlib/*.ds? zlib/*.vcproj +scripts/make_win_src_distribution_old +server-tools/instance-manager/net_serv.cc diff --git a/Docs/Makefile.am b/Docs/Makefile.am index dac256f8fd6..629618609a3 100644 --- a/Docs/Makefile.am +++ b/Docs/Makefile.am @@ -13,7 +13,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -EXTRA_DIST = mysql.info INSTALL-BINARY +EXTRA_DIST = mysql.info INSTALL-BINARY @extra_docs@ # make sure that "make install" installs the info page, too # automake only seems to take care of this automatically, diff --git a/Makefile.am b/Makefile.am index c1bdbb22e8e..52a9dcbd389 100644 --- a/Makefile.am +++ b/Makefile.am @@ -102,7 +102,7 @@ dist-hook: rm -rf `find $(distdir) -type d -name SCCS -print` rm -f `find $(distdir) -type l -print` mkdir -p $(distdir)/win - scripts/mysql_install_db --no-defaults --windows \ + scripts/mysql_install_db --no-defaults --cross-bootstrap \ --basedir=$(top_builddir) \ --datadir=$(distdir)/win/data \ --srcdir=$(top_srcdir) diff --git a/configure.in b/configure.in index e042bb80719..ead2f85afb7 100644 --- a/configure.in +++ b/configure.in @@ -2452,10 +2452,15 @@ AC_ARG_WITH(docs, if test "$with_docs" = "yes" then docs_dirs="Docs" + if test -f "$srcdir/Docs/manual.chm" ; then + extra_docs="manual.chm" + fi else docs_dirs="" + extra_docs="" fi AC_SUBST(docs_dirs) +AC_SUBST(extra_docs) # Shall we build the man pages? AC_ARG_WITH(man, diff --git a/include/my_global.h b/include/my_global.h index dd3bc39413d..08877300d8a 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -109,36 +109,31 @@ The macros below are used to allow build of Universal/fat binaries of MySQL and MySQL applications under darwin. */ -#ifdef TARGET_FAT_BINARY -# undef SIZEOF_CHARP -# undef SIZEOF_INT -# undef SIZEOF_LONG -# undef SIZEOF_LONG_LONG -# undef SIZEOF_OFF_T -# undef SIZEOF_SHORT - -#if defined(__i386__) -# undef WORDS_BIGENDIAN -# define SIZEOF_CHARP 4 -# define SIZEOF_INT 4 -# define SIZEOF_LONG 4 -# define SIZEOF_LONG_LONG 8 -# define SIZEOF_OFF_T 8 -# define SIZEOF_SHORT 2 - -#elif defined(__ppc__) -# define WORDS_BIGENDIAN -# define SIZEOF_CHARP 4 -# define SIZEOF_INT 4 -# define SIZEOF_LONG 4 -# define SIZEOF_LONG_LONG 8 -# define SIZEOF_OFF_T 8 -# define SIZEOF_SHORT 2 - -#else -# error Building FAT binary for an unknown architecture. -#endif -#endif /* TARGET_FAT_BINARY */ +#if defined(__APPLE__) && defined(__MACH__) +# undef SIZEOF_CHARP +# undef SIZEOF_SHORT +# undef SIZEOF_INT +# undef SIZEOF_LONG +# undef SIZEOF_LONG_LONG +# undef SIZEOF_OFF_T +# undef WORDS_BIGENDIAN +# define SIZEOF_SHORT 2 +# define SIZEOF_INT 4 +# define SIZEOF_LONG_LONG 8 +# define SIZEOF_OFF_T 8 +# if defined(__i386__) || defined(__ppc__) +# define SIZEOF_CHARP 4 +# define SIZEOF_LONG 4 +# elif defined(__x86_64__) || defined(__ppc64__) +# define SIZEOF_CHARP 8 +# define SIZEOF_LONG 8 +# else +# error Building FAT binary for an unknown architecture. +# endif +# if defined(__ppc__) || defined(__ppc64__) +# define WORDS_BIGENDIAN +# endif +#endif /* defined(__APPLE__) && defined(__MACH__) */ /* diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result index 3bb56a82612..7f94f266102 100644 --- a/mysql-test/suite/funcs_1/r/innodb_views.result +++ b/mysql-test/suite/funcs_1/r/innodb_views.result @@ -9836,16 +9836,23 @@ f2 two SET sql_mode = 'traditional,ansi'; CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", +3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", +'->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" +FROM t1 WHERE f1 = 2; +CREATE OR REPLACE VIEW v1 AS SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", '->' || CAST(f3 AS CHAR) || '<-' AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " FROM t1 WHERE f1 = 2; +ERROR 42000: Incorrect column name 'pure column f3: ' SELECT * FROM v1; -pure column f3: 2.20000 -sum of columns f1 + f3 = 4.20000 -product of constants 3 * (- 0.11111E+1): -3.3333 -expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- +pure column f3: 2.20000 +sum of columns f1 + f3 = 4.20000 +product of constants 3 * (- 0.11111E+1): -3.3333 +expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- SET sql_mode = ''; Testcases 3.3.1.55 - 3.3.1.62 diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result index 69dee081446..5fae2f8700a 100644 --- a/mysql-test/suite/funcs_1/r/memory_views.result +++ b/mysql-test/suite/funcs_1/r/memory_views.result @@ -9841,16 +9841,23 @@ f2 two SET sql_mode = 'traditional,ansi'; CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", +3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", +'->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" +FROM t1 WHERE f1 = 2; +CREATE OR REPLACE VIEW v1 AS SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", '->' || CAST(f3 AS CHAR) || '<-' AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " FROM t1 WHERE f1 = 2; +ERROR 42000: Incorrect column name 'pure column f3: ' SELECT * FROM v1; -pure column f3: 2.20000 -sum of columns f1 + f3 = 4.20000 -product of constants 3 * (- 0.11111E+1): -3.3333 -expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- +pure column f3: 2.20000 +sum of columns f1 + f3 = 4.20000 +product of constants 3 * (- 0.11111E+1): -3.3333 +expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- SET sql_mode = ''; Testcases 3.3.1.55 - 3.3.1.62 diff --git a/mysql-test/suite/funcs_1/r/myisam_views.result b/mysql-test/suite/funcs_1/r/myisam_views.result index 83af04dcd2c..6f80aa12097 100644 --- a/mysql-test/suite/funcs_1/r/myisam_views.result +++ b/mysql-test/suite/funcs_1/r/myisam_views.result @@ -9858,16 +9858,23 @@ f2 two SET sql_mode = 'traditional,ansi'; CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", +3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", +'->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" +FROM t1 WHERE f1 = 2; +CREATE OR REPLACE VIEW v1 AS SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", '->' || CAST(f3 AS CHAR) || '<-' AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): " FROM t1 WHERE f1 = 2; +ERROR 42000: Incorrect column name 'pure column f3: ' SELECT * FROM v1; -pure column f3: 2.20000 -sum of columns f1 + f3 = 4.20000 -product of constants 3 * (- 0.11111E+1): -3.3333 -expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- +pure column f3: 2.20000 +sum of columns f1 + f3 = 4.20000 +product of constants 3 * (- 0.11111E+1): -3.3333 +expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR): ->2.20000<- SET sql_mode = ''; Testcases 3.3.1.55 - 3.3.1.62 diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc index b06873af159..6c4992d235c 100644 --- a/mysql-test/suite/funcs_1/views/views_master.inc +++ b/mysql-test/suite/funcs_1/views/views_master.inc @@ -2410,6 +2410,15 @@ SELECT * FROM v1; # 3.3.1.54 --vertical_results SET sql_mode = 'traditional,ansi'; +# due to bug#32496 "no trailing blanks in identifier". +CREATE OR REPLACE VIEW v1 AS +SELECT f3 AS "pure column f3:", f1 + f3 AS "sum of columns f1 + f3 =", + 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1):", + '->' || CAST(f3 AS CHAR) || '<-' + AS "expression with '||'=CONCAT and CAST(DECIMAL column AS CHAR):" +FROM t1 WHERE f1 = 2; +# This error is not conformant with ansi (see bug#32496). hhunger +--error ER_WRONG_COLUMN_NAME CREATE OR REPLACE VIEW v1 AS SELECT f3 AS "pure column f3: ", f1 + f3 AS "sum of columns f1 + f3 = ", 3 * (- 0.11111E+1) AS "product of constants 3 * (- 0.11111E+1): ", diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 5716d4f51c0..bc887c83088 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -30,13 +30,15 @@ user="" force=0 in_rpm=0 ip_only=0 -windows=0 +cross_bootstrap=0 usage() { cat <&1` if [ $? -ne 0 ] @@ -329,6 +330,16 @@ then args="$args --user=$user" fi +# When doing a "cross bootstrap" install, no reference to the current +# host should be added to the system tables. So we filter out any +# lines which contain the current host name. +if test $cross_bootstrap -eq 1 +then + filter_cmd_line="sed -e '/@current_hostname/d'" +else + filter_cmd_line="cat" +fi + # Peform the install of system tables mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}" mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \ @@ -337,15 +348,14 @@ mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \ # Pipe mysql_system_tables.sql to "mysqld --bootstrap" s_echo "Installing MySQL system tables..." -if `(echo "use mysql;"; cat $create_system_tables $fill_system_tables) | $mysqld_install_cmd_line` +if { echo "use mysql;"; cat $create_system_tables $fill_system_tables; } | eval "$filter_cmd_line" | $mysqld_install_cmd_line > /dev/null then s_echo "OK" s_echo "Filling help tables..." # Pipe fill_help_tables.sql to "mysqld --bootstrap" - if `(echo "use mysql;"; cat $fill_help_tables) | $mysqld_install_cmd_line` + if { echo "use mysql;"; cat $fill_help_tables; } | $mysqld_install_cmd_line > /dev/null then - # Fill suceeded s_echo "OK" else echo @@ -359,14 +369,12 @@ then s_echo "support-files/mysql.server to the right place for your system" s_echo - if test "$windows" -eq 0 + if test "$cross_bootstrap" -eq 0 then - # A root password should of course also be set on Windows! - # The reason for not displaying these prompts here is that when - # executing this script with the --windows argument the script - # is used to generate system tables mainly used by the - # windows installer. And thus the password should not be set until - # those files has been copied to the target system + # This is not a true installation on a running system. The end user must + # set a password after installing the data files on the real host system. + # At this point, there is no end user, so it does not make sense to print + # this reminder. echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !" echo "To do so, start the server, then issue the following commands:" echo "$bindir/mysqladmin -u root password 'new-password'" diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql index 47d4ea5d950..ce23953a1a5 100644 --- a/scripts/mysql_system_tables_data.sql +++ b/scripts/mysql_system_tables_data.sql @@ -2,6 +2,12 @@ -- The inital data for system tables of MySQL Server -- +-- When setting up a "cross bootstrap" database (e.g., creating data on a Unix +-- host which will later be included in a Windows zip file), any lines +-- containing "@current_hostname" are filtered out by mysql_install_db. +set @current_hostname= @@hostname; + + -- Fill "db" table with default grants for anyone to -- access database 'test' and 'test_%' if "db" table didn't exist CREATE TEMPORARY TABLE tmp_db LIKE db; @@ -15,10 +21,9 @@ DROP TABLE tmp_db; -- from local machine if "users" table didn't exist before CREATE TEMPORARY TABLE tmp_user LIKE user; INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); -set @hostname= @@hostname; -REPLACE INTO tmp_user VALUES (@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); +REPLACE INTO tmp_user VALUES (@current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO tmp_user (host,user) VALUES ('localhost',''); -INSERT INTO tmp_user (host,user) VALUES (@@hostname,''); +INSERT INTO tmp_user (host,user) VALUES (@current_hostname,''); INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; DROP TABLE tmp_user;