Commit graph

157 commits

Author SHA1 Message Date
Michael Widenius
65ac881c80 If one uses 3 --verbose options to mysql_upgrade or mysqlcheck one will now get on stdout all ALTER, RENAME and CHECK commands that mysqlcheck executes.
If one uses 4 --verbose to mysql_upgrade it will also write out all mysqlcheck commands invoked.


mysql-test/r/mysql_upgrade.result:
  Updated results from changing phases
mysql-test/r/mysql_upgrade_no_innodb.result:
  dated results from changing phases
mysql-test/r/mysql_upgrade_ssl.result:
  dated results from changing phases
2014-08-14 15:38:08 +03:00
Sergei Golubchik
15a9103c48 MDEV-6535 Ordering of mysql_upgrade tasks is not optimal
first update system tables, then the rest
2014-08-06 13:27:44 +02:00
Sergei Golubchik
d3e2e1243b 5.5 merge 2014-05-09 12:35:11 +02:00
Sergei Golubchik
cb67dcb618 mysql-5.5.37 selective merge 2014-03-27 22:26:58 +01:00
Sergei Golubchik
72c20282db 10.0-base merge 2014-02-03 15:22:39 +01:00
Praveenkumar Hulakund
1d9ae547f3 Bug#14117012 - CHILD PROCESS MYSQL UTILITIES PICKING UP LOCAL
CONFIG FILES CAUSES TEST

Utility as "mysql_upgrade" forks "mysql"/"mysqlcheck". Attaching
"mysql_upgrade" shows following calls after forking "mysql" or
"mysql_check" when configuration file information is passed as
first argument to "mysql_upgrade".

strace -f ./mysql_upgrade --defaults-file=../pdb/my.cnf --socket=../pdb/mysql.sock -f

