[Commits] 860576f: Merge branch '10.0' into 10.0-galera

nirbhay at mariadb.com nirbhay at mariadb.com
Thu Feb 19 01:08:47 EET 2015


revision-id: 860576f4161ab0ea29bf7ecf6dee0e9d10b6fed6
parent(s): cd187ecf90e9988e5a729a1a4db7239e3baa2e6c f37bdd9c1a29865574b10fe7d21164ee7cae4d19
committer: Nirbhay Choubey
branch nick: 10.0-galera
timestamp: 2015-02-18 18:07:45 -0500
message:

Merge branch '10.0' into 10.0-galera

Merge branch 10.0 till revision:
f37bdd9 - Merge remote-tracking branch 'github/10.0' into 10.0

Conflicts:
	.bzrignore
	storage/xtradb/CMakeLists.txt


 .bzrignore                                         | 1217 --------------------
 .gitattributes                                     |    5 +
 .gitignore                                         |  232 ++++
 CMakeLists.txt                                     |   10 +-
 VERSION                                            |    2 +-
 client/mysqlcheck.c                                |   34 +-
 cmake/cpack_source_ignore_files.cmake              |    5 +-
 cmake/info_macros.cmake.in                         |   47 +-
 cmake/info_src.cmake                               |    8 +-
 cmake/make_dist.cmake.in                           |   41 +-
 cmake/plugin.cmake                                 |    7 -
 .../Debian/mariadb-galera-server-10.0.files.in     |    2 +
 .../Ubuntu/mariadb-galera-server-10.0.files.in     |    2 +
 .../Ubuntu/mariadb-galera-server-10.0.postinst     |    2 +-
 extra/yassl/README                                 |   10 +
 extra/yassl/examples/client/client.cpp             |   11 +-
 extra/yassl/examples/server/server.cpp             |   23 +-
 extra/yassl/include/openssl/ssl.h                  |    2 +-
 extra/yassl/include/yassl_int.hpp                  |   21 +
 extra/yassl/src/yassl_imp.cpp                      |   29 +-
 extra/yassl/src/yassl_int.cpp                      |   76 ++
 extra/yassl/taocrypt/src/asn.cpp                   |    8 +-
 extra/yassl/taocrypt/src/integer.cpp               |   10 +-
 extra/yassl/testsuite/cipher-test.sh               |  130 +++
 extra/yassl/testsuite/test.hpp                     |   42 +-
 include/mysql.h                                    |    6 +
 include/mysql.h.pp                                 |    2 +
 include/welcome_copyright_notice.h                 |    6 +-
 libmysql/CMakeLists.txt                            |    3 +
 libmysql/libmysql.c                                |   17 +
 mysql-test/extra/binlog_tests/database.test        |   35 +
 mysql-test/lib/generate-ssl-certs.sh               |   31 +
 mysql-test/r/create.result                         |    2 +-
 mysql-test/r/error_simulation.result               |   21 +
 mysql-test/r/file_contents.result                  |    2 +-
 mysql-test/r/gis.result                            |    3 +
 mysql-test/r/group_by_innodb.result                |   44 +
 mysql-test/r/information_schema.result             |   15 +
 mysql-test/r/mysqlcheck.result                     |   11 +-
 mysql-test/r/openssl_1.result                      |    4 +-
 mysql-test/r/ssl.result                            |    4 +-
 mysql-test/r/view.result                           |   15 +-
 mysql-test/std_data/cacert.pem                     |   97 +-
 mysql-test/std_data/client-cert.pem                |  121 +-
 mysql-test/std_data/client-key.pem                 |   38 +-
 mysql-test/std_data/server-cert.pem                |  121 +-
 mysql-test/std_data/server-key.pem                 |   38 +-
 mysql-test/std_data/server8k-cert.pem              |  246 +++-
 mysql-test/std_data/server8k-key.pem               |  110 +-
 mysql-test/suite/binlog/r/binlog_database.result   |   69 +-
 mysql-test/suite/innodb/r/innodb-mdev-7055.result  |    1 +
 mysql-test/suite/innodb/r/innodb-mdev-7513.result  |  204 ++++
 mysql-test/suite/innodb/t/innodb-mdev-7055.test    |   23 +
 mysql-test/suite/innodb/t/innodb-mdev-7513.test    |  220 ++++
 mysql-test/suite/innodb/t/innodb_corrupt_bit.test  |    9 +-
 mysql-test/suite/plugins/r/server_audit.result     |  139 ++-
 mysql-test/suite/plugins/t/server_audit.test       |   40 +-
 mysql-test/suite/rpl/r/rpl_drop_db_fail.result     |   16 +
 mysql-test/suite/rpl/t/rpl_drop_db_fail.test       |   32 +
 mysql-test/t/error_simulation-master.opt           |    1 +
 mysql-test/t/error_simulation.test                 |   36 +
 mysql-test/t/file_contents.test                    |    4 +-
 mysql-test/t/gis.test                              |    5 +
 mysql-test/t/group_by_innodb.test                  |   40 +
 mysql-test/t/information_schema.test               |   17 +
 mysql-test/t/mysqlcheck.test                       |   14 +-
 mysql-test/t/openssl_1.test                        |    4 +-
 mysql-test/t/view.test                             |   22 +
 packaging/WiX/custom_ui.wxs                        |    4 +-
 plugin/server_audit/server_audit.c                 |  557 ++++++++-
 scripts/mysql_install_db.pl.in                     |    4 +-
 scripts/mysql_install_db.sh                        |    4 +-
 scripts/mysqld_safe.sh                             |   14 +-
 sql-common/client.c                                |    4 +-
 sql/CMakeLists.txt                                 |   11 +-
 sql/field.h                                        |   28 +-
 sql/item_func.cc                                   |    8 +-
 sql/item_geofunc.cc                                |    8 +
 sql/rpl_mi.cc                                      |    3 +-
 sql/sql_base.cc                                    |    3 +
 sql/sql_db.cc                                      |    6 +-
 sql/sql_delete.cc                                  |    5 +-
 sql/sql_derived.cc                                 |   21 +-
 sql/sql_derived.h                                  |    1 +
 sql/sql_insert.cc                                  |   27 +-
 sql/sql_select.cc                                  |    4 +-
 sql/sql_view.cc                                    |   10 +
 sql/table.cc                                       |   28 +-
 sql/table.h                                        |   18 +
 sql/udf_example.c                                  |    5 +-
 storage/federated/ha_federated.cc                  |    6 +-
 storage/innobase/handler/ha_innodb.cc              |    4 +
 storage/innobase/ibuf/ibuf0ibuf.cc                 |    8 +
 storage/innobase/rem/rem0rec.cc                    |    4 +-
 .../doc2/sysbench.update.ma10.tokudb754.loglog.png |  Bin 6947 -> 7209 bytes
 .../tokudb/doc2/sysbench.update.ma10.tokudb754.png |  Bin 7351 -> 7527 bytes
 storage/tokudb/ha_tokudb.cc                        |   43 +-
 storage/tokudb/ha_tokudb_admin.cc                  |   39 +-
 storage/tokudb/hatoku_defines.h                    |    3 +
 storage/tokudb/hatoku_hton.cc                      |   50 +-
 storage/tokudb/hatoku_hton.h                       |    9 +
 storage/tokudb/mysql-test/rpl/disabled.def         |    3 +
 .../rpl/r/rpl_tokudb_read_only_ff.result           |   14 +
 .../rpl/r/rpl_tokudb_read_only_ft.result           |   14 +
 .../rpl/r/rpl_tokudb_read_only_tf.result           |   14 +
 .../rpl/r/rpl_tokudb_read_only_tt.result           |   14 +
 .../rpl/t/rpl_tokudb_read_only_ff-slave.opt        |    1 +
 .../mysql-test/rpl/t/rpl_tokudb_read_only_ff.test  |   53 +
 .../rpl/t/rpl_tokudb_read_only_ft-slave.opt        |    1 +
 .../mysql-test/rpl/t/rpl_tokudb_read_only_ft.test  |   53 +
 .../rpl/t/rpl_tokudb_read_only_tf-slave.opt        |    1 +
 .../mysql-test/rpl/t/rpl_tokudb_read_only_tf.test  |   53 +
 .../rpl/t/rpl_tokudb_read_only_tt-slave.opt        |    1 +
 .../mysql-test/rpl/t/rpl_tokudb_read_only_tt.test  |   53 +
 .../tokudb_bugs/r/db788-optimize-index-name.result |   19 +
 .../tokudb/mysql-test/tokudb_bugs/r/db801.result   |   18 +
 .../mysql-test/tokudb_bugs/r/memcache_dirty.result |   14 -
 .../tokudb_bugs/t/db788-optimize-index-name.test   |   21 +
 storage/tokudb/mysql-test/tokudb_bugs/t/db801.test |   50 +
 .../mysql-test/tokudb_bugs/t/memcache_dirty.test   |   25 -
 storage/tokudb/scripts/common.sh                   |   24 +-
 storage/tokudb/scripts/make.mysql.bash             |   15 +-
 storage/tokudb/scripts/make.mysql.debug.env.bash   |    6 +-
 storage/xtradb/CMakeLists.txt                      |    8 +
 storage/xtradb/handler/ha_innodb.cc                |    4 +
 storage/xtradb/ibuf/ibuf0ibuf.cc                   |    6 +
 storage/xtradb/rem/rem0rec.cc                      |    4 +-
 support-files/build-tags                           |    4 +-
 support-files/mysql.server.sh                      |    3 +
 vio/viosslfactories.c                              |    6 +-
 win/packaging/extra.wxs.in                         |   16 +-
 win/packaging/heidisql.cmake                       |    2 +-
 win/packaging/heidisql.wxi.in                      |   28 +-
 133 files changed, 3612 insertions(+), 1739 deletions(-)

