Commit graph

257 commits

Author SHA1 Message Date
Sergei Golubchik
4f435bddfd 5.3 merge 2012-01-13 15:50:02 +01:00
Sergei Golubchik
6cc9d0ffa0 move safemalloc out of dbug.
remeber a real backtrace for every allocation.
make safemalloc to tract C++ new/delete too.
collateral fixes to make the test suite pass.
2011-12-12 22:58:24 +01: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
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
f636987d3b 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
c4dad60a73 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
Alexander Nozdrin
f7618904bf 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
1400d7a2cc 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
Kent Boortz
e5ce023f57 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
Georgi Kodinov
8d7361f803 Fixed cast warnings in introducing the pluggable authentication client
options.
2011-06-06 13:27:05 +03:00
Michael Widenius
1be5462d59 Merge with MariaDB 5.1 2011-05-03 19:10:10 +03:00
Michael Widenius
e415ba0fb2 Merge with MySQL 5.1.57/58
Moved some BSD string functions from Unireg
2011-05-02 20:58:45 +03: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
Guilhem Bichot
1756d087cd Fix for BUG#59894
"set optimizer_switch to e or d causes invalid memory writes/valgrind warnings":
due to prefix support, the argument "e" was overwritten with its full value
"engine_condition_pushdown", which caused a buffer overrun.
This was wrong usage of find_type(); other wrong usages are fixed here too.
Please start reading with the comment of typelib.c.

client/mysqldump.c:
  A bug: find_type() expects a bitmap as 3rd argument
  (each bit is a flag controlling a behaviour of the function);
  here it was instead passed the length of the string to search!
  That could give random behaviour of find_type()
  depending on the string.
  We rather need to pass a correct flag to find_type().
  The correct flag is FIND_TYPE_BASIC (0).
  Flag 8 is not needed as buff cannot have a comma (see how buff is filled).
  Flag 1 looks like a superfluous restriction.
  Flag 4 is not user-friendly (why use
  --compatible=2 rather than --compatible=mysql40 ?, and
  we probably not commit to "2" always meaning "mysql40"
  until the end of times).
include/mysql.h.pp:
  This isn't a problematic API change as we go from char* to const char*:
  existing code will run unchanged.
include/typelib.h:
  named constants. Not an enum to not significantly change
  the declaration of find_type() which would be an API change
  (typelib.h is included in mysql.h).
mysql-test/r/mysqldump.result:
  correct result (see the two requested modes in SQL_MODE)
mysql-test/suite/sys_vars/t/optimizer_switch_basic.test:
  test for BUG#59894. The second SET used to crash.
mysql-test/t/mysqldump.test:
  we had no test for multiple modes in --compatible, which is
  supported according to --help
mysys/typelib.c:
  Fix for BUG#59894. parse_name() is asked to match "e" with a row
  of the TYPELIB (the TYPELIB lists permitted flags of optimizer_switch;
  and comes from optimizer_switch_names[] of sys_vars.cc).
  find_type() is capable of supporting prefixes, but if it is not
  passed flag 2 in third argument, it will overwrite its first
  argument (the string to search for) with the complete name,
  here overwriting "e" with "engine_condition_pushdown". But
  as this "e" was a buffer allocated in an Item, it was not big
  enough to host the longer name, thus the crash.
  We don't need to know the complete flag's name; the output used
  from find_type() is just the flag's number (== function's return
  code). So we can pass flag 2 to find_type() in parse_name().
  After doing this fix and the other fixes in this patch, all usages
  of find_type() were using flag 2; in most usages the string to search for,
  is not guaranteed to be long enough to host the complete name
  (it is either directly from argv, or from alloc_root/my_malloc
  done in an earlier call).
  Thus, flag 2 is here made implicit: callers need not pass it anymore,
  it is always automatically turned on.
  This allows to eliminate an oddity: parse_name() took a const char**,
  and then removed "const" before calling find_type(), which could
  theoretically modify the pointed data, thus lying on constness.
  Last, constants for find_type() are now named.
sql-common/client.c:
  Two bugs:
  1) The enum was not in sync with the array (due to a bad porting of WL 1054;
  the extra OPT_ values are about options present in 5.1 and deleted in 5.5);
  added a compile_time_assert() to make sure this doesn't happen again
  2) find_type() was writing past the end of opt_arg; as opt_arg was allocated
  with alloc_root() with no extra space, this was an overrun; it could be seen
  when
  ** building with -DWITH_VALGRIND -DHAVE_purify -DEXTRA_DEBUG
  ** making execution go through the faulty code; this faulty
  code is executed only if the client asks to read a configuration
  file like this:
    mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, "/tmp/cnf.cnf");
  so by adding such line to the start of mysql_client_test.c::client_connect(),
  we could see the valgrind warning:
  ==30548== Invalid write of size 1
  ==30548==    at 0x4C2624C: strcpy (mc_replace_strmem.c:303)
  ==30548==    by 0x48DC29: find_type (typelib.c:120)
  ==30548==    by 0x465686: mysql_read_default_options (client.c:1344)
  ==30548==    by 0x46830F: mysql_real_connect (client.c:2971)
  ==30548==    by 0x409339: client_connect (mysql_client_test.c:331)
  ==30548==    by 0x463A7F: main (mysql_client_test.c:19902)
  ==30548==  Address 0x61875ad is 0 bytes after a block of size 29 alloc'd
  ==30548==    at 0x4C25153: malloc (vg_replace_malloc.c:195)
  ==30548==    by 0x49BFF1: my_malloc (my_malloc.c:38)
  ==30548==    by 0x49C65C: alloc_root (my_alloc.c:166)
  ==30548==    by 0x48EF97: handle_default_option (default.c:381)
  ==30548==    by 0x49068C: search_default_file_with_ext (default.c:992)
  ==30548==    by 0x48F929: search_default_file (default.c:670)
  ==30548==    by 0x48EDC4: my_search_option_files (default.c:312)
  ==30548==    by 0x48F4B1: my_load_defaults (default.c:576)
  ==30548==    by 0x46517A: mysql_read_default_options (client.c:1207)
  ==30548==    by 0x46830F: mysql_real_connect (client.c:2971)
  ==30548==    by 0x409339: client_connect (mysql_client_test.c:331)
  ==30548==    by 0x463A7F: main (mysql_client_test.c:19902)
  This is fixed by having find_type() not overwrite anymore.
sql/sql_help.cc:
  cast not needed anymore.
sql/table.cc:
  cast not needed anymore.
2011-02-11 15:00:09 +01:00
Guilhem Bichot
77c0f33ee2 Fix for BUG#59894
"set optimizer_switch to e or d causes invalid memory writes/valgrind warnings":
due to prefix support, the argument "e" was overwritten with its full value
"engine_condition_pushdown", which caused a buffer overrun.
This was wrong usage of find_type(); other wrong usages are fixed here too.
Please start reading with the comment of typelib.c.
2011-02-11 15:00:09 +01:00
Nirbhay Choubey
208b677637 Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
When mysqldadmin is run with sleep and count options,
it goes into an infinite loop and keeps executing the
specified command.