[pid  6254] stat("/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid  6254] stat("/etc/mysql/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid  6254] stat("/usr/local/mysql/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid  6254] stat("/home/user_name/.my.cnf", {st_mode=S_IFREG|0664, st_size=19, ...}) = 0
[pid  6254] open("/home/user_name/.my.cnf", O_RDONLY) = 3


But when tool forks "mysqlcheck"/"mysql", "--no-defaults" is passed
as first argument. Before forking, in function "find_tool" of
"mysql_upgrade", check is made to verify whether tool can be
executable or not by calling "mysqlcheck --help" and "mysql --help".
But argument "--no-defaults", "--defaults-file" or
"defaults-extra-file" is not passed to "mysql" and "mysqlcheck".
So my.cnf is searched in default paths.

Fix:
------
Modified code to pass "--no-defaults" as first argument to "mysql"
and "mysqlcheck" while checking tool can be executed or not.
2014-01-31 09:19:12 +05:30
Michael Widenius
04bee0af2e Fix for MDEV-5547: Bad error message when moving very old .frm files to MariaDB 5.5.
mysql_upgrade --help now also prints out --default options and variable values.
mysql_upgrade now prints permission errors.
mysql_upgrade doesn't print some non essential info if --silent is used.
Added handler error message about incompatible versions
Fixed that mysqlbug and mysql_install_db have the executable flag set.
Removed executable flag for some non executable files.
Changed in mysql_install_db askmonty.org to mariadb.com.
Ensured that all client executables prints --default options the same way.
Allow REPAIR ... USE_FRM for old .frm files if the are still compatible.
Extended shown error for storage engine messages.


client/mysql.cc:
  print_defaults() should be first (as in all other programs)
client/mysql_upgrade.c:
  --help now also prints out --default options and variable values
  Print out error if wrong permissions
  Don't print info if --silent
client/mysqladmin.cc:
  print_defaults() should be first (as in all other programs)
client/mysqlbinlog.cc:
  Added print_defaults() to --help
client/mysqlcheck.c:
  Added empty line in --help
client/mysqlimport.c:
  Added empty line in --help
client/mysqlshow.c:
  Made --help compatible
client/mysqlslap.c:
  Made --help compatible
client/mysqltest.cc:
  Added print_defaults() to --help
include/handler_ername.h:
  Added handler error message
include/my_base.h:
  Added handler error message
mysql-test/r/mysql_upgrade.result:
  Updated results
mysql-test/r/repair.result:
  Added test case for better error messages
mysql-test/std_data/host_old.MYD:
  Added test case for better error messages
mysql-test/std_data/host_old.MYI:
  Added test case for better error messages
mysql-test/std_data/host_old.frm:
  Added test case for better error messages
mysql-test/t/repair.test:
  Added test case for better error messages
mysys/my_handler_errors.h:
  Added handler error message
scripts/CMakeLists.txt:
  Fixed that mysqlbug and mysql_install_db have the executable flag set
scripts/mysql_install_db.sh:
  askmonty.org -> mariadb.com
sql/ha_partition.cc:
  Sometimes table_type() can be called for errors even if partition didn't manage to open any files
sql/handler.cc:
  Write clear text for not handled, but defined error messages.
sql/share/errmsg-utf8.txt:
  Extended shown error for storage engine messages
sql/sql_admin.cc:
  Allow REPAIR ... USE_FRM for old .frm files if the are still compatible
storage/myisam/ha_myisam.cc:
  Use new error message
2014-01-22 15:16:57 +02:00
Sergei Golubchik
4157185f24 10.0-base merge 2013-11-13 23:03:48 +01:00
Sergei Golubchik
80a523dbfb MDEV-5116 MariaDB upgrade breaks replication
mysql_upgrade should do --skip-write-binlog by default
2013-11-11 09:31:20 +01:00
Sergei Golubchik
b7b5f6f1ab 10.0-monty merge
includes:
* remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING"
* introduce LOCK_share, now LOCK_ha_data is strictly for engines
* rea_create_table() always creates .par file (even in "frm-only" mode)
* fix a 5.6 bug, temp file leak on dummy ALTER TABLE
2013-07-21 16:39:19 +02:00
Sergei Golubchik
5f6380adde 10.0-base merge 2013-07-18 16:46:57 +02:00
Sergei Golubchik
005c7e5421 mysql-5.5.32 merge 2013-07-16 19:09:54 +02:00
Michael Widenius
068c61978e Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
Nirbhay Choubey
2ce82cd442 Bug#16500013 : post-fix 2013-03-22 14:55:30 +05:30
Nirbhay Choubey
f735e50b62 Bug#16500013 : ADD VERSION CHECK TO MYSQL_UPGRADE
(Based on Sinisa's patch)

Added a version checking facility to mysql_upgrade.
The versions used for checking is the version of the
server that mysql_upgrade is going to upgrade and the
server version that mysql_upgrade was build/distributed
with.
Also added an option '--version-check' to enable/disable
the version checking.
2013-03-21 22:51:40 +05:30
Sergei Golubchik
ab83952f29 10.0-base merge 2013-01-31 09:48:19 +01:00
Michael Widenius
5f68820cd4 Fixed problem with failing mysql_upgrade when proc table was not correct.
Moved out creation of performance schema tables from mysql_system_tables.sql as
the performance_tables creation scripts needs a working mysql.proc to work.

client/mysql_upgrade.c:
  Added option -V, --version
debian/dist/Debian/mariadb-server-5.5.files:
  Added mysql_performance_tables.sql
debian/dist/Ubuntu/mariadb-server-5.5.files:
  Added mysql_performance_tables.sql
mysql-test/lib/v1/mysql-test-run.pl:
  Added mysql_performance_tables.sql
mysql-test/mysql-test-run.pl:
  Added mysql_performance_tables.sql
scripts/CMakeLists.txt:
  Moved out creation of performance schema tables from mysql_system_tables.sql 
  as the performance_tables creation scripts needs a working mysql.proc to work
scripts/mysql_install_db.sh:
  Added mysql_performance_tables.sql
scripts/mysql_performance_tables.sql:
  Moved out creation of performance schema tables from mysql_system_tables.sql 
  as the performance_tables creation scripts needs a working mysql.proc to work
scripts/mysql_system_tables.sql:
  Move creation of performance schema tables to mysql_performance_tables.sql
  Added 'flush tables' to get things to work if someone deletes a table like mysql.proc before run
scripts/mysql_system_tables_fix.sql:
  ove performance table things to mysql_performance_tables.sql
storage/perfschema/pfs.cc:
  Fixed comment
2013-01-11 00:53:07 +02:00
Sergei Golubchik
40e94a3734 merge with 5.5 2012-11-03 12:28:51 +01:00
Sergei Golubchik
ee9afef271 mysql-5.5.28 2012-10-16 13:04:42 +02:00
Nirbhay Choubey
ffdc4bc8cd Merge of patch for Bug#13928675 from mysql-5.1. 2012-08-07 19:07:13 +05:30
Nirbhay Choubey
5ad8292c63 Bug#13928675 MYSQL CLIENT COPYRIGHT NOTICE MUST
SHOW 2012 INSTEAD OF 2011

* Added a new macro to hold the current year :
  COPYRIGHT_NOTICE_CURRENT_YEAR
* Modified ORACLE_WELCOME_COPYRIGHT_NOTICE macro
  to take the initial year as parameter and pick
  current year from the above mentioned macro.
2012-08-07 18:58:19 +05:30
Michael Widenius
1d0f70c2f8 Temporary commit of merge of MariaDB 10.0-base and MySQL 5.6 2012-08-01 17:27:34 +03:00
Sergei Golubchik
92e2b80c76 MDEV-186 Client programs throw warnings about memory loss when executed with --help or alike
suppress these harmless but confusing warnings.
fix the program name (MY_INIT) in mysqldump

client/mysqldump.c:
  for backward compatibility, prefix mysqldump error messages with "mysqldump", not with the full path of the executable
2012-03-23 10:53:25 +01:00
Sergei Golubchik
38e3ae155d mysql-5.5 merge 2012-01-16 20:16:35 +01:00
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +01:00
Alexander Nozdrin
aff6b0fd82 A patch for Bug#13023858 - MYSQL_UPGRADE PRINTS
THE ORACLE_WELCOME_COPYRIGHT_NOTICE TWICE.

Fix of a merge error.
2011-12-21 19:26:11 +04:00
Michael Widenius
6920457142 Merge with MariaDB 5.1 2011-11-24 18:48:58 +02:00
Michael Widenius
a8d03ab235 Initail merge with MySQL 5.1 (XtraDB still needs to be merged)
Fixed up copyright messages.
2011-11-21 19:13:14 +02:00
Nirbhay Choubey
4df195a4ca Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
OPTION SKIP-WRITE-BINLOG

System tables were not getting upgraded when
mysql_upgrade was run with --skip-write-binlog
option. (Same for --write-binlog.) Also, with
this option, mysql_upgrade_info file was not
getting created after the upgrade.

mysql_upgrade makes use of mysql client tool in
order to run upgrade scripts, while doing so it
passes some of the command line options (used to
start mysql_upgrade) directly to mysql client.
The reason behind this bug being, some options
like skip-write-binlog and upgrade-system-tables
were being passed to mysql tool along with other
options, and hence mysql execution failed due
presence of these invalid options.

Fixed this issue by filtering out the above mentioned
options from the list of options that will be passed to
mysql and mysqlcheck tools. However, since --write-binlog
is supported by mysqlcheck, this option would be used
explicitly while running mysqlcheck. (not part of patch,
already there)

Checking the contents of general log after the upgrade
is not doable via an mtr test. So performed manual test.
Added a test to verify the creation of mysql_upgrade_info.


client/mysql_upgrade.c:
  Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH
                      OPTION SKIP-WRITE-BINLOG
  
  With this patch, --upgrade-system-tables and
  --write-binlog options will not be added to the
  list of options, used to start mysql and mysqlcheck
  tools.
mysql-test/r/mysql_upgrade.result:
  Added a testcase for Bug#11827359.
mysql-test/t/mysql_upgrade.test:
  Added a testcase for Bug#11827359.
2011-11-15 17:48:42 +05:30
Sergei Golubchik
0e007344ea mysql-5.5.18 merge 2011-11-03 19:17:05 +01:00
Sergei Golubchik
76f0b94bb0 merge with 5.3
sql/sql_insert.cc:
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
  ******
  CREATE ... IF NOT EXISTS may do nothing, but
  it is still not a failure. don't forget to my_ok it.
sql/sql_table.cc:
  small cleanup
  ******
  small cleanup
2011-10-19 21:45:18 +02:00
Alexander Nozdrin
9312697530 Manual merge from mysql-5.1. 2011-07-22 11:50:44 +04:00
Alexander Nozdrin
3a786df2d5 Manual merge from mysql-5.0. 2011-07-22 11:46:45 +04:00
Alexander Nozdrin
cb5239954b For for Bug#12696072: FIX OUTDATED COPYRIGHT NOTICES IN RUNTIME RELATED CLIENT
TOOLS

Backport a fix for Bug 57094 from 5.5.
The following revision was backported:

# revision-id: alexander.nozdrin@oracle.com-20101006150613-ls60rb2tq5dpyb5c
# parent: bar@mysql.com-20101006121559-am1e05ykeicwnx48
# committer: Alexander Nozdrin <alexander.nozdrin@oracle.com>
# branch nick: mysql-5.5-bugteam-bug57094
# timestamp: Wed 2010-10-06 19:06:13 +0400
# message:
#   Fix for Bug 57094 (Copyright notice incorrect?).
#   
#   The fix is to:
#     - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
#       to specify copyright notice;
#     - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
#       in programs.
2011-07-22 11:45:15 +04:00
Sergei Golubchik
49501b4ccb fix memory leaks and other problems found by safemalloc
client/mysql_upgrade.c:
  missing DBUG_RETURN
client/mysqladmin.cc:
  client plugin memory wasn't freed
client/mysqlcheck.c:
  client plugin memory, defaults, a result set, a command-line option value were not freed.
  missing DBUG_RETURN.
client/mysqldump.c:
  client plugin memory wasn't freed
client/mysqlslap.c:
  client plugin memory wasn't freed
client/mysqltest.cc:
  hopeless. cannot be fixed.
mysql-test/valgrind.supp:
  Bug#56666 is now fixed.
mysys/array.c:
  really, don't allocate if the caller didn't ask to.
mysys/my_init.c:
  safemalloc checks must be done at the very end
mysys/my_thr_init.c:
  not needed anymore
sql-common/client.c:
  memory leak
sql/log.cc:
  log_file was not closed, memory leak.
sql/mysqld.cc:
  fix bug#56666 (causing many P_S related memory leaks).
  close_active_mi() not called for --bootstrap, memory leak.
sql/sql_lex.cc:
  redo Lex->mi handling
sql/sql_lex.h:
  redo Lex->mi handling
sql/sql_plugin.cc:
  plugins having PLUGIN_VAR_MEMALLOC string variables have this variables allocated in every THD.
  The memory was freed in ~THD but only if plugin was still active. If plugin was unloaded the
  variable was not found and the memory was lost. By loading and unloading plugins an arbitrary
  amount of memory can be lost.
sql/sql_repl.cc:
  redo Lex->mi handling
sql/sql_yacc.yy:
  completely wrong handling of Lex->mi - run-time memory leak, by repeating the statement
  arbitrary amount of memory can be lost.
  
  Lex->mi.repl_ignore_server_ids_opt was allocated when parsing CHANGE MASTER,
  and freed after executing the statement. if parser failed on syntax (or another)
  error the statement was never executed. Lex->mi was simply bzero-ed for the next
  CHANGE MASTER  statement.
sql/table.cc:
  didn't compile
storage/perfschema/pfs_lock.h:
  Bug#56666 is fixed
2011-07-10 20:09:17 +02:00
Sergei Golubchik
9809f05199 5.5-merge 2011-07-02 22:08:51 +02:00
Kent Boortz
68f00a5686 Updated/added copyright headers 2011-06-30 17:37:13 +02:00
Kent Boortz
44135d4725 Updated/added copyright headers 2011-06-30 17:31:31 +02:00
Georgi Kodinov
7ae92503c7 Fixed cast warnings in introducing the pluggable authentication client
options.
2011-06-06 13:27:05 +03:00
Kent Boortz
02e07e3b51 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Sergei Golubchik
0accbd0364 lots of post-merge changes 2011-04-25 17:22:25 +02:00
Michael Widenius
0fae0335d4 Ensure that all clients reads the appropriate 'client', client-mariadb and 'mariadb' sections from my.cnf
The mysqld server and all clients now reads the new client-server section
Fixed that mysqldumpslow supports new slow log formats and new mysqld --slow- options


client/mysql.cc:
  Read also client-server and client-mariadb sections.
client/mysql_upgrade.c:
  Read also client-server and client-mariadb sections.
client/mysqladmin.cc:
  Read also client-server and client-mariadb sections.
client/mysqlbinlog.cc:
  Read also client-server and client-mariadb sections.
client/mysqlcheck.c:
  Read also client-server and client-mariadb sections.
client/mysqldump.c:
  Read also client-server and client-mariadb sections.
client/mysqlimport.c:
  Read also client-server and client-mariadb sections.
client/mysqlshow.c:
  Read also client-server and client-mariadb sections.
client/mysqltest.cc:
  Read also client-server and client-mariadb sections.
extra/my_print_defaults.c:
  Updated help text
scripts/mysql_fix_privilege_tables.sh:
  Read also sections client client-server client-mariadb
scripts/mysql_install_db.pl.in:
  Also allow --data=* option
  Read also groups mariadb, server and client-server.
scripts/mysql_install_db.sh:
  Also allow --data=* option
  Read also groups mariadb, server and client-server.
  Added --lose-skip-pbxt to bootstrap
scripts/mysql_secure_installation.sh:
  Read also groups client-server and client-mariadb
scripts/mysqld_multi.sh:
  Read also group mariadb
scripts/mysqld_safe.sh:
  Read also groups mariadb server and client-server
scripts/mysqldumpslow.sh:
  Fixed to support new slow log formats
  Added sorting on -ae (aggregated number of retreived rows) and e (retrieved rows)
  Read also group 'mariadb'
  If there is many instances of same option, use last one.
  Get slow log file from options log-slow-queries=filename or query-log-file=filename
  Added support for future --log-basename option
sql-common/client.c:
  Read also groups 'client-server' and 'client-mariadb'
tests/mysql_client_test.c:
  Read also groups 'client-server' and 'client-mariadb'
tests/thread_test.c:
  Read also groups 'client-server' and 'client-mariadb'
2011-03-18 17:03:43 +02:00
Nirbhay Choubey
6d45683b38 Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.

Postfix covering other mysql standard clients like mysql_upgrade,
mysqlbinlog, mysqlcheck, mysqlimport, mysqlshow and mysqlslap.


client/client_priv.h:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients
  
  Added an entry for 'default-auth' option.
client/mysql.cc:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients
  
  Updated the id entry for default_auth option.
client/mysql_upgrade.c:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients.
  
  Introduced two new variables to hold values from default-auth and
  plugin-dir options and further pushed them to client's st_mysql
  instance.
client/mysqladmin.cc:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients
  
  Updated the id entry for default_auth option.
client/mysqlbinlog.cc:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients.
  
  Introduced two new variables to hold values from default-auth and
  plugin-dir options and further pushed them to client's st_mysql
  instance.
client/mysqlcheck.c:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients.
  
  Introduced two new variables to hold values from default-auth and
  plugin-dir options and further pushed them to client's st_mysql
  instance.
client/mysqldump.c:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients
  
  Updated the id entry for default_auth option.
client/mysqlimport.c:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients.
  
  Introduced two new variables to hold values from default-auth and
  plugin-dir options and further pushed them to client's st_mysql
  instance.
client/mysqlshow.c:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients.
  
  Introduced two new variables to hold values from default-auth and
  plugin-dir options and further pushed them to client's st_mysql
  instance.
client/mysqlslap.c:
  Bug#58139 : default-auth option not recognized in MySQL standard
              command line clients.
  
  Introduced two new variables to hold values from default-auth and
  plugin-dir options and further pushed them to client's st_mysql
  instance.
mysql-test/r/plugin_auth.result:
  Added test case for Bug#58139 for mysql_upgrade.
mysql-test/t/plugin_auth.test:
  Added test case for Bug#58139 for mysql_upgrade.
2011-01-16 09:29:05 +05:30
Sergei Golubchik
65ca700def merge.
checkpoint.
does not compile.
2010-11-25 18:17:28 +01:00
Alexander Nozdrin
985fa88f8b Fix for Bug#57094 (Copyright notice incorrect?).
The fix is to:
  - introduce ORACLE_WELCOME_COPYRIGHT_NOTICE define to have a single place
    to specify copyright notice;
  - replace custom copyright notices with ORACLE_WELCOME_COPYRIGHT_NOTICE
    in programs.
2010-10-06 19:06:13 +04:00
Michael Widenius
4c7af343e0 Fixed build failures
Cleaned up mysql_upgrade --help and mysqlcheck --help

client/mysql_upgrade.c:
  Increased version number.
  Marked all options that are not used 'Not used'.
  Don't write 'Looking for tool' if not using --verbose
client/mysqlcheck.c:
  Cleanup output for --help
  Reset not initialzed variable
mysql-test/r/log_tables_upgrade.result:
  Updated results
mysql-test/r/mysql_upgrade.result:
  Updated results
mysql-test/r/mysqlcheck.result:
  Updated results
mysql-test/t/log_tables_upgrade.test:
  mysql_upgrade is now run without --skip-verbose
mysql-test/t/mysql_upgrade.test:
  mysql_upgrade is now run without --skip-verbose
2010-09-06 02:15:34 +03:00
Michael Widenius
74af6dfad0 Nicer output for mysql_upgrade
Added --silent option to mysql_upgrade so that one can only get errors printed
Don't write unnecessary warning about log tables during upgrade



client/mysql_upgrade.c:
  Don't print connect arguments if not using --verbose --verbose
  Added option --silent to only print errors. This options is passed to mysqlcheck.
  Write out phase names
  The 'verbose' code is a bit strange as I wanted to keep compatibility with old mysql_upgrade
client/mysqlcheck.c:
  Don't upgrade log tables (to avoid confusing warning message that they can't be locked)
2010-09-05 12:39:17 +03:00
Michael Widenius
a4fff491eb Fix that one can run mysql_upgrade with long table names
Fall back to use ALTER TABLE for engines that doesn't support REPAIR when doing repair for upgrade.
Nicer output from mysql_upgrade and mysql_check
Updated all arrays that used NAME_LEN to use SAFE_NAME_LEN to ensure that we don't break things accidently as names can now have a #mysql50# prefix.

client/mysql_upgrade.c:
  If we are using verbose, also run mysqlcheck in verbose mode.
client/mysqlcheck.c:
  Add more information if running in verbose mode
  Print 'Needs upgrade' instead of complex error if table needs to be upgraded
  Don't write connect information if verbose is not 2 or above
mysql-test/r/drop.result:
  Updated test and results as we now support full table names
mysql-test/r/grant.result:
  Now you get a correct error message if using #mysql with paths
mysql-test/r/show_check.result:
  Update results as table names can temporarly be bigger than NAME_LEN (during upgrade)
mysql-test/r/upgrade.result:
  Test upgrade for long table names.
mysql-test/suite/funcs_1/r/is_tables_is.result:
  Updated old test result (had note been updated in a while)
mysql-test/t/drop.test:
  Updated test and results as we now support full table names
mysql-test/t/grant.test:
  Now you get a correct error message if using #mysql with paths
mysql-test/t/upgrade.test:
  Test upgrade for long table names.
sql/ha_partition.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/item.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/log_event.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/mysql_priv.h:
  Added SAFE_NAME_LEN
sql/rpl_filter.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sp.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sp_head.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sql_acl.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sql_base.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sql_connect.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sql_parse.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sql_prepare.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sql_select.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sql_show.cc:
  NAME_LEN -> SAFE_NAME_LEN
  Enlarge table names for SHOW TABLES to also include optional #mysql50#
sql/sql_table.cc:
  Fall back to use ALTER TABLE for engines that doesn't support REPAIR when doing repair for upgrade.
sql/sql_trigger.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sql_udf.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/sql_view.cc:
  NAME_LEN -> SAFE_NAME_LEN
sql/table.cc:
  Fixed check_table_name() to not count #mysql50# as part of name
  If #mysql50# is part of the name, don't allow path characters in name.
2010-09-03 19:20:30 +03:00
Guilhem Bichot
53c8b22116 fix for Bug #55672 "mysql_upgrade dies with internal error":
it couldn't parse the --ssl option.

client/mysql_upgrade.c:
  mysql_upgrade parses its options and passes some of them to the underlying
  tools (mysqlcheck etc). To do this passdown, it reconstructs a
  command-line-suitable text from the my_option object (which
  contains the option's name and option's value). For options
  which expect no parameter, it just had to use the option's name;
  for other options, it had to concatenate the option's name,
  a "=" symbol, and the option's value; it had code to handle
  this latter case, but only for GET_STR options (options taking a
  string as value). But since the work on WL 4738, the --ssl
  option, a GET_BOOL, which used to have no parameter (NO_ARG), can
  now have one (OPT_ARG), so with --ssl we came to the "default"
  label, error. Fixed by constructing the command-line-suitable
  representation for GET_BOOL too. For --ssl it will produce
  --ssl=1 ; for --ssl=0, it will produce --ssl=0.
mysql-test/include/mysql_upgrade_preparation.inc:
  handles requirements of tests which use mysql_upgrade
mysql-test/r/mysql_upgrade_ssl.result:
  result; without the code fix we would get "internal error".
mysql-test/t/mysql_upgrade.test:
  This test has requirements before running; moved them
  to an include file in order to share with mysql_upgrade_ssl.
mysql-test/t/mysql_upgrade_ssl.test:
  test for bug. Couldn't go into mysql_upgrade.test as this new test requires
  SSL support. --force is needed, in case mysql_upgrade.test run before
  (in which case mysql_upgrade_ssl would say that upgrade has already been
  done); --force forces the upgrade in all cases.
2010-08-11 19:56:56 +02:00
Michael Widenius
e0a6b02c5d Merge with MySQL 5.1.49
Fixed Bug#52005 'JOIN_TAB->dependent' may be incorrectly propageted for multilevel outer joins' in a better way (patch from Sergey Petrunya)
2010-08-02 12:01:24 +03:00