diff --cc debian/dist/Debian/mariadb-galera-server-10.0.files.in
index bf1b04b,0000000..fd914e7
mode 100644,000000..100644
--- a/debian/dist/Debian/mariadb-galera-server-10.0.files.in
+++ b/debian/dist/Debian/mariadb-galera-server-10.0.files.in
@@@ -1,116 -1,0 +1,118 @@@
 +usr/sbin/mysqld
 +usr/lib/mysql/plugin/auth_pam.so
 +usr/lib/mysql/plugin/auth_socket.so
 +usr/lib/mysql/plugin/ha_mroonga.so
++usr/lib/mysql/plugin/ha_oqgraph.so
 +usr/lib/mysql/plugin/ha_sequence.so
 +usr/lib/mysql/plugin/ha_sphinx.so
 +usr/lib/mysql/plugin/ha_innodb.so
 +usr/lib/mysql/plugin/handlersocket.so
 +usr/lib/mysql/plugin/locales.so
 +usr/lib/mysql/plugin/metadata_lock_info.so
 +usr/lib/mysql/plugin/query_cache_info.so
 +usr/lib/mysql/plugin/query_response_time.so
 +usr/lib/mysql/plugin/semisync_master.so
 +usr/lib/mysql/plugin/semisync_slave.so
 +usr/lib/mysql/plugin/sql_errlog.so
 +usr/lib/mysql/plugin/server_audit.so