This happened because the statement, responsible for
decrementing the count value, was missing.

Fixed by adding a statement which will decrement the
count value for each iteration.


client/mysqladmin.cc:
  Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
  
  Added a condition to check and decrement the count
  value stored in nr_iterations per iteration.
mysql-test/r/mysqladmin.result:
  Added a testcase for Bug#58221.
mysql-test/t/mysqladmin.test:
  Added a testcase for Bug#58221.
2011-01-16 02:04:08 +05:30
Nirbhay Choubey
44d23cdbc0 Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
When mysqldadmin is run with sleep and count options,
it goes into an infinite loop and keeps executing the
specified command.

This happened because the statement, responsible for
decrementing the count value, was missing.

Fixed by adding a statement which will decrement the
count value for each iteration.
2011-01-16 02:04:08 +05:30
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
Nirbhay Choubey
e664d1c69b Merge of fix for bug#58221 from mysql-5.1 -> mysql-5.5. 2011-01-16 02:08:24 +05:30
Magne Mahre
8ede0759c3 Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'.
  
As of MySQL 5.5, we no longer support non-threaded
builds.   This patch removes all references to the
obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
symbols.  These were used to distinguish between
threaded and non-threaded builds.
2011-01-11 10:07:37 +01:00
Nirbhay Choubey
974bf57dac 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.
2011-01-16 09:29:05 +05:30
Nirbhay Choubey
fbc10eeb9d Merge of fix for bug#58221 from mysql-5.1 -> mysql-5.5. 2011-01-16 02:08:24 +05:30
Magne Mahre
ebd24626ca Remove configuration preprocessor symbols 'THREAD'
and 'THREAD_SAFE_CLIENT'.
  
As of MySQL 5.5, we no longer support non-threaded
builds.   This patch removes all references to the
obsolete THREAD and THREAD_SAFE_CLIENT preprocessor
symbols.  These were used to distinguish between
threaded and non-threaded builds.
2011-01-11 10:07:37 +01:00
Nirbhay Choubey
e3922b8b91 Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.

Command line tools like mysqladmin and mysqldump did not recognize
default-auth and plugin-dir options.

Support for these options was found missing in these command line
tools.

Fixed by adding support for the same.


client/mysqladmin.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/mysqldump.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.
mysql-test/t/plugin_auth.test:
  Added test case for Bug#58139.
2010-12-07 17:37:07 +05:30
Nirbhay Choubey
d5e7008bdd Bug#58139 : default-auth option not recognized in MySQL standard
command line clients.

Command line tools like mysqladmin and mysqldump did not recognize
default-auth and plugin-dir options.

Support for these options was found missing in these command line
tools.

Fixed by adding support for the same.
2010-12-07 17:37:07 +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
Alexander Nozdrin
f79f6e0c34 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
bdba1d11c4 Change some my_bool in C++ classes and a few functions to bool to detect wrong usage of bool/my_bool.
Fix some bugs where we stored values other than 0 or 1 in my_bool
Fixed some compiler warnings


client/mysql.cc:
  Changed interrupted_query from my_bool to int, as we stored 2 in it.
client/mysqladmin.cc:
  Changed return variable type to same type as function value type
client/mysqltest.cc:
  Changed 'found' to int as we store other values than 0 or 1 into it
  Changed type for parameter of set_reconnect() to match usage.
extra/libevent/evbuffer.c:
  Added __attribute__((unused))
extra/libevent/event.c:
  Added __attribute__((unused))
extra/libevent/signal.c:
  Added __attribute__((unused))
sql/event_data_objects.h:
  my_bool -> bool
sql/event_db_repository.cc:
  my_bool -> bool
sql/event_db_repository.h:
  my_bool -> bool
sql/event_parse_data.h:
  my_bool -> bool
sql/events.cc:
  my_bool -> bool
sql/events.h:
  my_bool -> bool
sql/field.cc:
  my_bool -> bool
sql/field.h:
  my_bool -> bool
sql/hash_filo.h:
  my_bool -> bool
sql/item.cc:
  my_bool -> bool
sql/item.h:
  my_bool -> bool
sql/item_cmpfunc.h:
  my_bool -> bool
  Changed result_for_null_param from my_bool to int as we stored -1 in it.
sql/item_func.cc:
  my_bool -> bool
  Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
sql/item_func.h:
  my_bool -> bool
sql/item_subselect.h:
  my_bool -> bool
sql/item_sum.cc:
  Modified udf wrapper functions so that the UDF functions would continue to use my_bool. (To keep compatibility with UDF:s)
sql/parse_file.h:
  my_bool -> bool
sql/rpl_mi.h:
  my_bool -> bool
sql/sp_rcontext.h:
  my_bool -> bool
sql/sql_analyse.h:
  my_bool -> bool
sql/sql_base.cc:
  Change some assignments so that we don't initialize bool variables with int's.
sql/sql_bitmap.h:
  my_bool -> bool
sql/sql_cache.cc:
  my_bool -> bool
sql/sql_cache.h:
  my_bool -> bool
sql/sql_class.h:
  my_bool -> bool
sql/sql_insert.cc:
  Change some assignments so that we don't initialize bool variables with int's.
sql/sql_prepare.cc:
  my_bool -> bool
sql/table.h:
  my_bool -> bool
storage/maria/ma_check.c:
  Removed duplicate assignment
strings/decimal.c:
  Fixed wrong variable usage.
  Don't do complex arithmetic on bool when simple works.
2010-09-24 01:00:32 +03:00
Michael Widenius
d042146e5b Merge with MariaDB 5.1.49
Removed references to HA_END_SPACE_KEY (which has been 0 for a long time)
2010-08-05 22:56:11 +03: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
Davi Arnaut
07e7b4d6fe WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
2010-07-15 08:13:30 -03:00
Davi Arnaut
f54a118249 WL#5486: Remove code for unsupported platforms
Remove Netware specific code.
2010-07-15 08:13:30 -03:00
Davi Arnaut
f56dd32bf7 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.

Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.

Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost. 

The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.

Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.

client/mysqldump.c:
  Pass my_free directly as its signature is compatible with the
  callback type -- which wasn't the case for free_table_ent.
2010-07-08 18:20:08 -03:00
Davi Arnaut
a10ae35328 Bug#34043: Server loops excessively in _checkchunk() when safemalloc is enabled
Essentially, the problem is that safemalloc is excruciatingly
slow as it checks all allocated blocks for overrun at each
memory management primitive, yielding a almost exponential
slowdown for the memory management functions (malloc, realloc,
free). The overrun check basically consists of verifying some
bytes of a block for certain magic keys, which catches some
simple forms of overrun. Another minor problem is violation
of aliasing rules and that its own internal list of blocks
is prone to corruption.