++usr/lib/mysql/plugin/sphinx.so
 +usr/lib/libhsclient.so.*
 +etc/mysql/debian-start
 +etc/mysql/conf.d/mysqld_safe_syslog.cnf
 +usr/bin/msql2mysql
 +usr/bin/my_print_defaults
 +usr/bin/myisamchk
 +usr/bin/myisam_ftdump
 +usr/bin/myisamlog
 +usr/bin/myisampack
 +usr/bin/aria_pack
 +usr/bin/aria_read_log
 +usr/bin/aria_ftdump
 +usr/bin/aria_chk
 +usr/bin/aria_dump_log
 +usr/bin/mysql_convert_table_format
 +usr/bin/mysql_install_db
 +usr/bin/mysql_plugin
 +usr/bin/mysql_secure_installation
 +usr/bin/mysql_setpermission
 +usr/bin/mysql_tzinfo_to_sql
 +usr/bin/mysql_upgrade
 +usr/bin/mysql_zap
 +usr/bin/mysqlbinlog
 +usr/bin/mysqld_multi
 +usr/bin/mysqld_safe
 +usr/bin/mysqlhotcopy
 +usr/bin/perror
 +usr/bin/replace
 +usr/bin/resolve_stack_dump
 +usr/bin/resolveip
 +usr/bin/wsrep_sst_common
 +usr/bin/wsrep_sst_mysqldump
 +usr/bin/wsrep_sst_rsync
 +usr/bin/wsrep_sst_xtrabackup
 +usr/bin/wsrep_sst_xtrabackup-v2
 +usr/share/doc/mariadb-galera-server-10.0/mysqld.sym.gz
 +usr/share/doc/mariadb-galera-server-10.0/INFO_SRC
 +usr/share/doc/mariadb-galera-server-10.0/INFO_BIN
 +usr/share/doc/mariadb-galera-server-10.0/README-wsrep
 +usr/share/lintian/overrides/mariadb-galera-server-10.0
 +usr/share/man/man1/msql2mysql.1
 +usr/share/man/man1/myisamchk.1
 +usr/share/man/man1/myisam_ftdump.1
 +usr/share/man/man1/myisamlog.1
 +usr/share/man/man1/myisampack.1
 +usr/share/man/man1/my_print_defaults.1
 +usr/share/man/man1/mysqlbinlog.1
 +usr/share/man/man1/mysql_convert_table_format.1
 +usr/share/man/man1/mysqld_multi.1
 +usr/share/man/man1/mysqld_safe.1
 +usr/share/man/man1/mysqlhotcopy.1
 +usr/share/man/man1/mysql_install_db.1
 +usr/share/man/man1/mysql_secure_installation.1
 +usr/share/man/man1/mysql_setpermission.1
 +usr/share/man/man1/mysql_upgrade.1
 +usr/share/man/man1/mysql_zap.1
 +usr/share/man/man1/perror.1
 +usr/share/man/man1/replace.1
 +usr/share/man/man1/resolveip.1
 +usr/share/man/man1/resolve_stack_dump.1
 +usr/share/man/man1/innochecksum.1
 +usr/share/man/man1/mysql_tzinfo_to_sql.1
 +usr/share/man/man8/mysqld.8
 +usr/share/mysql/charsets
 +usr/share/mysql/czech
 +usr/share/mysql/danish
 +usr/share/mysql/dutch
 +usr/share/mysql/english
 +usr/share/mysql/estonian
 +usr/share/mysql/french
 +usr/share/mysql/german
 +usr/share/mysql/greek
 +usr/share/mysql/hungarian
 +usr/share/mysql/italian
 +usr/share/mysql/japanese
 +usr/share/mysql/korean
 +usr/share/mysql/norwegian
 +usr/share/mysql/norwegian-ny
 +usr/share/mysql/polish
 +usr/share/mysql/portuguese
 +usr/share/mysql/romanian
 +usr/share/mysql/russian
 +usr/share/mysql/serbian
 +usr/share/mysql/slovak
 +usr/share/mysql/spanish
 +usr/share/mysql/swedish
 +usr/share/mysql/ukrainian
 +usr/share/mysql/debian-start.inc.sh
 +usr/share/mysql/echo_stderr
 +usr/share/mysql/errmsg-utf8.txt
 +usr/share/mysql/fill_help_tables.sql
 +usr/share/mysql/mysql_system_tables_data.sql
 +usr/share/mysql/mysql_system_tables.sql
 +usr/share/mysql/mysql_performance_tables.sql
 +usr/share/mysql/mysql_test_data_timezone.sql
 + at CASSANDRA_DEB_FILES@
 + at SPIDER_DEB_FILES@
 + at TOKUDB_DEB_FILES@
 +usr/share/mysql/wsrep.cnf
 +usr/share/mysql/wsrep_notify