Another issue with safemalloc is rather the maintenance cost
as the tool has a significant impact on the server code.
Given the magnitude of memory debuggers available nowadays,
especially those that are provided with the platform malloc
implementation, maintenance of a in-house and largely obsolete
memory debugger becomes a burden that is not worth the effort
due to its slowness and lack of support for detecting more
common forms of heap corruption.

Since there are third-party tools that can provide the same
functionality at a lower or comparable performance cost, the
solution is to simply remove safemalloc. Third-party tools
can provide the same functionality at a lower or comparable
performance cost. 

The removal of safemalloc also allows a simplification of the
malloc wrappers, removing quite a bit of kludge: redefinition
of my_malloc, my_free and the removal of the unused second
argument of my_free. Since free() always check whether the
supplied pointer is null, redudant checks are also removed.

Also, this patch adds unit testing for my_malloc and moves
my_realloc implementation into the same file as the other
memory allocation primitives.
2010-07-08 18:20:08 -03:00
Davi Arnaut
db2fe44c84 Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-10 22:30:49 -03:00
Davi Arnaut
d6e003545a Merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-06-10 22:30:49 -03:00
Davi Arnaut
6f3a540c37 Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.

As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.

The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.

client/mysql.cc:
  Remove now-unnecessary casts.
  Break up large strings.
client/mysql_upgrade.c:
  Remove now-unnecessary casts.
client/mysqladmin.cc:
  Remove now-unnecessary casts.
  Break up large strings.
client/mysqlbinlog.cc:
  Remove now-unnecessary casts.
client/mysqlcheck.c:
  Remove now-unnecessary casts.
client/mysqldump.c:
  Remove now-unnecessary casts.
client/mysqlimport.c:
  Remove now-unnecessary casts.
client/mysqlshow.c:
  Remove now-unnecessary casts.
client/mysqlslap.c:
  Remove now-unnecessary casts.
client/mysqltest.cc:
  Remove now-unnecessary casts.
extra/comp_err.c:
  Remove now-unnecessary casts.
extra/my_print_defaults.c:
  Remove now-unnecessary casts.
  Break up large strings.
extra/mysql_waitpid.c:
  Remove now-unnecessary casts.
extra/perror.c:
  Remove now-unnecessary casts.
extra/resolve_stack_dump.c:
  Remove now-unnecessary casts.
extra/resolveip.c:
  Remove now-unnecessary casts.
include/my_getopt.h:
  Use a void pointer type as the opaque type to avoid problems with type
  incompatibility -- GCC issues warnings when the type name is not type
  compatible with a operand. As a side bonus, a explicit cast won't be
  necessary anymore.
include/sslopt-longopts.h:
  Remove now-unnecessary casts.
  Break up large strings.
mysys/my_getopt.c:
  Update opaque type and introduce a type definition for the
  argument to my_getopt_register_get_addr.
server-tools/instance-manager/options.cc:
  Remove now-unnecessary casts.
sql/mysqld.cc:
  Remove now-unnecessary casts.
  Break up large strings.
  Update mysql_getopt_value prototype (the old prototype
  was different from the definition anyway).
sql/sql_plugin.cc:
  The type of a pointer to a function must be compatible with the
  pointed-to function type, otherwise the behavior is undefined.
sql/table.cc:
  The variable buf pointer to pointer to pointer to constant char
  could improperly alias a incompatible type in call to fix_type_
  pointers. Since this was actually dead code, it is simply removed.
sql/unireg.cc:
  Remove call to get_form_pos. The code creates a new FRM file which
  is always truncated and writes the form position as 0. Hence, no
  need to retrieve it, we now for sure it is 0.
storage/archive/archive_reader.c:
  Remove now-unnecessary casts.
storage/myisam/ft_nlq_search.c:
  Read weight directly from the buffer.
storage/myisam/fulltext.h:
  Add explanation about the type duality of a key buffer.
  Add accessor macro to retrieve a FT float value.
storage/myisam/mi_test1.c:
  Remove now-unnecessary casts.
storage/myisam/myisam_ftdump.c:
  Read weight directly from the buffer.
storage/myisam/myisamchk.c:
  Remove now-unnecessary casts.
storage/myisam/myisamlog.c:
  A pointer to char was used to alias a pointer to pointer to
  unsigned char, thus violating strict aliasing rules.
storage/myisam/myisampack.c:
  Remove now-unnecessary casts.
strings/decimal.c:
  Remove aliasing violation, printing the value is enough for
  debugging purposes.
tests/mysql_client_test.c:
  Remove now-unnecessary casts.
2010-06-10 17:16:43 -03:00
Davi Arnaut
bb036c93b4 Bug#42733: Type-punning warnings when compiling MySQL --
strict aliasing violations.

Essentially, the problem is that large parts of the server were
developed in simpler times (last decades, pre C99 standard) when
strict aliasing and compilers supporting such optimizations were
rare to non-existent. Thus, when compiling the server with a modern
compiler that uses strict aliasing rules to perform optimizations,
there are several places in the code that might trigger undefined
behavior.

As evinced by some recent bugs, GCC does a somewhat good of job
misoptimizing such code, but on the other hand also gives warnings
about suspicious code. One problem is that the warnings aren't
always accurate, yet we can't afford to just shut them off as we
might miss real cases. False-positive cases are aggravated mostly
by casts that are likely to trigger undefined behavior.

The solution is to start a cleanup process focused on fixing and
reducing the amount of strict-aliasing related warnings produced
by GCC and others compilers. A good deal of noise reduction can
be achieved by just removing useless casts that are product of
historical cruft and are likely to trigger undefined behavior if
dereferenced.
2010-06-10 17:16:43 -03:00
Sergei Golubchik
ffc8f62b08 merge 5.1->5.2 2010-06-01 21:52:20 +02:00
unknown
b1e00b6be8 Merge MySQL 5.1.46 into MariaDB.
Still two test failures to be solved: main.myisam and main.subselect.
2010-04-28 14:52:24 +02:00
unknown
4bf849c23c Merge MySQL 5.1.44 into MariaDB. 2010-03-04 09:03:07 +01:00
Alexander Nozdrin
0b1d317b23 A follow-up on WL#5154 and WL#5182: remove forgotten options. 2010-03-03 22:22:02 +03:00
Alexander Nozdrin
4f08c6d0e5 A follow-up on WL#5154 and WL#5182: remove forgotten options. 2010-03-03 22:22:02 +03:00
Alexander Nozdrin
b3018e8613 Manual merge from mysql-trunk-merge.
Conflicts:
  - client/mysql.cc
  - client/mysqldump.c
  - configure.in
  - mysql-test/r/csv.result
  - mysql-test/r/func_time.result
  - mysql-test/r/show_check.result
  - mysql-test/r/sp-error.result
  - mysql-test/r/sp.result
  - mysql-test/r/sp_trans.result
  - mysql-test/r/type_blob.result
  - mysql-test/r/type_timestamp.result
  - mysql-test/r/warnings.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - sql/mysql_priv.h
  - sql/mysqld.cc
  - sql/sp.cc
  - sql/sql_base.cc
  - sql/sql_table.cc
  - sql/sql_trigger.cc
  - sql/sql_view.cc
  - sql/table.h
  - sql/share/errmsg.txt
  - mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result
2010-02-24 16:52:27 +03:00
Alexander Nozdrin
04b8cb1882 Manual merge from mysql-trunk-merge.
Conflicts:
  - client/mysql.cc
  - client/mysqldump.c
  - configure.in
  - mysql-test/r/csv.result
  - mysql-test/r/func_time.result
  - mysql-test/r/show_check.result
  - mysql-test/r/sp-error.result
  - mysql-test/r/sp.result
  - mysql-test/r/sp_trans.result
  - mysql-test/r/type_blob.result
  - mysql-test/r/type_timestamp.result
  - mysql-test/r/warnings.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - sql/mysql_priv.h
  - sql/mysqld.cc
  - sql/sp.cc
  - sql/sql_base.cc
  - sql/sql_table.cc
  - sql/sql_trigger.cc
  - sql/sql_view.cc
  - sql/table.h
  - sql/share/errmsg.txt
  - mysql-test/suite/sys_vars/r/log_bin_trust_routine_creators_basic.result
2010-02-24 16:52:27 +03:00
Sergei Golubchik
f09ca00e08 merged 2010-03-15 12:51:23 +01:00
Alexey Kopytov
0888e40fa3 Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in .bzr-mysql/default.conf
Text conflict in mysql-test/suite/rpl/r/rpl_slow_query_log.result
Text conflict in mysql-test/suite/rpl/t/rpl_slow_query_log.test
Conflict adding files to server-tools.  Created directory.
Conflict because server-tools is not versioned, but has versioned children.  Versioned directory.
Conflict adding files to server-tools/instance-manager.  Created directory.
Conflict because server-tools/instance-manager is not versioned, but has versioned children.  Versioned directory.
Contents conflict in server-tools/instance-manager/options.cc
Text conflict in sql/mysqld.cc
2010-02-09 12:59:38 +05:00
Alexey Kopytov
017c969896 Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

Text conflict in .bzr-mysql/default.conf
Text conflict in mysql-test/suite/rpl/r/rpl_slow_query_log.result
Text conflict in mysql-test/suite/rpl/t/rpl_slow_query_log.test
Conflict adding files to server-tools.  Created directory.
Conflict because server-tools is not versioned, but has versioned children.  Versioned directory.
Conflict adding files to server-tools/instance-manager.  Created directory.
Conflict because server-tools/instance-manager is not versioned, but has versioned children.  Versioned directory.
Contents conflict in server-tools/instance-manager/options.cc
Text conflict in sql/mysqld.cc
2010-02-09 12:59:38 +05:00
Alexey Kopytov
4a1b59b7ab Manual merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-01-24 00:09:23 +03:00
Alexey Kopytov
7b5f5d5c37 Manual merge of mysql-5.1-bugteam into mysql-trunk-merge. 2010-01-24 00:09:23 +03:00
Magne Mahre
132b46e96e WL#5154 Remove deprecated 4.1 features
Several items said to be deprecated in the 4.1 manual
have never been removed.  This worklog adds deprecation
warnings when these items are used, and warns the user 
that the items will be removed in MySQL 5.6.

A couple of previously deprecation decision have been
reversed (see single file comments)



client/client_priv.h:
  Macro similar to the one in the server (mysql_priv.h)
  for printing a deprecation warning message
client/mysql.cc:
  no-auto-rehash  will not be deprecated
  skip-line-numbers will not be deprecated
  skip-column-names will not be deprecated
  no-pager is deprecated
  set-variable is deprecated
  no-named-commands is deprecated
client/mysqladmin.cc:
  set-variable is deprecated
client/mysqlbinlog.cc:
  position is deprecated
client/mysqldump.c:
  first-slave is deprecated
  no-set-names is deprecated
  set-variable is deprecated
mysql-test/r/mysqlbinlog.result:
  Adding the [Warning] to the test case, just to show that the
  deprecation works.
  The test case will be changed in Celosia to use --start-position.
mysys/my_getopt.c:
  set-variable (include -O) is deprecated
scripts/mysqld_multi.sh:
  Warning for mysqld_multi
sql/mysqld.cc:
  default-collation is deprecated
  log-bin-trust-routine-creators is deprecated
  set-variable is deprecated
  default-character-set is deprecated
  safe-show-database is deprecated
sql/share/errmsg.txt:
  Added version number for sql_log_update deprecation message.
2010-01-21 09:10:05 +01:00
Magne Mahre
0482b6ebca WL#5154 Remove deprecated 4.1 features
Several items said to be deprecated in the 4.1 manual
have never been removed.  This worklog adds deprecation
warnings when these items are used, and warns the user 
that the items will be removed in MySQL 5.6.

A couple of previously deprecation decision have been
reversed (see single file comments)
2010-01-21 09:10:05 +01:00
Staale Smedseng
8c65b726a5 Recommit of Bug#49447. 2010-02-04 13:39:42 +01:00
Staale Smedseng
e3c1c83a16 Recommit of Bug#49447. 2010-02-04 13:39:42 +01:00
Alexander Nozdrin
52c66b5671 Manual merge/pull from mysql-next-mr.
Conflicts:
  - sql/sql_insert.cc
2009-11-25 18:03:05 +03:00
Alexander Nozdrin
a8d553e0e3 Manual merge/pull from mysql-next-mr.
Conflicts:
  - sql/sql_insert.cc
2009-11-25 18:03:05 +03:00
Konstantin Osipov
9a9e8d2311 Backport of:
----------------------------------------------------------------------
ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0
  Bug#32082 : definition of VOID in my_global.h conflicts with Windows
  SDK headers
  
  VOID macro is now removed. Its usage is replaced with void cast.
  In some cases, where cast does not make much sense (pthread_*, printf, 
  hash_delete, my_seek), cast is ommited.


client/mysqladmin.cc:
  Bug#32082 : remove VOID macro
client/mysqldump.c:
  Bug#32082 : remove VOID macro
client/mysqlimport.c:
  Bug#32082 : remove VOID macro
client/mysqlslap.c:
  Bug#32082 : remove VOID macro
client/mysqltest.cc:
  Bug#32082 : remove VOID macro
client/sql_string.cc:
  Bug#32082 : remove VOID macro
extra/comp_err.c:
  Bug#32082 : remove VOID macro
extra/replace.c:
  Bug#32082 : remove VOID macro
include/my_alarm.h:
  Bug#32082 : remove VOID macro
include/my_global.h:
  Bug#32082 : remove VOID macro
libmysql/libmysql.c:
  Bug#32082 : remove VOID macro
mysys/errors.c:
  Bug#32082 : remove VOID macro