diff --cc debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in
index 368400c,0000000..a3587d1
mode 100644,000000..100644
--- a/debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in
+++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.files.in
@@@ -1,118 -1,0 +1,120 @@@
 +usr/sbin/mysqld
 +usr/lib/mysql/plugin/auth_pam.so
 +usr/lib/mysql/plugin/auth_socket.so
 +usr/lib/mysql/plugin/ha_mroonga.so
++usr/lib/mysql/plugin/ha_oqgraph.so
 +usr/lib/mysql/plugin/ha_sequence.so
 +usr/lib/mysql/plugin/ha_sphinx.so
 +usr/lib/mysql/plugin/ha_innodb.so
 +usr/lib/mysql/plugin/handlersocket.so
 +usr/lib/mysql/plugin/locales.so
 +usr/lib/mysql/plugin/metadata_lock_info.so
 +usr/lib/mysql/plugin/query_cache_info.so
 +usr/lib/mysql/plugin/query_response_time.so
 +usr/lib/mysql/plugin/semisync_master.so
 +usr/lib/mysql/plugin/semisync_slave.so
 +usr/lib/mysql/plugin/sql_errlog.so
 +usr/lib/mysql/plugin/server_audit.so
++usr/lib/mysql/plugin/sphinx.so
 +usr/lib/libhsclient.so.*
 +etc/apparmor.d/usr.sbin.mysqld
 +usr/share/apport/package-hooks/source_mariadb-10.0.py
 +etc/mysql/debian-start
 +etc/mysql/conf.d/mysqld_safe_syslog.cnf
 +usr/bin/msql2mysql
 +usr/bin/my_print_defaults
 +usr/bin/myisamchk
 +usr/bin/myisam_ftdump
 +usr/bin/myisamlog
 +usr/bin/myisampack
 +usr/bin/aria_pack
 +usr/bin/aria_read_log
 +usr/bin/aria_ftdump
 +usr/bin/aria_chk
 +usr/bin/aria_dump_log
 +usr/bin/mysql_convert_table_format
 +usr/bin/mysql_install_db
 +usr/bin/mysql_plugin
 +usr/bin/mysql_secure_installation
 +usr/bin/mysql_setpermission
 +usr/bin/mysql_tzinfo_to_sql
 +usr/bin/mysql_upgrade
 +usr/bin/mysql_zap
 +usr/bin/mysqlbinlog
 +usr/bin/mysqld_multi
 +usr/bin/mysqld_safe
 +usr/bin/mysqlhotcopy
 +usr/bin/perror
 +usr/bin/replace
 +usr/bin/resolve_stack_dump
 +usr/bin/resolveip
 +usr/bin/wsrep_sst_common
 +usr/bin/wsrep_sst_mysqldump
 +usr/bin/wsrep_sst_rsync
 +usr/bin/wsrep_sst_xtrabackup
 +usr/bin/wsrep_sst_xtrabackup-v2
 +usr/share/doc/mariadb-galera-server-10.0/mysqld.sym.gz
 +usr/share/doc/mariadb-galera-server-10.0/INFO_SRC
 +usr/share/doc/mariadb-galera-server-10.0/INFO_BIN
 +usr/share/doc/mariadb-galera-server-10.0/README-wsrep
 +usr/share/lintian/overrides/mariadb-galera-server-10.0
 +usr/share/man/man1/msql2mysql.1
 +usr/share/man/man1/myisamchk.1
 +usr/share/man/man1/myisam_ftdump.1
 +usr/share/man/man1/myisamlog.1
 +usr/share/man/man1/myisampack.1
 +usr/share/man/man1/my_print_defaults.1
 +usr/share/man/man1/mysqlbinlog.1
 +usr/share/man/man1/mysql_convert_table_format.1
 +usr/share/man/man1/mysqld_multi.1
 +usr/share/man/man1/mysqld_safe.1
 +usr/share/man/man1/mysqlhotcopy.1
 +usr/share/man/man1/mysql_install_db.1
 +usr/share/man/man1/mysql_secure_installation.1
 +usr/share/man/man1/mysql_setpermission.1
 +usr/share/man/man1/mysql_upgrade.1
 +usr/share/man/man1/mysql_zap.1
 +usr/share/man/man1/perror.1
 +usr/share/man/man1/replace.1
 +usr/share/man/man1/resolveip.1
 +usr/share/man/man1/resolve_stack_dump.1
 +usr/share/man/man1/innochecksum.1
 +usr/share/man/man1/mysql_tzinfo_to_sql.1
 +usr/share/man/man8/mysqld.8
 +usr/share/mysql/charsets
 +usr/share/mysql/czech
 +usr/share/mysql/danish
 +usr/share/mysql/dutch
 +usr/share/mysql/english
 +usr/share/mysql/estonian
 +usr/share/mysql/french
 +usr/share/mysql/german
 +usr/share/mysql/greek
 +usr/share/mysql/hungarian
 +usr/share/mysql/italian
 +usr/share/mysql/japanese
 +usr/share/mysql/korean
 +usr/share/mysql/norwegian
 +usr/share/mysql/norwegian-ny
 +usr/share/mysql/polish
 +usr/share/mysql/portuguese
 +usr/share/mysql/romanian
 +usr/share/mysql/russian
 +usr/share/mysql/serbian
 +usr/share/mysql/slovak
 +usr/share/mysql/spanish
 +usr/share/mysql/swedish
 +usr/share/mysql/ukrainian
 +usr/share/mysql/debian-start.inc.sh
 +usr/share/mysql/echo_stderr
 +usr/share/mysql/errmsg-utf8.txt
 +usr/share/mysql/fill_help_tables.sql
 +usr/share/mysql/mysql_system_tables_data.sql
 +usr/share/mysql/mysql_system_tables.sql
 +usr/share/mysql/mysql_performance_tables.sql
 +usr/share/mysql/mysql_test_data_timezone.sql
 + at CASSANDRA_DEB_FILES@
 + at SPIDER_DEB_FILES@
 + at TOKUDB_DEB_FILES@
 +usr/share/mysql/wsrep.cnf
 +usr/share/mysql/wsrep_notify