mysys/hash.c:
  Bug#32082 : remove VOID macro
mysys/mf_iocache2.c:
  Bug#32082 : remove VOID macro
mysys/mf_loadpath.c:
  Bug#32082 : remove VOID macro
mysys/mf_path.c:
  Bug#32082 : remove VOID macro
mysys/my_append.c:
  Bug#32082 : remove VOID macro
mysys/my_clock.c:
  Bug#32082 : remove VOID macro
mysys/my_copy.c:
  Bug#32082 : remove VOID macro
mysys/my_fstream.c:
  Bug#32082 : remove VOID macro
mysys/my_getwd.c:
  Bug#32082 : remove VOID macro
mysys/my_lib.c:
  Bug#32082 : remove VOID macro
mysys/my_lockmem.c:
  Bug#32082 : remove VOID macro
mysys/my_pthread.c:
  Bug#32082 : remove VOID macro
mysys/my_redel.c:
  Bug#32082 : remove VOID macro
mysys/stacktrace.c:
  Bug#32082 : remove VOID macro
mysys/thr_alarm.c:
  Bug#32082 : remove VOID macro
mysys/thr_lock.c:
  Bug#32082 : remove VOID macro
sql/derror.cc:
  Bug#32082 : remove VOID macro
sql/des_key_file.cc:
  Bug#32082 : remove VOID macro
sql/discover.cc:
  Bug#32082 : remove VOID macro
sql/field.cc:
  Bug#32082 : remove VOID macro
sql/filesort.cc:
  Bug#32082 : remove VOID macro
sql/ha_ndbcluster.cc:
  Bug#32082 : remove VOID macro
sql/ha_partition.cc:
  Bug#32082 : remove VOID macro
sql/handler.cc:
  Bug#32082 : remove VOID macro
sql/hostname.cc:
  Bug#32082 : remove VOID macro
sql/init.cc:
  Bug#32082 : remove VOID macro
sql/item.cc:
  Bug#32082 : remove VOID macro
sql/item_cmpfunc.cc:
  Bug#32082 : remove VOID macro
sql/item_strfunc.cc:
  Bug#32082 : remove VOID macro
sql/lock.cc:
  Bug#32082 : remove VOID macro
sql/log.cc:
  Bug#32082 : remove VOID macro
sql/log_event.cc:
  Bug#32082 : remove VOID macro
sql/mysqld.cc:
  Bug#32082 : remove VOID macro
sql/opt_range.h:
  Bug#32082 : remove VOID macro
sql/protocol.cc:
  Bug#32082 : remove VOID macro
sql/records.cc:
  Bug#32082 : remove VOID macro
sql/sp_head.cc:
  Bug#32082 : remove VOID macro
sql/sp_pcontext.cc:
  Bug#32082 : remove VOID macro
sql/sql_acl.cc:
  Bug#32082 : remove VOID macro
sql/sql_base.cc:
  Bug#32082 : remove VOID macro
sql/sql_cache.cc:
  Bug#32082 : remove VOID macro
sql/sql_connect.cc:
  Bug#32082 : remove VOID macro
sql/sql_db.cc:
  Bug#32082 : remove VOID macro
sql/sql_delete.cc:
  Bug#32082 : remove VOID macro
sql/sql_handler.cc:
  Bug#32082 : remove VOID macro
sql/sql_insert.cc:
  Bug#32082 : remove VOID macro
sql/sql_map.cc:
  Bug#32082 : remove VOID macro
sql/sql_parse.cc:
  Bug#32082 : remove VOID macro
sql/sql_select.cc:
  Bug#32082 : remove VOID macro
sql/sql_servers.cc:
  Bug#32082 : remove VOID macro
sql/sql_show.cc:
  Bug#32082 : remove VOID macro
sql/sql_string.cc:
  Bug#32082 : remove VOID macro
sql/sql_table.cc:
  Bug#32082 : remove VOID macro
sql/sql_test.cc:
  Bug#32082 : remove VOID macro
sql/sql_trigger.cc:
  Bug#32082 : remove VOID macro
sql/sql_update.cc:
  Bug#32082 : remove VOID macro
sql/sql_view.cc:
  Bug#32082 : remove VOID macro
sql/table.cc:
  Bug#32082 : remove VOID macro
sql/tztime.cc:
  Bug#32082 : remove VOID macro
sql/udf_example.c:
  Bug#32082 : remove VOID macro
sql/uniques.cc:
  Bug#32082 : remove VOID macro
sql/unireg.cc:
  Bug#32082 : remove VOID macro
storage/archive/ha_archive.cc:
  Bug#32082 : remove VOID macro
storage/blackhole/ha_blackhole.cc:
  Bug#32082 : remove VOID macro
storage/csv/ha_tina.cc:
  Bug#32082 : remove VOID macro
storage/csv/transparent_file.cc:
  Bug#32082 : remove VOID macro
storage/example/ha_example.cc:
  Bug#32082 : remove VOID macro
storage/federated/ha_federated.cc:
  Bug#32082 : remove VOID macro
storage/heap/hp_clear.c:
  Bug#32082 : remove VOID macro
storage/heap/hp_create.c:
  Bug#32082 : remove VOID macro
storage/heap/hp_test1.c:
  Bug#32082 : remove VOID macro
storage/heap/hp_test2.c:
  Bug#32082 : remove VOID macro
storage/innobase/handler/ha_innodb.cc:
  Bug#32082 : remove VOID macro
storage/myisam/ft_eval.c:
  Bug#32082 : remove VOID macro
storage/myisam/ha_myisam.cc:
  Bug#32082 : remove VOID macro
storage/myisam/mi_changed.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_check.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_close.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_create.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_dbug.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_delete.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_delete_all.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_dynrec.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_info.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_locking.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_log.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_open.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_packrec.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_panic.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_rsame.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_statrec.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_test1.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_test2.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_test3.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_update.c:
  Bug#32082 : remove VOID macro
storage/myisam/mi_write.c:
  Bug#32082 : remove VOID macro
storage/myisam/myisamchk.c:
  Bug#32082 : remove VOID macro
storage/myisam/myisamlog.c:
  Bug#32082 : remove VOID macro
storage/myisam/myisampack.c:
  Bug#32082 : remove VOID macro
storage/myisam/sort.c:
  Bug#32082 : remove VOID macro
storage/myisammrg/myrg_close.c:
  Bug#32082 : remove VOID macro
storage/myisammrg/myrg_create.c:
  Bug#32082 : remove VOID macro
storage/myisammrg/myrg_open.c:
  Bug#32082 : remove VOID macro
strings/str_test.c:
  Bug#32082 : remove VOID macro
tests/thread_test.c:
  Bug#32082 : remove VOID macro
2009-11-24 16:54:59 +03:00
Konstantin Osipov
4cff617c25 Backport of:
----------------------------------------------------------------------
ChangeSet@1.2571, 2008-04-08 12:30:06+02:00, vvaintroub@wva. +122 -0
  Bug#32082 : definition of VOID in my_global.h conflicts with Windows
  SDK headers
  
  VOID macro is now removed. Its usage is replaced with void cast.
  In some cases, where cast does not make much sense (pthread_*, printf, 
  hash_delete, my_seek), cast is ommited.
2009-11-24 16:54:59 +03:00
Konstantin Osipov
34b11fb627 Merge with next-mr 2009-11-20 17:18:37 +03:00
Konstantin Osipov
d51a4fae32 Merge with next-mr 2009-11-20 17:18:37 +03:00
Alexey Botchkov
6c832ee4bf merging. 2009-11-17 15:27:40 +04:00
Alexey Botchkov
12043816fa merging. 2009-11-17 15:27:40 +04:00
Igor Babaev
e4e1ae0d13 Merge of the patch introducing virtual columns into maria-5.2 2009-11-11 20:31:28 -08:00
Magne Mahre
272b9ad5de Return type fix (strlen returns size_t) 2009-11-11 17:22:27 +01:00
Magne Mahre
ab06139134 Return type fix (strlen returns size_t) 2009-11-11 17:22:27 +01:00
Magne Mahre
fa08bae760 Bug #5724 'mysqladmin password' should be allowed to prompt for password
Add support for being prompted for new passwords by mysqladmin instead of
specifying them on the command line. (Bug #5724, patch by Harrison Fisk)
2009-11-11 17:17:58 +01:00
Magne Mahre
0dfc8b22f4 Bug #5724 'mysqladmin password' should be allowed to prompt for password
Add support for being prompted for new passwords by mysqladmin instead of
specifying them on the command line. (Bug #5724, patch by Harrison Fisk)
2009-11-11 17:17:58 +01:00
Michael Widenius
056cebe61a Automatic merge with 5.1 2009-10-28 16:56:07 +02:00
Michael Widenius
5bddbc44c6 Fixed compiler warning message
- Added checking of return value for system(), freopen(), fgets() and chown()
- Ensure that calls that require a format strings gets a format string
- Other trivial things
Updated test suite results (especially for pbxt and embedded server)
Removed warning for "Invalid (old?) table or database name 'mysqld.1'" from pbxt tests
Speed up some pbxt tests by inserting begin ; commit; around "while loops with inserts"
Added mysqld startup option '--debug-flush'
Create maria_recovery.trace in data directory instead of current directory

client/mysql.cc:
  Check return value from system()
client/mysql_upgrade.c:
  Check return value from fgets()
client/mysqladmin.cc:
  Check return value from fgets()
client/mysqlslap.c:
  Check return value from system() (but ignore it, as it's not critical)
extra/yassl/src/crypto_wrapper.cpp:
  Check return value from fgets() (but ignore it, as it's internal file)
extra/yassl/taocrypt/src/aes.cpp:
  Added extra {} to remove compiler warning
extra/yassl/taocrypt/src/blowfish.cpp:
  Added extra {} to remove compiler warning
extra/yassl/taocrypt/src/misc.cpp:
  Ifdef not used code
include/mysys_err.h:
  Added error message for failing chown()
mysql-test/mysql-test-run.pl:
  Don't give warning for skipping ndbcluster (never enabled in MariaDB)
mysql-test/suite/funcs_1/r/is_columns_is_embedded.result:
  Update with new information schema information
mysql-test/suite/funcs_1/r/is_tables_is_embedded.result:
  New test
mysql-test/suite/funcs_1/r/is_tables_myisam_embedded.result:
  Update test results (has not been tested for a long time)
mysql-test/suite/funcs_1/r/is_tables_mysql_embedded.result:
  Update test results (has not been tested for a long time)
mysql-test/suite/funcs_1/t/is_tables_is.test:
  Don't run with embedded server (as results differ)
  I added a new test for embedded server
mysql-test/suite/funcs_1/t/is_tables_is_embedded.test:
  New test
mysql-test/suite/pbxt/my.cnf:
  Allow one to run pbxt tests without having to specify --mysqld=--default-storage-engine=pbxt
mysql-test/suite/pbxt/t/count_distinct3.test:
  Speed up test by inserting begin; ... commit;
mysql-test/suite/pbxt/t/subselect.test:
  Speed up test by inserting begin; ... commit;
mysys/errors.c:
  Added error message for failing chown()
mysys/my_copy.c:
  Added error message for failing chown()
mysys/my_redel.c:
  Added error message for failing chown()
mysys/safemalloc.c:
  Added cast to get rid of compiler warning
sql/ha_partition.cc:
  Fixed wrong argument to sql_print_error() (it requires a format string)
sql/log.cc:
  Test return value of freopen()
sql/mysqld.cc:
  Test return value of freopen()
  Added startup option '--debug-flush' to be used when one gets a core dump (easy to explain to people on IRC)
sql/rpl_rli.cc:
  Fixed wrong argument to sql_print_error() (it requires a format string)
sql/set_var.cc:
  Added {} to get rid of compiler warnings
sql/slave.cc:
  Fixed wrong argument to mi->report() and sql_print...() (they require a format string)
sql/sql_cache.cc:
  Fixed wrong argument to sql_printinformation() (it requires a format string)
sql/sql_parse.cc:
  Test return value of fgets()
sql/sql_plugin.cc:
  Fixed wrong argument to sql_print_error() (it requires a format string)
sql/sql_select.cc:
  Use unique table name for internal temp tables instead of full path
  (Simple speed & space optimization)
sql/udf_example.c:
  Removed compiler warning about not used variable
storage/maria/ha_maria.cc:
  Fixed wrong argument to sql_print_error() and ma_check_print_error() (they require a format string)
storage/maria/ma_recovery.c:
  Create maria_recovery.trace in data directory instead of current directory
storage/maria/unittest/ma_test_loghandler-t.c:
  Fixed wrong argument to ok();  Requires a format string
storage/pbxt/src/strutil_xt.cc:
  Detect temporary tables by checking if that path for the table is in the mysql data directory.
  The database for temporary tables is after this patch, from PBXT point of view, ""
  This is needed to stop PBXT from calling filename_to_tablename() with the base directory as an argument, which caused
  ERROR: Invalid (old?) table or database name 'mysqld.1'" in the log when running the test suite.
tests/mysql_client_test.c:
  Fixed compiler warnings
unittest/mysys/base64-t.c:
  Fixed wrong argument to diag() (it requires a format string)
  Added a comment that the current 'print' of differing buffers doesn't print the right thing,
  but didn't fix this as it's not important (unless we find a bug in the real code)
2009-10-26 13:35:42 +02:00
Alexander Barkov
c15f970dc8 WL#1349 Use operating system localization to send it as a default client character set 2009-10-21 17:59:47 +05:00
Alexander Barkov
99eae48a97 WL#1349 Use operating system localization to send it as a default client character set 2009-10-21 17:59:47 +05:00
Michael Widenius
ab0905c6d7 This is based on the userstatv2 patch from Percona and OurDelta.
The original code comes, as far as I know, from Google (Mark Callaghan's team) with additional work from Percona, Ourdelta and Weldon Whipple.

This code provides the same functionallity, but with a lot of changes to make it faster and better fit the MariaDB infrastucture.

Added new status variables:
- Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics
- Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_sent, Rows_read

Added new variable / startup option 'userstat' to control if user statistics should be enabled or not

Added my_getcputime(); Returns cpu time used by this thread.
New FLUSH commands:
- FLUSH SLOW QUERY LOG
- FLUSH TABLE_STATISTICS
- FLUSH INDEX_STATISTICS
- FLUSH USER_STATISTICS
- FLUSH CLIENT_STATISTICS

New SHOW commands:
- SHOW CLIENT_STATISTICS
- SHOW USER_STATISTICS
- SHOW TABLE_STATISTICS
- SHOW INDEX_STATISTICS

New Information schemas:
- CLIENT_STATISTICS
- USER_STATISTICS
- INDEX_STATISTICS
- TABLE_STATISTICS

Added support for all new flush commands to mysqladmin

Added handler::ha_... wrappers for all handler read calls to do statistics counting
- Changed all code to use new ha_... calls
- Count number of read rows, changed rows and rows read trough an index

Added counting of number of bytes sent to binary log (status variable Binlog_bytes_written)
Added counting of access denied errors (status variable Access_denied_erors)

Bugs fixed:
- Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long
- CLOCK_GETTIME was not propely working on Linuxm

client/mysqladmin.cc:
  Added support for all new flush commmands and some common combinations:
  
  flush-slow-log
  flush-table-statistics
  flush-index-statistics
  flush-user-statistics
  flush-client-statistics
  flush-all-status
  flush-all-statistics
configure.in:
  Added checking if clock_gettime needs the librt.
  (Fixes Bug #37639 clock_gettime is never used/enabled in Linux/Unix)
include/my_sys.h:
  Added my_getcputime()
include/mysql_com.h:
  Added LIST_PROCESS_HOST_LEN & new REFRESH target defines
mysql-test/r/information_schema.result:
  New information schema tables added
mysql-test/r/information_schema_all_engines.result:
  New information schema tables added
mysql-test/r/information_schema_db.result:
  New information schema tables added
mysql-test/r/log_slow.result:
  Added testing that flosh slow query logs is accepted
mysql-test/r/status_user.result:
  Basic testing of user, client, table and index statistics
mysql-test/t/log_slow.test:
  Added testing that flosh slow query logs is accepted
mysql-test/t/status_user-master.opt:
  Ensure that we get a fresh restart before running status_user.test
mysql-test/t/status_user.test:
  Basic testing of user, client, table and index statistics
mysys/my_getsystime.c:
  Added my_getcputime()
  Returns cpu time used by this thread.
sql/authors.h:
  Updated authors to have core and original MySQL developers first.
sql/event_data_objects.cc:
  Updated call to mysql_reset_thd_for_next_command()
sql/event_db_repository.cc:
  Changed to use new ha_... calls
sql/filesort.cc:
  Changed to use new ha_... calls
sql/ha_partition.cc:
  Changed to use new ha_... calls
  Fixed comment syntax
sql/handler.cc:
  Changed to use new ha_... calls
  Reset table statistics
  Added code to update global table and index status
  Added counting of rows changed
sql/handler.h:
  Added table and index statistics variables
  Added function reset_statistics()
  Added handler::ha_... wrappers for all handler read calls to do statistics counting
  Protected all normal read calls to ensure we use the new calls in the server.
  Made ha_partition a friend class so that partition code can call the old read functions
sql/item_subselect.cc:
  Changed to use new ha_... calls
sql/lex.h:
  Added keywords for new information schema tables and flush commands
sql/log.cc:
  Added flush_slow_log()
  Added counting of number of bytes sent to binary log
  Removed not needed test of thd (It's used before, so it's safe to use)
  Added THD object to MYSQL_BIN_LOG::write_cache() to simplify statistics counting
sql/log.h:
  Added new parameter to write_cache()
  Added flush_slow_log() functions.
sql/log_event.cc:
  Updated call to mysql_reset_thd_for_next_command()
  Changed to use new ha_... calls
sql/log_event_old.cc:
  Updated call to mysql_reset_thd_for_next_command()
  Changed to use new ha_... calls
sql/mysql_priv.h:
  Updated call to mysql_reset_thd_for_next_command()
  Added new statistics functions and variables needed by these.
sql/mysqld.cc:
  Added new statistics variables and structures to handle these
  Added new status variables:
  - Com_show_client_statistics, Com_show_index_statistics, Com_show_table_statistics, Com_show_user_statistics
  - Access_denied_errors, Busy_time (clock time), Binlog_bytes_written, Cpu_time, Empty_queries, Rows_set, Rows_read
  Added new option 'userstat' to control if user statistics should be enabled or not
sql/opt_range.cc:
  Changed to use new ha_... calls
sql/opt_range.h:
  Changed to use new ha_... calls
sql/opt_sum.cc:
  Changed to use new ha_... calls
sql/records.cc:
  Changed to use new ha_... calls
sql/set_var.cc:
  Added variable 'userstat'
sql/sp.cc:
  Changed to use new ha_... calls
sql/sql_acl.cc:
  Changed to use new ha_... calls
  Added counting of access_denied_errors
sql/sql_base.cc:
  Added call to statistics functions
sql/sql_class.cc:
  Added usage of org_status_var, to store status variables at start of command
  Added functions THD::update_stats(), THD::update_all_stats()
  Fixed bug in add_to_status() and add_diff_to_status() where longlong variables where threated as long
sql/sql_class.h:
  Added new status variables to status_var
  Moved variables that was not ulong in status_var last.
  Added variables to THD for storing temporary values during statistics counting
sql/sql_connect.cc:
  Variables and functions to calculate user and client statistics
  Added counting of access_denied_errors and lost_connections
sql/sql_cursor.cc:
  Changed to use new ha_... calls
sql/sql_handler.cc:
  Changed to use new ha_... calls
sql/sql_help.cc:
  Changed to use new ha_... calls
sql/sql_insert.cc:
  Changed to use new ha_... calls
sql/sql_lex.h:
  Added SQLCOM_SHOW_USER_STATS, SQLCOM_SHOW_TABLE_STATS, SQLCOM_SHOW_INDEX_STATS, SQLCOM_SHOW_CLIENT_STATS
sql/sql_parse.cc:
  Added handling of:
  - SHOW CLIENT_STATISTICS
  - SHOW USER_STATISTICS
  - SHOW TABLE_STATISTICS
  - SHOW INDEX_STATISTICS
  Added handling of new FLUSH commands:
  - FLUSH SLOW QUERY LOGS
  - FLUSH TABLE_STATISTICS
  - FLUSH INDEX_STATISTICS
  - FLUSH USER_STATISTICS
  - FLUSH CLIENT_STATISTICS
  Added THD parameter to mysql_reset_thd_for_next_command()
  Added initialization and calls to user statistics functions
  Added increment of statistics variables empty_queries, rows_sent and access_denied_errors.
  Added counting of cpu time per query
sql/sql_plugin.cc:
  Changed to use new ha_... calls
sql/sql_prepare.cc:
  Updated call to mysql_reset_thd_for_next_command()
sql/sql_select.cc:
  Changed to use new ha_... calls
  Indentation changes
sql/sql_servers.cc:
  Changed to use new ha_... calls
sql/sql_show.cc:
  Added counting of access denied errors
  Added function for new information schema tables:
  - CLIENT_STATISTICS
  - USER_STATISTICS
  - INDEX_STATISTICS
  - TABLE_STATISTICS
  Changed to use new ha_... calls
sql/sql_table.cc:
  Changed to use new ha_... calls
sql/sql_udf.cc:
  Changed to use new ha_... calls
sql/sql_update.cc:
  Changed to use new ha_... calls
sql/sql_yacc.yy:
  Add new show and flush commands
sql/structs.h:
  Add name_length to KEY to avoid some strlen
  Added cache_name to KEY for fast storage of keyvalue in cache
  Added structs USER_STATS, TABLE_STATS, INDEX_STATS
  Added function prototypes for statistics functions
sql/table.cc:
  Store db+table+index name into keyinfo->cache_name
sql/table.h:
  Added new information schema tables
sql/tztime.cc:
  Changed to use new ha_... calls
2009-10-19 20:14:48 +03:00
unknown
6aad537a6a Merge MySQL 5.1.39 into MariaDB 5.1. 2009-10-15 23:38:29 +02:00
Alexey Botchkov
760d42e7d0 Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found

per-file comments:
  client/mysql.cc
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysql_upgrade.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqladmin.cc
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqlcheck.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqldump.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqlimport.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqlshow.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqlslap.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  mysql-test/t/mysql.test
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
   test added
  sql/mysqld.cc
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  storage/myisam/myisamchk.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  storage/myisam/myisampack.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
2009-10-09 19:44:22 +05:00
Alexey Botchkov
de7619823d Bug#47216 programs should quit if the file specified by --defaults-file option isn't found
added code to exit a tool if the forced config file wasn't found

per-file comments:
  client/mysql.cc
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysql_upgrade.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqladmin.cc
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqlcheck.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqldump.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqlimport.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqlshow.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  client/mysqlslap.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  mysql-test/t/mysql.test
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
   test added
  sql/mysqld.cc
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  storage/myisam/myisamchk.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
  storage/myisam/myisampack.c
Bug#47216      programs should quit if the file specified by --defaults-file option isn't found
    added code to exit a tool if the forced config file wasn't found
2009-10-09 19:44:22 +05:00
Sergey Petrunya
29f0dcb563 Merge MySQL->MariaDB
* Finished Monty and Jani's merge
* Some InnoDB tests still fail (because it's old xtradb code run against
  newer testsuite). They are expected to go after mergning with the latest
  xtradb.
2009-09-08 00:50:10 +04:00
Tatiana A. Nurnberg
cf69196922 manual merge 2009-08-31 12:40:33 -07:00
Tatiana A. Nurnberg
e8d45e1be7 manual merge 2009-08-31 12:40:33 -07:00
Tatiana A. Nurnberg
d85148d84c Bug#35132: MySQLadmin --wait ping always crashes on Windows systems
Failing to connect would release parts of the MYSQL struct.
We would then proceed to try again to connect without re-
initializing the struct.

We prevent the unwanted freeing of data we'll still need now.


client/mysqladmin.cc:
  Losing a connection (or not even getting on in the first place) should
  not trash the MYSQL-struct.
  
  Add a lot of comments.
  
  Rewrite re-connection fu.
sql-common/client.c:
  Assert against bad parameters usually caused by de-initing a
  MYSQL-struct without re-initing it again before re-use.
2009-08-31 10:01:13 -07:00
Tatiana A. Nurnberg
c3aac11c08 Bug#35132: MySQLadmin --wait ping always crashes on Windows systems
Failing to connect would release parts of the MYSQL struct.
We would then proceed to try again to connect without re-
initializing the struct.

We prevent the unwanted freeing of data we'll still need now.
2009-08-31 10:01:13 -07:00
Staale Smedseng
5be4c38226 Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
Staale Smedseng
f59ef9eafa Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
Staale Smedseng
1ba25ae47c Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
      
This patch fixes a number of GCC warnings about variables used
before initialized. A new macro UNINIT_VAR() is introduced for
use in the variable declaration, and LINT_INIT() usage will be
gradually deprecated. (A workaround is used for g++, pending a
patch for a g++ bug.)
      
GCC warnings for unused results (attribute warn_unused_result)
for a number of system calls (present at least in later
Ubuntus, where the usual void cast trick doesn't work) are
also fixed.


client/mysqlmanager-pwgen.c:
  A fix for warn_unused_result, adding fallback to use of
  srand()/rand() if /dev/random cannot be used. Also actually
  adds calls to rand() in the second branch so that it actually
  creates a random password.
2009-08-28 17:51:31 +02:00
Staale Smedseng
2217de2513 Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
      
This patch fixes a number of GCC warnings about variables used
before initialized. A new macro UNINIT_VAR() is introduced for
use in the variable declaration, and LINT_INIT() usage will be
gradually deprecated. (A workaround is used for g++, pending a
patch for a g++ bug.)
      
GCC warnings for unused results (attribute warn_unused_result)
for a number of system calls (present at least in later
Ubuntus, where the usual void cast trick doesn't work) are
also fixed.
2009-08-28 17:51:31 +02:00
Jim Winstead
d57bb98ff5 mysqladmin --count=X --sleep=Y would always delay Y seconds after the last
iteration before exiting. (Bug #42639)
2009-05-20 17:25:10 -07:00
Jim Winstead
89a6be6438 mysqladmin --count=X --sleep=Y would always delay Y seconds after the last
iteration before exiting. (Bug #42639)
2009-05-20 17:25:10 -07:00
Jim Winstead
1f6fa46b7a mysqladmin did not have enough space allocated for tracking all variables
when using --vertical or --relative with extended-status. (Bug #40395)

  This patch simply increases the buffer size and adds an assert to
  check that it is big enough -- a more comprehensive fix would dynamically
  allocate the appropriate buffers.
2009-05-18 14:19:18 -07:00
Jim Winstead
c2fcd6b26d mysqladmin did not have enough space allocated for tracking all variables
when using --vertical or --relative with extended-status. (Bug #40395)

  This patch simply increases the buffer size and adds an assert to
  check that it is big enough -- a more comprehensive fix would dynamically
  allocate the appropriate buffers.
2009-05-18 14:19:18 -07:00