diff --cc debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst
index 6e81fdb,0000000..f6da8c4
mode 100644,000000..100644
--- a/debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst
+++ b/debian/dist/Ubuntu/mariadb-galera-server-10.0.postinst
@@@ -1,284 -1,0 +1,284 @@@
 +#!/bin/bash -e
 +
 +. /usr/share/debconf/confmodule
 +
 +if [ -n "$DEBIAN_SCRIPT_DEBUG" ]; then set -v -x; DEBIAN_SCRIPT_TRACE=1; fi
 +${DEBIAN_SCRIPT_TRACE:+ echo "#42#DEBUG# RUNNING $0 $*" 1>&2 }
 + 
 +export PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin
 +
 +# This command can be used as pipe to syslog. With "-s" it also logs to stderr.
 +ERR_LOGGER="logger -p daemon.err -t mysqld_safe -i"
 +# This will make an error in a logged command immediately apparent by aborting
 +# the install, rather than failing silently and leaving a broken install.
 +set -o pipefail
 +
 +invoke() {
 +  if [ -x /usr/sbin/invoke-rc.d ]; then
 +    invoke-rc.d mysql $1
 +  else
 +    /etc/init.d/mysql $1
 +  fi
 +}
 +
 +MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --default-storage-engine=myisam"
 +
 +test_mysql_access() {
 +       mysql --no-defaults -u root -h localhost </dev/null >/dev/null 2>&1
 +}
 +
 +# call with $1 = "online" to connect to the server, otherwise it bootstraps
 +set_mysql_rootpw() {
 +       # forget we ever saw the password.  don't use reset to keep the seen status
 +       db_set mysql-server/root_password ""
 +       db_set mysql-server/root_password_again ""
 +
 +       tfile=`mktemp`
 +       if [ ! -f "$tfile" ]; then
 +               return 1
 +       fi
 +
 +       # this avoids us having to call "test" or "[" on $rootpw
 +       cat << EOF > $tfile
 +USE mysql;
 +UPDATE user SET password=PASSWORD("$rootpw") WHERE user='root';
 +FLUSH PRIVILEGES;
 +EOF
 +       if grep -q 'PASSWORD("")' $tfile; then
 +               retval=0
 +       elif [ "$1" = "online" ]; then
 +               mysql --no-defaults -u root -h localhost <$tfile >/dev/null
 +               retval=$?
 +       else
 +               $MYSQL_BOOTSTRAP <$tfile
 +               retval=$?
 +       fi
 +       rm -f $tfile
 +       return $retval
 +}
 +
 +# This is necessary because mysql_install_db removes the pid file in /var/run
 +# and because changed configuration options should take effect immediately.
 +# In case the server wasn't running at all it should be ok if the stop
 +# script fails. I can't tell at this point because of the cleaned /var/run.
 +set +e; invoke stop; set -e
 +    
 +case "$1" in
 +  configure)
 +    mysql_datadir=/usr/share/mysql
 +    mysql_statedir=/var/lib/mysql
 +    mysql_rundir=/var/run/mysqld
 +    mysql_logdir=/var/log
 +    mysql_cfgdir=/etc/mysql
 +    mysql_newlogdir=/var/log/mysql
 +    mysql_upgradedir=/var/lib/mysql-upgrade
 +
 +    # first things first, if the following symlink exists, it is a preserved
 +    # copy the old data dir from a mysql upgrade that would have otherwise
 +    # been replaced by an empty mysql dir.  this should restore it.
 +    for dir in DATADIR LOGDIR; do
 +        if [ "$dir" = "DATADIR" ]; then targetdir=$mysql_statedir; else targetdir=$mysql_newlogdir; fi
 +        savelink="$mysql_upgradedir/$dir.link"
 +        if [ -L "$savelink" ]; then
 +            # If the targetdir was a symlink before we upgraded it is supposed
 +            # to be either still be present or not existing anymore now.
 +            if [ -L "$targetdir" ]; then
 +                rm "$savelink"
 +            elif [ ! -d "$targetdir" ]; then
 +                mv "$savelink" "$targetdir"
 +            else
 +                # this should never even happen, but just in case...
 +                mysql_tmp=`mktemp -d -t mysql-symlink-restore-XXXXXX`
 +                echo "this is very strange!  see $mysql_tmp/README..." >&2
 +                mv "$targetdir" "$mysql_tmp"
 +                cat << EOF > "$mysql_tmp/README"
 +
 +if you're reading this, it's most likely because you had replaced /var/lib/mysql
 +with a symlink, then upgraded to a new version of mysql, and then dpkg
 +removed your symlink (see #182747 and others).  the mysql packages noticed
 +that this happened, and as a workaround have restored it.  however, because
 +/var/lib/mysql seems to have been re-created in the meantime, and because
 +we don't want to rm -rf something we don't know as much about, we're going
 +to leave this unexpected directory here.  if your database looks normal,
 +and this is not a symlink to your database, you should be able to blow
 +this all away.
 +
 +EOF
 +            fi
 +        fi
 +	rmdir $mysql_upgradedir 2>/dev/null || true
 +    done
 +    
 +    # Ensure the existence and right permissions for the database and
 +    # log files.
 +    if [ ! -d "$mysql_statedir"       -a ! -L "$mysql_statedir"       ]; then mkdir "$mysql_statedir"; fi
 +    if [ ! -d "$mysql_statedir/mysql" -a ! -L "$mysql_statedir/mysql" ]; then mkdir "$mysql_statedir/mysql"; fi
 +    if [ ! -d "$mysql_newlogdir"      -a ! -L "$mysql_newlogdir"      ]; then mkdir "$mysql_newlogdir"; fi
 +    # When creating an ext3 jounal on an already mounted filesystem like e.g.
 +    # /var/lib/mysql, you get a .journal file that is not modifyable by chown.
 +    # The mysql_datadir must not be writable by the mysql user under any
 +    # circumstances as it contains scripts that are executed by root.
 +    set +e
 +    chown -R 0:0 $mysql_datadir
 +    chown -R mysql $mysql_statedir
 +    chown -R mysql $mysql_rundir
 +    chown -R mysql:adm $mysql_newlogdir;	chmod 2750 $mysql_newlogdir;
 +    for i in log err; do
 +      touch             $mysql_logdir/mysql.$i
 +      chown mysql:adm   $mysql_logdir/mysql.$i
 +      chmod 0640        $mysql_logdir/mysql.$i
 +    done
 +    set -e
 +
 +    # This is important to avoid dataloss when there is a removed
 +    # mysql-server version from Woody lying around which used the same
 +    # data directory and then somewhen gets purged by the admin.
 +    db_set mysql-server/postrm_remove_database false || true
 +
 +    # To avoid downgrades.
 +    touch $mysql_statedir/debian-10.0.flag
 +
 +    # initiate databases. Output is not allowed by debconf :-(
 +    # This will fail if we are upgrading an existing database; in this case
 +    # mysql_upgrade, called from the /etc/init.d/mysql start script, will
 +    # handle things.
 +    # Debian: beware of the bashisms... 
 +    # Debian: can safely run on upgrades with existing databases 
 +    set +e
 +    /bin/bash /usr/bin/mysql_install_db --rpm --user=mysql 2>&1 | $ERR_LOGGER
 +    set -e
 +    
 +    ## On every reconfiguration the maintenance user is recreated.
 +    #
 +    # - It is easier to regenerate the password every time but as people
 +    #   use fancy rsync scripts and file alteration monitors, the existing
 +    #   password is used and existing files not touched.
 +    # - The mysqld statement is like that in mysql_install_db because the
 +    #   server is not already running. This has some implications:
 +    # 	- The amount of newlines and semicolons in the query is important!
 +    #   - GRANT is not possible with --skip-grant-tables and "INSERT
 +    #     (user,host..) VALUES" is not --ansi compliant
 +    # - The echo is just for readability. ash's buildin has no "-e" so use /bin/echo.
 +    # - The Super_priv, Show_db_priv, Create_tmp_table_priv and Lock_tables_priv
 +    #   may not be present as old Woody 3.23 databases did not have it and the
 +    #   admin might not already have run mysql_upgrade which adds them.
 +    #   As the binlog cron scripts to need at least the Super_priv, I do first
 +    #   the old query which always succeeds and then the new which may or may not.
 +
 +    # recreate the credentials file if not present or without mysql_upgrade stanza
 +    dc=$mysql_cfgdir/debian.cnf; 
 +    if [ -e "$dc" -a -n "`fgrep mysql_upgrade $dc 2>/dev/null`" ]; then
 +        pass="`sed -n 's/^[     ]*password *= *// p' $dc | head -n 1`"
 +    else
 +	pass=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..16)'`;
 +        if [ ! -d "$mysql_cfgdir" ]; then install -o 0 -g 0 -m 0755 -d $mysql_cfgdir; fi
 +        cat /dev/null > $dc
 +        echo "# Automatically generated for Debian scripts. DO NOT TOUCH!" >>$dc
 +        echo "[client]"                                                    >>$dc
 +        echo "host     = localhost"                                        >>$dc
 +        echo "user     = debian-sys-maint"                                 >>$dc
 +        echo "password = $pass"                                            >>$dc
 +        echo "socket   = $mysql_rundir/mysqld.sock"                        >>$dc
 +        echo "[mysql_upgrade]"                                             >>$dc
 +        echo "host     = localhost"                                        >>$dc
 +        echo "user     = debian-sys-maint"                                 >>$dc
 +        echo "password = $pass"                                            >>$dc
 +        echo "socket   = $mysql_rundir/mysqld.sock"                        >>$dc
 +        echo "basedir  = /usr"                                             >>$dc
 +    fi
 +    # If this dir chmod go+w then the admin did it. But this file should not.
 +    chown 0:0 $dc
 +    chmod 0600 $dc
 +
 +    # update privilege tables
 +    password_column_fix_query=`/bin/echo -e \
 +        "USE mysql;\n" \
 +        "ALTER TABLE user CHANGE Password Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL;"`
 +    replace_query=`/bin/echo -e \
 +        "USE mysql;\n" \
 +        "SET sql_mode='';\n" \
 +        "REPLACE INTO user SET " \
 +        "  host='localhost', user='debian-sys-maint', password=password('$pass'), " \
 +        "  Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
 +        "  Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
 +        "  Process_priv='Y',  File_priv='Y', Grant_priv='Y', References_priv='Y', " \
 +        "  Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\
 +        "  Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\
 +        "  Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\
 +        "  Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\
 +        "  Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y',"\
 +        "  ssl_cipher='', x509_issuer='', x509_subject='';"`;
 +    # Engines supported by etch should be installed per default. The query sequence is supposed
 +    # to be aborted if the CREATE TABLE fails due to an already existent table in which case the
 +    # admin might already have chosen to remove one or more plugins. Newlines are necessary.
 +    install_plugins=`/bin/echo -e \
 +        "USE mysql;\n" \
-         "CREATE TABLE plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \
++        "CREATE TABLE IF NOT EXISTS plugin (name char(64) COLLATE utf8_bin NOT NULL DEFAULT '', " \
 +        "  dl char(128) COLLATE utf8_bin NOT NULL DEFAULT '', " \
 +        "  PRIMARY KEY (name)) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='MySQL plugins';" `
 +
 +    # Upgrade password column format before the root password gets set.
 +    echo "$password_column_fix_query"                        | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
 +
 +    db_get mysql-server/root_password && rootpw="$RET"
 +    if ! set_mysql_rootpw; then
 +        password_error="yes"
 +    fi
 +
 +    set +e
 +    echo "$replace_query"                                    | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
 +    echo "$install_plugins"                                  | $MYSQL_BOOTSTRAP 2>&1 | $ERR_LOGGER
 +    set -e
 +
 +    # If there is a real AppArmor profile, we reload it.
 +    # If the default empty profile is installed, then we remove any old
 +    # profile that may be loaded.
 +    # This allows upgrade from old versions (that have an apparmor profile
 +    # on by default) to work both to disable a default profile, and to keep
 +    # any profile installed and maintained by users themselves.
 +    profile="/etc/apparmor.d/usr.sbin.mysqld"
 +    if [ -f "$profile" ] && aa-status --enabled 2>/dev/null; then
 +        if grep -q /usr/sbin/mysqld "$profile" 2>/dev/null ; then
 +            apparmor_parser -r "$profile" || true
 +        else
 +            echo "/usr/sbin/mysqld { }" | apparmor_parser --remove 2>/dev/null || true
 +	fi
 +    fi
 +  ;;
 +
 +  abort-upgrade|abort-remove|abort-configure)
 +  ;;
 +
 +  *)
 +    echo "postinst called with unknown argument '$1'" 1>&2
 +    exit 1
 +  ;;
 +esac
 +
 +# here we check to see if we can connect as root without a password
 +# this should catch upgrades from previous versions where the root
 +# password wasn't set.  if there is a password, or if the connection
 +# fails for any other reason, nothing happens.
 +if [ "$1" = "configure" ]; then
 +       if test_mysql_access; then
 +               db_input medium mysql-server/root_password || true
 +               db_go
 +               db_get mysql-server/root_password && rootpw="$RET"
 +
 +               if ! set_mysql_rootpw "online"; then
 +                       password_error="yes"
 +               fi
 +       fi
 +
 +       if [ "$password_error" = "yes" ]; then
 +               db_input high mysql-server/error_setting_password || true
 +               db_go
 +       fi
 +
 +fi
 +
 +db_stop # in case invoke failes
 +
 +#DEBHELPER#
 +
 +exit 0
diff --cc storage/xtradb/CMakeLists.txt
index 3d9bf09,28849f5..e586377
--- a/storage/xtradb/CMakeLists.txt
+++ b/storage/xtradb/CMakeLists.txt
@@@ -461,10 -440,14 +461,18 @@@ SET(INNOBASE_SOURCE
  	ut/ut0vec.cc
  	ut/ut0wqueue.cc)
  
 +IF(WITH_WSREP)
 +  SET(INNOBASE_SOURCES ${INNOBASE_SOURCES} wsrep/md5.cc)
 +ENDIF()
 +
+ # These files have unused result errors, so we skip Werror
+ CHECK_C_COMPILER_FLAG("-Werror" HAVE_WERROR)
+ IF(HAVE_WERROR)
+   INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)
+   ADD_COMPILE_FLAGS(page/page0zip.c COMPILE_FLAGS "-Wno-error")
+   ADD_COMPILE_FLAGS(ut/ut0ut.c      COMPILE_FLAGS "-Wno-error")
+ ENDIF()
+ 
  IF(WITH_INNODB)
    # Legacy option
    SET(WITH_INNOBASE_STORAGE_ENGINE TRUE)


More information about the commits mailing list