Commit graph

1710 commits

Author SHA1 Message Date
Michael Widenius
6920457142 Merge with MariaDB 5.1 2011-11-24 18:48:58 +02:00
Sergei Golubchik
7189f09aa6 compiler warnings/errors 2011-11-23 18:25:07 +01: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
Michael Widenius
fb135f7ee5 Automatic merge with 5.2 2011-08-15 22:14:08 +03:00
Michael Widenius
397fc34f44 Fixes MySQL bug#48972: mysqldump --insert-ignore leaves set unique_checks=0.
This fixes a bug that when you use mysqldump --no-create-info to generate a dump that you want to merge with an existing table,
you can get an innodb table with duplicated unique keys.
Patch orignally by Eric Bergen.


client/mysqldump.c:
  Only use UNIQUE_CHECKS=0 for tables that are created.
  This solves the issue that you can't get duplicate unique keys when merging two dumps.
mysql-test/r/mysqldump.result:
  Test for mysqldump --no-create-info
2011-08-10 13:08:19 +03: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
Kent Boortz
027b5f1ed4 Updated/added copyright headers 2011-07-03 17:47:37 +02:00
Kent Boortz
b6e6097c95 Updated/added copyright headers 2011-07-03 17:47:37 +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
Kent Boortz
02e07e3b51 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Kent Boortz
9da00ebec9 Updated/added copyright headers 2011-06-30 17:46:53 +02:00
Georgi Kodinov
8d7361f803 Fixed cast warnings in introducing the pluggable authentication client
options.
2011-06-06 13:27:05 +03:00
Michael Widenius
f34be18938 Merge with MariaDB 5.2 2011-05-10 18:17:43 +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
unknown
64e43e1cc8 Merge various replication-related patches into MariaDB 5.3:
- MWL#116 Group commit
 - MWL#136 Enhancements for START TRANSACTION WITH CONSISTENT SNAPSHOT
 - MWL#47 Annotate_rows_log_event
 - MWL#163 innodb_release_locks_early
 - Percona patch enhancing row-based replication for tables with no primary key
2011-04-08 09:39:33 +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
unknown
753c406994 Merge from mysql-5.5.10-release 2011-03-16 15:11:20 +01:00
hery.ramilison@oracle.com
18d2e55c51 Merge from mysql-5.5.10-release 2011-03-16 15:11:20 +01:00
Nirbhay Choubey
a5f20712a0 Merge of fix for bug#11766310 from mysql-5.1 -> mysql-5.5. 2011-02-21 12:42:27 +05:30
Nirbhay Choubey
000a390e81 Merge of fix for bug#11766310 from mysql-5.1 -> mysql-5.5. 2011-02-21 12:42:27 +05:30
Nirbhay Choubey
876502d743 Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH
("-") IN DATABASE NAMES IN ALTER DATABASE.

mysqldump did not quote database name in 'ALTER DATABASE'
statements in its output. This can further cause a failure
while loading if database name contains a hyphen '-'.

This happened as, while printing the 'ALTER DATABASE'
statements, the database name was not quoted.

Fixed by quoting the database name.


client/mysqldump.c:
  Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH
                 ("-") IN DATABASE NAMES IN ALTER DATABASE.
  
  Modified the print statement in order to print the quoted
  database name for 'ALTER DATABASE' statements.
mysql-test/r/mysqldump.result:
  Added a test case for bug#11766310.
mysql-test/t/mysqldump.test:
  Added a test case for bug#11766310.
2011-02-21 12:37:24 +05:30
Nirbhay Choubey
a8e6f7c67b Bug#11766310 : 59398: MYSQLDUMP 5.1 CAN'T HANDLE A DASH
("-") IN DATABASE NAMES IN ALTER DATABASE.

mysqldump did not quote database name in 'ALTER DATABASE'
statements in its output. This can further cause a failure
while loading if database name contains a hyphen '-'.

This happened as, while printing the 'ALTER DATABASE'
statements, the database name was not quoted.

Fixed by quoting the database name.
2011-02-21 12:37:24 +05:30
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
ab2d29ec6b Bug#13618 : mysqldump --xml omits comment on table field
When mysqldump tries to dump information in xml format,
the result does not contain field level comments.

In order to retrieve various informations for a field/column,
mysqldump currently uses 'show fields from <tab>' statement.
The attributes returned by the statement lacks the information
regarding field comments.

Fixed by changing the query to one that probes I_S to retrieve
required field informations, including the field comment.


client/mysqldump.c:
  Bug#13618 : mysqldump --xml omits comment on table field.
  
  Replaced the 'show fields' command by a statement that
  queries I_S, in order to retrieve information on all the
  attributes that 'show fields' returns along-with an additional
  column_comment information.
mysql-test/r/client_xml.result:
  Result modifications for bug#13618.
mysql-test/r/mysqldump.result:
  Result modifications for bug#13618.
mysql-test/t/mysqldump.test:
  Added a testcase for bug#13618.
2011-01-14 19:50:34 +05:30
Nirbhay Choubey
95e07a6fb7 Bug#13618 : mysqldump --xml omits comment on table field
When mysqldump tries to dump information in xml format,
the result does not contain field level comments.

In order to retrieve various informations for a field/column,
mysqldump currently uses 'show fields from <tab>' statement.
The attributes returned by the statement lacks the information
regarding field comments.

Fixed by changing the query to one that probes I_S to retrieve
required field informations, including the field comment.
2011-01-14 19:50:34 +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
ad6c8d2342 Merging fix of Bug#13618 from mysql-5.1. 2011-01-14 20:11:00 +05:30
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
43a2f80e16 Merging fix of Bug#13618 from mysql-5.1. 2011-01-14 20:11:00 +05:30
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
unknown
2a97416e9b MWL#136: Rename binlog_trx_{file,position} to the much better binlog_snapshot_{file,position} 2010-11-08 11:59:39 +01:00
unknown
7322e38827 MWL#136: Cross-engine consistency for START TRANSACTION WITH CONSISTENT SNAPSHOT
Make the binlog handlerton participate in START TRANSACTION WITH CONSISTENT
SNAPSHOT, recording the binlog position corresponding to the snapshot taken
in other MVCC storage engines.

Expose this consistent binlog position as the new status variables
binlog_trx_file and binlog_trx_position. This enables to get a fully
non-locking snapshot of the database (including binlog position for
slave provisioning), avoiding the need for FLUSH TABLES WITH READ LOCK.

Modify mysqldump to detect if the server supports this new feature, and
if so, avoid FLUSH TABLES WITH READ LOCK for --single-transaction
--master-data snapshot backups.
2010-11-07 22:37:43 +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
Magnus Blåudd
8c8080adfb Bug#56117 ha_ndbcluster_tables.h included by mysqldump but not used
- Remove include of ha_ndbcluster_tables.h from mysqldump.c
2010-08-30 14:06:32 +02:00
Magnus Blåudd
1b3d5da50e Bug#56117 ha_ndbcluster_tables.h included by mysqldump but not used
- Remove include of ha_ndbcluster_tables.h from mysqldump.c
2010-08-30 14:06:32 +02:00
Michael Widenius
236478cef7 Fixed compiler warnings from Windows compiler
client/mysqlcheck.c:
  Added missing casts
client/mysqldump.c:
  Added missing casts
client/mysqlimport.c:
  Added missing casts
extra/my_print_defaults.c:
  Added missing casts
mysql-test/mysql-test-run.pl:
  Added suppression for non-critical warning on windows
storage/maria/maria_pack.c:
  Added missing casts
storage/xtradb/buf/buf0lru.c:
  Added missing casts
storage/xtradb/fil/fil0fil.c:
  Added missing casts
storage/xtradb/handler/i_s.cc:
  Added extra argument to call store() function for longlong.
storage/xtradb/srv/srv0srv.c:
  Added cast to suppress compiler warning
support-files/compiler_warnings.supp:
  Added suppression for some non critical compiler warnings on Windows
unittest/mytap/tap.h:
  Fixed prototypes to be same as the actual functions
2010-08-11 13:55:54 +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
13f7a1d244 WL#5486: Remove code for unsupported platforms
Remove MS-DOS specific code.
2010-07-15 08:16:06 -03:00
Davi Arnaut
b3d22cef93 WL#5486: Remove code for unsupported platforms
Remove MS-DOS specific code.
2010-07-15 08:16:06 -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
Michael Widenius
5a2f40d48a Fixes for Opensolaris (to get buildbot green)
- Fixed memory leaks in mysqldump
- Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
- Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris


client/mysqldump.c:
  Fixed memory leaks
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
client/mysqltest.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
include/my_global.h:
  Added simple macro val_or_null() to simplify detecting of NULL strings for printf
sql/handler.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
sql/sql_db.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
  Removed testing of 'new_db_name' as this is guranteed never NULL
sql/sql_show.cc:
  Fixed printf of NULL which caused crashes on OpenSolaris when using --debug
storage/csv/ha_tina.cc:
  Fixed realloc() problem that caused out of memory when running mysqldump.test on OpenSolaris
  (OpenSolaris default malloc() can't handle a lot of reallocs() of strings that are growing one byte at a time)
  This did speed up logging to cvs with a magnitude for large strings.
2010-06-23 03:48:11 +03:00
Michael Widenius
ec281a3c34 Fixed some bugs in the Maria storage engine
- Changed default recovery mode from OFF to NORMAL to get automatic repair of not properly closed tables.
- Fixed a rase condition when two threads calls external_lock and thr_lock() in different order. When this happend the transaction that called external lock first
  and thr_lock() last did not see see the rows from the other transaction, even if if it had to wait in thr_lock() for other to complete.
- Fixed that one can run maria_chk on an automatcally recovered tables without warnings about too small transaction id
- Don't give warning that crashed table could not be repaired if repair was disabled (and thus not run)
- Fixed a error result from flush_key_cache() which caused a DBUG_ASSERT() when one was using concurrent reads on non transactional tables that was updated.

client/mysqldump.c:
  Add "" around error message to make it more readable
client/mysqltest.cc:
  Free environment variables
mysql-test/r/mysqldump.result:
  Updated results
mysql-test/r/openssl_1.result:
  Updated results
mysql-test/suite/maria/r/maria-recover.result:
  Updated results
mysql-test/suite/maria/r/maria3.result:
  Updated results
mysql-test/suite/maria/t/maria3.test:
  Added more test of temporary tables
storage/maria/ha_maria.cc:
  Changed default recovery mode from OFF to NORMAL to get automatic repair of not properly closed tables.
  Start transaction in ma_block_get_status() instead of in ha_maria::external_lock().
  - This fixes a rase condition when two threads calls external lock and thr_lock() in different order. When this happend the transaction that called external lock first and thr_lock() last did not see see the rows from the other transaction, even if if it had to wait in thr_lock() for other to complete.
  Store latest transaction id in controll file if recovery was done.
  - This allows one to run maria_chk on an automatcally recovered tables without warnings about too small transaction id
storage/maria/ha_maria.h:
  Don't give warning that crashed table could not be repaired if repair was disabled (and thus not run)
storage/maria/ma_blockrec.h:
  Added new function "_ma_block_get_status_no_versioning()"
storage/maria/ma_init.c:
  Added hook to create trn in ma_block_get_status() if we are using MariaDB
storage/maria/ma_open.c:
  Ensure we call _ma_block_get_status_no_versioning() for transactional tables without versioning (like tables with fulltext)
storage/maria/ma_pagecache.c:
  Allow one to flush blocks that are pinned for read.
  This fixed a error result from flush_key_cache() which caused a DBUG_ASSERT() when one was using concurrent reads on non transactional tables that was updated.
storage/maria/ma_recovery.c:
  Set maria_recovery_changed_data to 1 if recover changed something.
  Set max_trid_in_control_file to max found trn if we found a bigger trn.
  The allows will ensure that the control file is up to date after recovery which allows one to run maria_chk on the tables without warnings about too big trn
storage/maria/ma_state.c:
  Call maria_create_trn_hook() in _ma_setup_live_state() instead of ha_maria::external_lock()
  This ensures that 'state' and trn are in sync and thus fixes the race condition mentioned for ha_maria.cc
storage/maria/ma_static.c:
  Added maria_create_trn_hook() and maria_recovery_changed_data
storage/maria/maria_def.h:
  Added MARIA_HANDLER->external_ptr, which is used to hold MariaDB thd.
  Added some new external variables
  Removed reference to non existing function: maria_concurrent_inserts()
2010-06-14 01:13:32 +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
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
Magne Mahre
68b5c12d76 WL#5182 Remove more deprecated 4.1/5.0 features
WL#5154 was a task for formally deprecating and removing items that
were mentioned in the manual as having been deprecated since MySQL
4.1 or 5.0, but that had never been removed.

Since WL#5154 was created, examination of mysqld.cc, mysql.cc, and
mysqldump.c reveals additional deprecations not mentioned in the
manual. (In some cases, the items are simply not mentioned in the
5.1+ manuals.)

This is a follow-on task to deprecate and remove these additional
items.

The deprecation happened in MySQL 5.1, and the options/variables
are now removed from the code.



client/mysql.cc:
  --no-tee is now removed
client/mysqldump.c:
  --all is now removed
  -a now points to --create-options
sql/mysqld.cc:
  delay-key-write-for-all-tables is removed
  --enable-locking is removed
  --log-update is removed
  --skip-locking is removed
  --skip-symlink is removed
  --sql-bin-update-same is removed
  --warnings is removed
  --record-buffer is removed
2010-02-17 13:15:07 +01:00
Magne Mahre
efaf2ee253 WL#5182 Remove more deprecated 4.1/5.0 features
WL#5154 was a task for formally deprecating and removing items that
were mentioned in the manual as having been deprecated since MySQL
4.1 or 5.0, but that had never been removed.

Since WL#5154 was created, examination of mysqld.cc, mysql.cc, and
mysqldump.c reveals additional deprecations not mentioned in the
manual. (In some cases, the items are simply not mentioned in the
5.1+ manuals.)

This is a follow-on task to deprecate and remove these additional
items.

The deprecation happened in MySQL 5.1, and the options/variables
are now removed from the code.
2010-02-17 13:15:07 +01:00
Magne Mahre
7178879c80 WL#5154 Remove deprecated 4.1 features
A set of program options and variables was deprecated in
MySQL 5.1, and is hereby removed.



client/mysql.cc:
  --no-auto-rehash (-A)  is no longer deprecated
  --no-named-commands (-g) is now removed
  --skip-line-numbers (-L) is no longer deprecated
  --set-variable (-O) is now removed
  --no-pager is now removed
client/mysqlbinlog.cc:
  --position is now removed (use --start-position)
  -j is now equivalent with --start-position
client/mysqldump.c:
  --first-slave is now removed
  --no-set-names (-N) is now removed
  --set-variable (-O) is now removed
mysql-test/include/default_mysqld.cnf:
  default-character-set is removed as an option
  character-set-server is equivalent.
mysql-test/t/bug47671-master.opt:
  default-character-set option is removed
  character-set-server is equivalent
mysql-test/t/ctype_latin1_de-master.opt:
  default-character-set option is removed
  character-set-server is equivalent
mysql-test/t/ctype_ucs2_def-master.opt:
  default-collation is removed
  collation-server is equicalent
scripts/mysqld_multi.sh:
  --config-file has been superseded by
  --defaults-extra-file
sql/mysql_priv.h:
  Removed the version number in the deprecation
  warning text, as decided by ServerPT.
sql/mysqld.cc:
  --default-character-set (-C) is removed
  --default-collation is removed
  --log-long-format (-0) is removed
  --safe-show-database is removed
  --set-variable (-O) is removed
sql/sql_yacc.yy:
  The FRAC_SECOND keyword is removed
sql/sys_vars.cc:
  The sql_log_update system variable is removed
2010-02-17 10:18:17 +01:00
Magne Mahre
1f7f620f30 WL#5154 Remove deprecated 4.1 features
A set of program options and variables was deprecated in
MySQL 5.1, and is hereby removed.
2010-02-17 10:18:17 +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
Alexander Nozdrin
2b0f6b5ace Manual merge from mysql-trunk-merge.
Conflicts:
  - mysql-test/suite/rpl/r/rpl_binlog_grant.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - mysql-test/suite/rpl/t/rpl_binlog_grant.test
  - sql/sql_parse.cc
  - sql/sql_table.cc
  - sql/sql_test.cc
2010-01-31 01:06:50 +03:00
Alexander Nozdrin
ddc8765a9e Manual merge from mysql-trunk-merge.
Conflicts:
  - mysql-test/suite/rpl/r/rpl_binlog_grant.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - mysql-test/suite/rpl/t/rpl_binlog_grant.test
  - sql/sql_parse.cc
  - sql/sql_table.cc
  - sql/sql_test.cc
2010-01-31 01:06:50 +03:00
Alexander Nozdrin
0da16c7c2a Manual merge from mysql-5.1-bugteam.
Conflicts:
  - mysql-test/collections/default.experimental
  - mysql-test/suite/rpl/r/rpl_binlog_grant.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - mysql-test/suite/rpl/t/rpl_binlog_grant.test
  - mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
2010-01-30 22:13:36 +03:00
Alexander Nozdrin
85c54dddc7 Manual merge from mysql-5.1-bugteam.
Conflicts:
  - mysql-test/collections/default.experimental
  - mysql-test/suite/rpl/r/rpl_binlog_grant.result
  - mysql-test/suite/rpl/r/rpl_sp.result
  - mysql-test/suite/rpl/t/rpl_binlog_grant.test
  - mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
2010-01-30 22:13:36 +03:00
Staale Smedseng
18761a9223 Bug #49223 Change help description for mysqldump
--extended-insert

Help message changed to the same as in the 5.1 online 
documentation.
2010-01-27 16:13:39 +01:00
Staale Smedseng
7d5bb84a9a Bug #49223 Change help description for mysqldump
--extended-insert

Help message changed to the same as in the 5.1 online 
documentation.
2010-01-27 16:13:39 +01:00
Magne Mahre
35c6bb89e6 WL#5182 Remove more deprecated 4.1/5.0 features
WL#5182 is a follow-up to WL#5154, deprecating a few more options
and system variables.


client/client_priv.h:
  The warning message has been changed to not include
  a specific version number in the text.
client/mysql.cc:
  --no-tee is deprecated
client/mysqldump.c:
  --all is deprecated
  -a now points to create-options
mysql-test/r/mysqlbinlog.result:
  Warning text changed
mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result:
  Warning text changed
sql/mysql_priv.h:
  The warning message has been changed to not include
  a specific version number in the text.
sql/mysqld.cc:
  --use-symbolic-links is deprecated
  -s now points to --symbolic-links
  --warnings is deprecated
  -W now points to --log-warnings
          
  myisam_max_extra_sort_file_size is deprecated
  record_buffer is deprecated
          
  --log-update is deprecated
  --sql-bin-update-same is deprecated
  --skip-locking is deprecated
  --skip-symlink is deprecated
  --enable-locking is deprecated
  --delay-key-write-for-all-tables is deprecated
2010-01-27 13:23:28 +01:00
Magne Mahre
e17fe14c81 WL#5182 Remove more deprecated 4.1/5.0 features
WL#5182 is a follow-up to WL#5154, deprecating a few more options
and system variables.
2010-01-27 13:23:28 +01: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
Alexander Nozdrin
0ae23cd69d Auto-merge from mysql-trunk-merge. 2009-12-24 10:56:13 +03:00
Alexander Nozdrin
7917f0852f Auto-merge from mysql-trunk-merge. 2009-12-24 10:56:13 +03:00
Alexey Kopytov
930a08784c Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

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/instance_map.cc
Contents conflict in server-tools/instance-manager/listener.cc
Contents conflict in server-tools/instance-manager/options.cc
Contents conflict in server-tools/instance-manager/user_map.cc
2009-12-23 16:42:05 +03:00
Alexey Kopytov
af74c3436f Manual merge of mysql-5.1-bugteam into mysql-trunk-merge.
Conflicts:

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/instance_map.cc
Contents conflict in server-tools/instance-manager/listener.cc
Contents conflict in server-tools/instance-manager/options.cc
Contents conflict in server-tools/instance-manager/user_map.cc
2009-12-23 16:42:05 +03: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
Davi Arnaut
61ae928898 Manual merge. 2009-12-18 16:44:24 -02:00
Davi Arnaut
26f1a8ead2 Manual merge. 2009-12-18 16:44:24 -02:00
Davi Arnaut
06a1df9181 Bug#48983: Bad strmake calls (length one too long)
The problem is a somewhat common misusage of the strmake function.
The strmake(dst, src, len) function writes at most /len/ bytes to
the string pointed to by src, not including the trailing null byte.
Hence, if /len/ is the exact length of the destination buffer, a
one byte buffer overflow can occur if the length of the source
string is equal to or greater than /len/.

client/mysqldump.c:
  Make room for the trailing null byte.
libmysql/libmysql.c:
  Add comment, there is enough room in the buffer.
  Increase buffer length, two strings are concatenated.
libmysqld/lib_sql.cc:
  Make room for the trailing null byte.
mysys/default.c:
  Make room for the trailing null bytes.
mysys/mf_pack.c:
  Make room for the trailing null byte.
server-tools/instance-manager/commands.cc:
  Copy only if overflow isn't possible in both cases.
server-tools/instance-manager/listener.cc:
  Make room for the trailing null byte.
sql/log.cc:
  Make room for the trailing null byte.
sql/sp_pcontext.h:
  Cosmetic fix.
sql/sql_acl.cc:
  MAX_HOSTNAME already specifies space for the trailing null byte.
sql/sql_parse.cc:
  Make room for the trailing null byte.
sql/sql_table.cc:
  Make room for the trailing null byte.
2009-12-17 15:58:38 -02:00
Davi Arnaut
b9380f0e76 Bug#48983: Bad strmake calls (length one too long)
The problem is a somewhat common misusage of the strmake function.
The strmake(dst, src, len) function writes at most /len/ bytes to
the string pointed to by src, not including the trailing null byte.
Hence, if /len/ is the exact length of the destination buffer, a
one byte buffer overflow can occur if the length of the source
string is equal to or greater than /len/.
2009-12-17 15:58:38 -02:00
Marc Alff
bea4ab9bb6 Merge mysql-next-mr (revno 2936) --> mysql-next-mr-marc 2009-12-11 01:58:13 -07:00
Marc Alff
edd5ff174c Merge mysql-next-mr (revno 2936) --> mysql-next-mr-marc 2009-12-11 01:58:13 -07:00
Marc Alff
c082955f06 WL#2360 Performance schema
Part III: mysys instrumentation
2009-12-09 20:19:51 -07:00
Marc Alff
e33a8b2a1a WL#2360 Performance schema
Part III: mysys instrumentation
2009-12-09 20:19:51 -07: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
Magne Mahre
a5ab2c30df BUG #8368 "mysqldump needs --slave-data option"
Added this option, named as "--dump-slave". The purpose of this option is to be
able to produce a dump from a slave used for making backups of the master. Originally,
dumping from the main master was fine, but as more data accumulated, the dump process
would take over 30 minutes, locking up the master database hence website for 30 minutes.
A slave dedicated to producing backups was the answer, but I needed a dump that could be

used to restore a slave instantly and in order to do that, it has to have three things 
contained in the dump:
  
  1. "STOP SLAVE;" at the beginning
  2. "CHANGE MASTER TO ...<the master - info from 'show slave status'>"
  3. "START SLAVE;" at the end
  
These options in this changeset contain this.
  
  --stop-slave adds "STOP SLAVE" to the beginning of the dump and "STOP SLAVE" 
  to the end of the dump.
  
  --include-host gives the user the option to have the host explicitely added
  to the "CHANGE MASTER TO ..." line.
  
  --dump-slave adds the "CHANGE MASTER ..." to the dump representing not the slave's
  master binlog info, but the slave's master's info from "SHOW SLAVE STATUS" 


client/client_priv.h:
  Added OPT_SLAVE_DATA to client_priv.h
client/mysqldump.c:
  * Added --dump-slave option (name per Brian)
  * Added --stop-slave to print "STOP SLAVE;" into the dump
  * Added --include-host option to include "MASTER_HOST=..." and "MASTER_PORT=..."
    to the dump since unlike --master-data, the host can't be assumed to be
    the local host
  * Added do_start_slave and do_stop_slave to stop the slave sql thread upon
    start of the dump process, and to start the slave sql upon finish of dump process -
    to keep the log information frozen during this time.
  * Added do_show_slave_status for obtaining slave information needed to compose 
    "CHANGE MASTER ..." output to the master of this slave.
  * Added necessary long options and defines required for new options
2009-11-04 14:31:03 +01:00
Magne Mahre
6eb797f973 BUG #8368 "mysqldump needs --slave-data option"
Added this option, named as "--dump-slave". The purpose of this option is to be
able to produce a dump from a slave used for making backups of the master. Originally,
dumping from the main master was fine, but as more data accumulated, the dump process
would take over 30 minutes, locking up the master database hence website for 30 minutes.
A slave dedicated to producing backups was the answer, but I needed a dump that could be

used to restore a slave instantly and in order to do that, it has to have three things 
contained in the dump:
  
  1. "STOP SLAVE;" at the beginning
  2. "CHANGE MASTER TO ...<the master - info from 'show slave status'>"
  3. "START SLAVE;" at the end
  
These options in this changeset contain this.
  
  --stop-slave adds "STOP SLAVE" to the beginning of the dump and "STOP SLAVE" 
  to the end of the dump.
  
  --include-host gives the user the option to have the host explicitely added
  to the "CHANGE MASTER TO ..." line.
  
  --dump-slave adds the "CHANGE MASTER ..." to the dump representing not the slave's
  master binlog info, but the slave's master's info from "SHOW SLAVE STATUS"
2009-11-04 14:31:03 +01:00
Magne Mahre
0dae88ca2a Bug#35224: mysqldump --help is very confusing
The presence of "--skip" parameters is obscure, when it should be
obvious from the text.
  
Now, for boolean options, when they're default to ON and the --skip
is more useful parameter, then tell the user of its existence.

Backported from 6.0-codebase, revid  2572.14.1
2009-11-03 10:22:22 +01:00
Magne Mahre
6e916e03bd Bug#35224: mysqldump --help is very confusing
The presence of "--skip" parameters is obscure, when it should be
obvious from the text.
  
Now, for boolean options, when they're default to ON and the --skip
is more useful parameter, then tell the user of its existence.

Backported from 6.0-codebase, revid  2572.14.1
2009-11-03 10:22:22 +01:00
Konstantin Osipov
9b41c7532d Backport of:
----------------------------------------------------------
revno: 2617.22.5
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-6.0-runtime
timestamp: Tue 2009-01-27 05:08:48 +0300
message:
  Remove non-prefixed use of HASH.
  Always use my_hash_init(), my_hash_inited(), my_hash_search(),
  my_hash_element(), my_hash_delete(), my_hash_free() rather
  than non-prefixed counterparts (hash_init(), etc).
  Remove the backward-compatible defines.
2009-10-14 20:37:38 +04:00
Konstantin Osipov
64dbe379d7 Backport of:
----------------------------------------------------------
revno: 2617.22.5
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-6.0-runtime
timestamp: Tue 2009-01-27 05:08:48 +0300
message:
  Remove non-prefixed use of HASH.
  Always use my_hash_init(), my_hash_inited(), my_hash_search(),
  my_hash_element(), my_hash_delete(), my_hash_free() rather
  than non-prefixed counterparts (hash_init(), etc).
  Remove the backward-compatible defines.
2009-10-14 20:37:38 +04: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
Alexander Nozdrin
63e5078825 A backport of a patch for Bug#35297.
Original revision in mysql-6.0-codebase is:

revno: 2617.31.14
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-6.0-runtime
timestamp: Sat 2009-03-28 11:42:55 +0300
message:
  Bug#35297 SHOW CREATE EVENT does not show the DEFINER:
  update test result after a merge from now.
2009-10-08 00:57:03 +04:00
Alexander Nozdrin
83177656d9 A backport of a patch for Bug#35297.
Original revision in mysql-6.0-codebase is:

revno: 2617.31.14
committer: Konstantin Osipov <kostja@sun.com>
branch nick: mysql-6.0-runtime
timestamp: Sat 2009-03-28 11:42:55 +0300
message:
  Bug#35297 SHOW CREATE EVENT does not show the DEFINER:
  update test result after a merge from now.
2009-10-08 00:57:03 +04:00
Guilhem Bichot
12e822039d Fix for BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL and TIMESTAMP":
DECIMAL and TIMESTAMP used to have NUM_FLAG, but NEWDECIMAL was forgotten.
It's correct that TIMESTAMP does not have the flag nowadays (manual will be updated, connectors
developers will be notified).

client/mysqldump.c:
  IS_NUM_FIELD(f) removed and replaced by its definition (f>flags & NUM_FLAG).
include/mysql.h:
  - IS_NUM_FIELD() is removed because name is too close to IS_NUM() and it is not used a lot
  - INTERNAL_NUM_FIELD() is removed:
    * it forgets to test NEWDECIMAL (when IS_NUM() was updated for NEWDECIMAL we forgot
    to update INTERNAL_NUM_FIELD()), that's why client didn't mark NEWDECIMAL with NUM_FLAG (a bug).
    * it has an obsolete test for length of the TIMESTAMP field: test became accidentally wrong when length
    of TIMESTAMP was changed to always be 19 (when the format was changed from YYYYMMDDhhmmss to
    YYYY-MM-DD hh:mm:ss), never 8 or 14 anymore. That obsolete test caused TIMESTAMP to lose NUM_FLAG,
    which was an accidental but good change (see below).
    * IS_NUM() should be used instead
  - IS_NUM(f) is changed: TIMESTAMP used to be parsable as a number without quotes (when it was formatted as
  "YYYYMMDDhhmmss"); but it is not anymore (now that it is "YYYY-MM-DD hh:mm:ss"), so it should not have NUM_FLAG
  (mysqldump needs to quote TIMESTAMP values), so IS_NUM() should return false for it.
libmysqld/lib_sql.cc:
  use IS_NUM() instead of INTERNAL_NUM_FIELD()
mysql-test/r/bigint.result:
  result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/metadata.result:
  result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/mysqldump.result:
  DECIMAL columns are not quoted anymore by mysqldump. Which is ok, the parser does not need '' for them
mysql-test/r/ps_2myisam.result:
  result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/ps_3innodb.result:
  result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/ps_4heap.result:
  result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/r/ps_5merge.result:
  result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/suite/ndb/r/ps_7ndb.result:
  result change: NEWDECIMAL fields now have NUM_FLAG (32768)
mysql-test/t/metadata.test:
  test for BUG#42980
sql-common/client.c:
  use IS_NUM() instead of INTERNAL_NUM_FIELD()
2009-09-30 12:25:50 +02:00
Guilhem Bichot
b3886f46da Fix for BUG#42980 "Client doesn't set NUM_FLAG for DECIMAL and TIMESTAMP":
DECIMAL and TIMESTAMP used to have NUM_FLAG, but NEWDECIMAL was forgotten.
It's correct that TIMESTAMP does not have the flag nowadays (manual will be updated, connectors
developers will be notified).
2009-09-30 12:25:50 +02:00
Davi Arnaut
169f7da04c Fix for a few assorted compiler warnings.
client/mysql.cc:
  Remove leading whitespace.
  Remove extra text after #else directive.
client/mysqldump.c:
  Function does not take a parameter.
mysys/array.c:
  buffer is a uchar pointer.
sql/item.cc:
  Assert if it should not happen.
storage/myisam/mi_check.c:
  Cast to expected type. This is probably a bug, but it is
  casted in a similar way in another part of the code.
storage/ndb/include/mgmapi/ndb_logevent.h:
  Apply fix from cluster team.
tests/mysql_client_test.c:
  Remove extraneous slash.
2009-08-28 12:06:59 -03:00
Davi Arnaut
a0e44ec1e8 Fix for a few assorted compiler warnings. 2009-08-28 12:06:59 -03:00
Gleb Shchepa
328754dea7 Additional post-commit fix (bug #30946): server version
in a conditional commentary at the new SELECT ... INTO
OUTFILE ... CHARACTER SET syntax has been updated to 5.1.38.
2009-08-04 00:22:28 +05:00
Gleb Shchepa
4e95179af9 Bug# 30946: mysqldump silently ignores --default-character-set
when used with --tab

1) New syntax: added CHARACTER SET clause to the
  SELECT ... INTO OUTFILE (to complement the same clause in
  LOAD DATA INFILE).
  mysqldump is updated to use this in --tab mode.

2) ESCAPED BY/ENCLOSED BY field parameters are documented as
   accepting CHAR argument, however SELECT .. INTO OUTFILE
   silently ignored rests of multisymbol arguments.
   For the symmetrical behavior with LOAD DATA INFILE the
   server has been modified to fail with the same error:

     ERROR 42000: Field separator argument is not what is
                  expected; check the manual

3) Current LOAD DATA INFILE recognizes field/line separators
   "as is" without converting from client charset to data
   file charset. So, it is supposed, that input file of
   LOAD DATA INFILE consists of data in one charset and
   separators in other charset. For the compatibility with
   that [buggy] behaviour SELECT INTO OUTFILE implementation
   has been saved "as is" too, but the new warning message
   has been added:

     Non-ASCII separator arguments are not fully supported

   This message warns on field/line separators that contain
   non-ASCII symbols.


client/mysqldump.c:
  mysqldump has been updated to call SELECT ... INTO OUTFILE
  statement with a charset from the --default-charset command
  line parameter.
mysql-test/r/mysqldump.result:
  Added test case for bug #30946.
mysql-test/r/outfile_loaddata.result:
  Added test case for bug #30946.
mysql-test/t/mysqldump.test:
  Added test case for bug #30946.
mysql-test/t/outfile_loaddata.test:
  Added test case for bug #30946.
sql/field.cc:
  String conversion code has been moved from check_string_copy_error()
  to convert_to_printable() for reuse.
sql/share/errmsg.txt:
  New WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED message has been added.
sql/sql_class.cc:
  The select_export::prepare() method has been modified to:
  
    1) raise the ER_WRONG_FIELD_TERMINATORS error on multisymbol
       ENCLOSED BY/ESCAPED BY field arguments like LOAD DATA INFILE;
  
    2) warn with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED
       message on non-ASCII field or line separators.
  
  The select_export::send_data() merhod has been modified to
  convert item data to output charset (see new SELECT INTO OUTFILE
  syntax). By default the BINARY charset is used for backward
  compatibility.
sql/sql_class.h:
  The select_export::write_cs field added to keep output
  charset.
sql/sql_load.cc:
  mysql_load has been modified to warn on non-ASCII field or
  line separators with a new WARN_NON_ASCII_SEPARATOR_NOT_IMPLEMENTED
  message.
sql/sql_string.cc:
  New global function has been added: convert_to_printable()
  (common code has been moved from check_string_copy_error()).
sql/sql_string.h:
  New String::is_ascii() method and new global convert_to_printable()
  function have been added.
sql/sql_yacc.yy:
  New syntax: added CHARACTER SET clause to the
  SELECT ... INTO OUTFILE (to complement the same clause in
  LOAD DATA INFILE). By default the BINARY charset is used for
  backward compatibility.
2009-07-31 22:14:52 +05:00
Jim Winstead
1286d0f3f9 Merge in bug fixes for client tools 2009-07-14 10:08:38 -07:00
Jim Winstead
62a4848d09 Merge bug fixes 2009-07-13 12:11:16 -07:00
Gleb Shchepa
b42ce44fbf Additional post-commit fix (bug #30946): server version
in a conditional commentary at the new SELECT ... INTO
OUTFILE ... CHARACTER SET syntax has been updated to 5.1.38.
2009-08-04 00:22:28 +05:00
Gleb Shchepa
e642140b18 Bug# 30946: mysqldump silently ignores --default-character-set
when used with --tab

1) New syntax: added CHARACTER SET clause to the
  SELECT ... INTO OUTFILE (to complement the same clause in
  LOAD DATA INFILE).
  mysqldump is updated to use this in --tab mode.

2) ESCAPED BY/ENCLOSED BY field parameters are documented as
   accepting CHAR argument, however SELECT .. INTO OUTFILE
   silently ignored rests of multisymbol arguments.
   For the symmetrical behavior with LOAD DATA INFILE the
   server has been modified to fail with the same error:

     ERROR 42000: Field separator argument is not what is
                  expected; check the manual

3) Current LOAD DATA INFILE recognizes field/line separators
   "as is" without converting from client charset to data
   file charset. So, it is supposed, that input file of
   LOAD DATA INFILE consists of data in one charset and
   separators in other charset. For the compatibility with
   that [buggy] behaviour SELECT INTO OUTFILE implementation
   has been saved "as is" too, but the new warning message
   has been added:

     Non-ASCII separator arguments are not fully supported

   This message warns on field/line separators that contain
   non-ASCII symbols.
2009-07-31 22:14:52 +05:00
Jim Winstead
bd0a44fba2 Merge in bug fixes for client tools 2009-07-14 10:08:38 -07:00
Jim Winstead
f9025ea331 Merge bug fixes 2009-07-13 12:11:16 -07:00
Georgi Kodinov
097c7b38c8 Bug #45287: phase 2 : 5.0 64 bit compilation warnings
Fixed various compilation warnings when compiling on a 
 64 bit windows.
2009-07-16 15:37:38 +03:00
Georgi Kodinov
bf6e255d8c Bug #45287: phase 2 : 5.0 64 bit compilation warnings
Fixed various compilation warnings when compiling on a 
 64 bit windows.
2009-07-16 15:37:38 +03:00
Georgi Kodinov
abfe915ac9 fixed compilation warnings on macosx 2009-07-07 16:11:46 +03:00
Georgi Kodinov
9161d0f815 fixed compilation warnings on macosx 2009-07-07 16:11:46 +03:00
Georgi Kodinov
9ceb37269d merged 5.0-bugteam -> 5.1-bugteam 2009-06-05 19:40:36 +03:00
Georgi Kodinov
845f968369 merged 5.0-bugteam -> 5.1-bugteam 2009-06-05 19:40:36 +03:00
Georgi Kodinov
07f33a21d7 Addendum to Bug #45286 : implement reviewer's remarks. 2009-06-05 19:23:44 +03:00
Georgi Kodinov
c6fdeff0c7 Addendum to Bug #45286 : implement reviewer's remarks. 2009-06-05 19:23:44 +03:00
Georgi Kodinov
898443572f Bug #45286: compilation warnings on mysql-5.0-bugteam on MacOSX
Merged the 5.0 fix to 5.1 and fixed the 5.1 specific warnings.
2009-06-05 16:44:38 +03:00
Georgi Kodinov
a66fd23980 Bug #45286: compilation warnings on mysql-5.0-bugteam on MacOSX
Merged the 5.0 fix to 5.1 and fixed the 5.1 specific warnings.
2009-06-05 16:44:38 +03:00
Georgi Kodinov
5fc05b9528 automerge 2009-06-05 15:30:57 +03:00
Georgi Kodinov
1a8eb91e06 automerge 2009-06-05 15:30:57 +03:00
Georgi Kodinov
22454390c0 Bug #45286: compilation warnings on mysql-5.0-bugteam on MacOSX
Fixed the 5.0-bugteam MacOSX warnings.

client/mysqldump.c:
  Bug #45286: typecasts
cmd-line-utils/readline/bind.c:
  Bug #45286: use variable of right type
cmd-line-utils/readline/display.c:
  Bug #45286: use variable of right type
dbug/user.r:
  Bug #45286: no warnings in generating man pages
strings/ctype.c:
  Bug #45286: typecasts
2009-06-05 15:05:26 +03:00
Georgi Kodinov
5ec61b304c Bug #45286: compilation warnings on mysql-5.0-bugteam on MacOSX
Fixed the 5.0-bugteam MacOSX warnings.
2009-06-05 15:05:26 +03:00
Alexander Nozdrin
744373ecc0 Fix compilation failures: get rid of C++ specifics in C-code. 2009-06-03 15:18:12 +04:00
Alexander Nozdrin
0f742616ce Fix compilation failures: get rid of C++ specifics in C-code. 2009-06-03 15:18:12 +04:00
Tatiana A. Nurnberg
7f50fc02c2 Bug#34861: mysqldump with --tab gives weird output for triggers.
mysqldump --tab still dumped triggers to stdout rather than to
individual tables.

We now append triggers to the .sql file for the corresponding
table.

--events and --routines correspond to a database rather than a
table and will still go to stdout with --tab unless redirected
with --result-file (-r).

client/mysqldump.c:
  Extend open_sql_file_for_table() so we can open-append.
  Change dump_triggers_for_table() so it will append its
  output to the table's .sql-file when --tab is used.
mysql-test/r/mysqldump.result:
  Show that when using --tab, triggers now end up in the .sql
  file with the corresponding table (after that table), while
  --routines and --events go to stdout or --result-file.
mysql-test/t/mysqldump.test:
  Show that when using --tab, triggers now end up in the .sql
  file with the corresponding table (after that table), while
  --routines and --events go to stdout or --result-file.
2009-05-27 15:16:21 +02:00
Tatiana A. Nurnberg
7eeff66cba Bug#34861: mysqldump with --tab gives weird output for triggers.
mysqldump --tab still dumped triggers to stdout rather than to
individual tables.

We now append triggers to the .sql file for the corresponding
table.

--events and --routines correspond to a database rather than a
table and will still go to stdout with --tab unless redirected
with --result-file (-r).
2009-05-27 15:16:21 +02:00
Jim Winstead
7117ee8ccc The output of mysqldump --tab for views included a DROP TABLE statement
without the IF EXISTS qualifier even though no temporary table is created
as for all-in-one dumps including views. (Bug #37377)
2009-05-18 12:52:51 -07:00
Jim Winstead
caba34a1b4 The output of mysqldump --tab for views included a DROP TABLE statement
without the IF EXISTS qualifier even though no temporary table is created
as for all-in-one dumps including views. (Bug #37377)
2009-05-18 12:52:51 -07:00
Jim Winstead
99794e8801 mysqldump would not dump the INFORMATION_SCHEMA even when it was explicitly
requested. (Bug #33762)
2009-05-12 10:38:14 -07:00
Jim Winstead
e3fa685917 mysqldump would not dump the INFORMATION_SCHEMA even when it was explicitly
requested. (Bug #33762)
2009-05-12 10:38:14 -07:00
Jim Winstead
038be08a1b Various command-line utilities, including mysqlbinlog and mysqldump, don't
handle the --skip-password option correctly. (Bug #28479)
2009-05-07 10:51:55 -07:00
Jim Winstead
6280e26c48 Various command-line utilities, including mysqlbinlog and mysqldump, don't
handle the --skip-password option correctly. (Bug #28479)
2009-05-07 10:51:55 -07:00
Jim Winstead
00916a44c7 Fix list of options enabled by mysqldump --compact (Bug #32408) 2009-04-28 11:23:21 -07:00
Jim Winstead
6510c77e93 Fix list of options enabled by mysqldump --compact (Bug #32408) 2009-04-28 11:23:21 -07:00
Ignacio Galarza
868db2f21d auto-merge 2009-03-19 09:59:10 -04:00
Ignacio Galarza
22b919cc50 auto-merge 2009-03-19 09:59:10 -04:00
Ignacio Galarza
e8c13e6a54 auto-merge 2009-03-19 09:58:56 -04:00
Ignacio Galarza
5d13d4f34e auto-merge 2009-03-19 09:58:56 -04:00
Ignacio Galarza
675c3ce2bb auto-merge 2009-03-19 09:44:58 -04:00
Ignacio Galarza
e82390130e auto-merge 2009-03-19 09:44:58 -04:00
Satya B
5c49e6ebb3 Merge 5.0-bugteam to 5.1-bugteam 2009-03-19 14:19:51 +05:30
Satya B
59cc98194c Merge 5.0-bugteam to 5.1-bugteam 2009-03-19 14:19:51 +05:30
Satya B
cad09dab8f Fix for BUG#21360 - mysqldump error on federated tables
When loading dump created by mysqldump tool an error is
thrown saying storage engine for the table doesn't have 
an option.
                        
mysqldump tries to re-insert the data into the federated
table which causes the error. Since the data is already
available on the remote server, mysqldump shouldn't try
to dump the data again for FEDERATED tables.
                        
As stated in the bug page, it can be considered similar
to the MERGE ENGINE with "view only" nature.
                        
Fixed by adding the "FEDERATED ENGINE" to the exception
list to ignore the data.

client/mysqldump.c:
  Fixed check_if_ignore_table() to ignore FEDERATED engine
  when dumping the table data.
mysql-test/r/federated.result:
  Result file for BUG#21360
mysql-test/t/federated.test:
  Testcase for BUG#21360
2009-03-19 11:36:37 +05:30
Satya B
4f333c876a Fix for BUG#21360 - mysqldump error on federated tables
When loading dump created by mysqldump tool an error is
thrown saying storage engine for the table doesn't have 
an option.
                        
mysqldump tries to re-insert the data into the federated
table which causes the error. Since the data is already
available on the remote server, mysqldump shouldn't try
to dump the data again for FEDERATED tables.
                        
As stated in the bug page, it can be considered similar
to the MERGE ENGINE with "view only" nature.
                        
Fixed by adding the "FEDERATED ENGINE" to the exception
list to ignore the data.
2009-03-19 11:36:37 +05:30
Ignacio Galarza
0d588edf61 auto-merge 2009-03-17 16:29:24 -04:00
Ignacio Galarza
428e28e00c auto-merge 2009-03-17 16:29:24 -04:00
Chad MILLER
5139538c9c Merge fix for bug 42635, which is no change for 5.1 except addition of
test and (slightly different than 5.0) results.
2009-03-12 11:39:40 -04:00
Chad MILLER
8744675faf Merge fix for bug 42635, which is no change for 5.1 except addition of
test and (slightly different than 5.0) results.
2009-03-12 11:39:40 -04:00
Chad MILLER
b5804db393 Merge from bugfix tree. 2009-03-10 12:53:43 -04:00
Chad MILLER
6b72857803 Merge from bugfix tree. 2009-03-10 12:53:43 -04:00
Chad MILLER
89a1db2bd2 Bug#42635: mysqldump includes views that were excluded using the \
--ignore-table option

mysqldump would correctly omit temporary tables for views, but would
incorrectly still emit all CREATE VIEW statements.

Backport a fix from 5.1, where we capture the names we want to emit
views for in one pass (the placeholder tables) and in the pass where
we actually emit the views, we don't emit a view if it wasn't in that
list.
2009-03-09 16:58:47 -04:00
Chad MILLER
0d9589a433 Bug#42635: mysqldump includes views that were excluded using the \
--ignore-table option

mysqldump would correctly omit temporary tables for views, but would
incorrectly still emit all CREATE VIEW statements.

Backport a fix from 5.1, where we capture the names we want to emit
views for in one pass (the placeholder tables) and in the pass where
we actually emit the views, we don't emit a view if it wasn't in that
list.
2009-03-09 16:58:47 -04:00
Chad MILLER
e0bc002576 Fix non-DBUG return. 2009-03-09 16:56:46 -04:00
Chad MILLER
0693a99cfd Fix non-DBUG return. 2009-03-09 16:56:46 -04:00
Tatiana A. Nurnberg
99d1cdcb11 manual merge 2009-02-19 18:22:28 +01:00
Tatiana A. Nurnberg
1d85ad238b manual merge 2009-02-19 18:22:28 +01:00
Ignacio Galarza
5b7347bda3 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-13 11:41:47 -05:00
Ignacio Galarza
2d9421c3bb Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-13 11:41:47 -05:00
Ignacio Galarza
54fbbf9591 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-10 17:47:54 -05:00
Ignacio Galarza
2b85c64d65 Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages.  This change focuses on the warnings 
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
2009-02-10 17:47:54 -05:00
Tatiana A. Nurnberg
0ad6e488a2 Bug#33550: mysqldump 4.0 compatibility broken
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.

In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.

client/mysqldump.c:
  in 3.23/4.0 compat mode, don't do charset magic,
  period. not in output, but not on the server,
  either!
mysql-test/r/mysqldump-max.result:
  character_set_client magic lives in version-conditional
  now (except in compat 3.23/4.0 mode, in which case we
  don't output any at all!).
mysql-test/r/mysqldump.result:
  character_set_client magic lives in version-conditional
  now (except in compat 3.23/4.0 mode, in which case we
  don't output any at all!).
mysql-test/r/openssl_1.result:
  character_set_client magic lives in version-conditional
  now (except in compat 3.23/4.0 mode, in which case we
  don't output any at all!).
mysql-test/t/mysqldump.test:
  character_set_client magic lives in version-conditional
  now (except in compat 3.23/4.0 mode, in which case we
  don't output any at all!).
2009-02-02 18:19:07 +01:00
Tatiana A. Nurnberg
5622d4261f Bug#33550: mysqldump 4.0 compatibility broken
mysqldump included character_set_client magic
that is unknown before 4.1 even when asked for
an appropriate compatibility mode.

In compatibility (3.23, 4.0) mode, we do not
output charset statements (not even in a
"comment conditional"), nor do we do magic on
the server, even if the server is sufficient
new (4.1+). Table-names will be output converted
to the charset requested by mysqldump; if such
a conversion is not possible (Ivrit -> Latin),
mysqldump will fail.
2009-02-02 18:19:07 +01:00
Build Team
e85fe79430 Added "Sun Microsystems, Inc." to copyright headers on files modified
since Oct 1st
2008-11-10 21:21:49 +01:00
Build Team
366adeab08 Added "Sun Microsystems, Inc." to copyright headers on files modified
since Oct 1st
2008-11-10 21:21:49 +01:00
Tatiana A. Nurnberg
d49ee1933f Bug#31434 mysqldump dumps view as table
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.

client/mysqldump.c:
  When creating a stand-in table, specify its type to
  avoid defaulting to a type with a column-number limit
  (like Inno). The type is always MyISAM as we know that
  to be available.
mysql-test/r/mysqldump-max.result:
  add test results for 31434
mysql-test/r/mysqldump.result:
  mysqldump sets engine-type (MyISAM) for stand-in tables
  for views now. Update test results.
mysql-test/t/mysqldump-max.test:
  Show that mysqldump's stand-in tables for views explicitly
  set engine-type to MyISAM to avoid falling back on an engine
  that might support fewer columns than the final view requires
  (here's lookin' at you, inno). Also show that this actually
  has the desired effect by dumping and reloading a view that
  has more columns than inno supports.
2008-09-11 08:14:19 +02:00
Tatiana A. Nurnberg
4b0ab1e0dc Bug#31434 mysqldump dumps view as table
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.
2008-09-11 08:14:19 +02:00
Tatiana A. Nurnberg
6e162ea9eb Bug#31434 mysqldump dumps view as table
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.

client/mysqldump.c:
  When creating a stand-in table, specify its type to
  avoid defaulting to a type with a column-number limit
  (like Inno). The type is always MyISAM as we know that
  to be available.
mysql-test/r/mysqldump.result:
  mysqldump sets engine-type (MyISAM) for stand-in tables
  for views now. Update test results.
2008-09-11 07:46:43 +02:00
Tatiana A. Nurnberg
743149bccf Bug#31434 mysqldump dumps view as table
mysqldump creates stand-in tables before dumping the actual view.
Those tables were of the default type; if the view had more columns
than that (a pathological case, arguably), loading the dump would
fail. We now make the temporary stand-ins MyISAM tables to prevent
this.
2008-09-11 07:46:43 +02:00
unknown
34efb0fdab Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug35157/my51-bug35157
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-build


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
2008-04-24 10:50:38 -04:00
cmiller@zippy.cornsilk.net
9fe5c36668 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug35157/my51-bug35157
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-build
2008-04-24 10:50:38 -04:00
unknown
77c7d6972d Bug#35157: mysqldump should use FLUSH TABLES NO_WRITE_TO_BINLOG \
when --master-data is used

When using the --master-data option with mysqldump, mysqldump uses 
a FLUSH TABLES command.  However, this statement got replicated to 
the slave(s), which caused the slave(s) to block unnecessarily while
the FLUSH tables command completed.

Now, if the master-data option is set to one of the two "on" modes,
then use the "LOCAL" qualifier to ensure that it's not replicated.


client/mysqldump.c:
  If master_data is set to one of the two modes, then insert "LOCAL"
  to the command to FLUSH TABLES so that the slaves aren't told to 
  flush also.
mysql-test/r/mysqldump.result:
  Output of mysqldump changed.
2008-04-14 17:43:08 -04:00
cmiller@zippy.cornsilk.net
13fa535b80 Bug#35157: mysqldump should use FLUSH TABLES NO_WRITE_TO_BINLOG \
when --master-data is used

When using the --master-data option with mysqldump, mysqldump uses 
a FLUSH TABLES command.  However, this statement got replicated to 
the slave(s), which caused the slave(s) to block unnecessarily while
the FLUSH tables command completed.

Now, if the master-data option is set to one of the two "on" modes,
then use the "LOCAL" qualifier to ensure that it's not replicated.
2008-04-14 17:43:08 -04:00
unknown
01a979e8b2 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
include/config-win.h:
  Manual merge between main 5.1 and 5.1 marvel.
mysql-test/r/change_user.result:
  Manual merge between main 5.1 and 5.1 marvel.
mysql-test/t/change_user.test:
  Manual merge between main 5.1 and 5.1 marvel.
sql/sql_plugin.cc:
  Manual merge between main 5.1 and 5.1 marvel.
2008-03-28 12:14:27 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
090d1396cf Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-03-28 12:14:27 +02:00
unknown
532da5ebc7 Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1


client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
scripts/mysql_config.sh:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/unireg.h:
  Auto merged
2008-03-14 14:41:08 +01:00
joerg@trift2.
e784898959 Merge trift2.:/MySQL/M51/mysql-5.1
into  trift2.:/MySQL/M51/push-5.1
2008-03-14 14:41:08 +01:00
unknown
ed86d34b6d Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0


client/mysqldump.c:
  Auto merged
2008-03-14 14:32:01 +01:00
joerg@trift2.
b399594a4a Merge trift2.:/MySQL/M50/mysql-5.0
into  trift2.:/MySQL/M50/push-5.0
2008-03-14 14:32:01 +01:00
unknown
6ef32fd0a9 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


client/mysqldump.c:
  Auto merged
include/my_global.h:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.h:
  Auto merged
mysys/my_create.c:
  SCCS merged
2008-03-13 23:35:52 +02:00
jani@a88-113-38-195.elisa-laajakaista.fi
74cbd71e94 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-03-13 23:35:52 +02:00
unknown
4baa2eb8fe Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug34192/my51-bug34192
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-build


client/mysqldump.c:
  Auto merged
2008-03-13 11:22:11 -04:00
cmiller@zippy.cornsilk.net
8c1ba819be Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug34192/my51-bug34192
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-build
2008-03-13 11:22:11 -04:00
unknown
f1e546acd4 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug34192/my50-bug34192
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug34192/my51-bug34192


client/mysqldump.c:
  manual merge
2008-03-13 10:10:31 -04:00
cmiller@zippy.cornsilk.net
e0af86743b Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug34192/my50-bug34192
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug34192/my51-bug34192
2008-03-13 10:10:31 -04:00
unknown
a54e3fa2c5 Bug#34192: mysqldump from mysql 5.0.51 silently fails on dumping \
databases from 4.0 server

mysqldump treated a failure to set the results charset as a severe
error.  

Now, don't try to set the charset for the SHOW CREATE TABLE statement,
if remote server's version is earlier than 4.1, which means it 
doesn't support changing charsets.


client/mysqldump.c:
  Don't set the charset for receiving results if the server doesn't 
  support it.
2008-03-12 17:03:50 -04:00
cmiller@zippy.cornsilk.net
ad3f51b54e Bug#34192: mysqldump from mysql 5.0.51 silently fails on dumping \
databases from 4.0 server

mysqldump treated a failure to set the results charset as a severe
error.  

Now, don't try to set the charset for the SHOW CREATE TABLE statement,
if remote server's version is earlier than 4.1, which means it 
doesn't support changing charsets.
2008-03-12 17:03:50 -04:00
unknown
d6df18dd33 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
configure.in:
  Auto merged
include/my_global.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/filesort.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/ndb/src/kernel/blocks/backup/Backup.hpp:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/func_time.result:
  Manual merge.
mysql-test/r/view.result:
  Manual merge.
mysql-test/t/view.test:
  Manual merge.
scripts/mysql_config.sh:
  Manual merge.
sql-common/client.c:
  Manual merge.
sql/sql_parse.cc:
  Manual merge.
2008-03-12 11:19:46 +03:00
kaa@kaamos.(none)
0a7052e4d3 Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-03-12 11:19:46 +03:00
unknown
0eed115a52 Merge magare.gmz:/home/kgeorge/mysql/work/B34909-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B34909-5.1-opt


client/mysqldump.c:
  Auto merged
2008-03-07 11:19:51 +02:00
gkodinov/kgeorge@magare.gmz
dbc3ef6c9f Merge magare.gmz:/home/kgeorge/mysql/work/B34909-5.0-opt
into  magare.gmz:/home/kgeorge/mysql/work/B34909-5.1-opt
2008-03-07 11:19:51 +02:00
unknown
99c0b5e10f Bug #34909: mysqldump returns a 0 status on error when using
--master-data

No error code was returned by mysqldump if it detects that binary
logging is not enabled on the server.
Fixed by returning error code.


client/mysqldump.c:
  Bug #34909: add error code
mysql-test/r/mysqldump-no-binlog.result:
  Bug #34909: test case
mysql-test/t/mysqldump-no-binlog-master.opt:
  Bug #34909: test case
mysql-test/t/mysqldump-no-binlog.test:
  Bug #34909: test case
2008-03-07 11:15:49 +02:00
gkodinov/kgeorge@magare.gmz
11cd97ed6b Bug #34909: mysqldump returns a 0 status on error when using
--master-data

No error code was returned by mysqldump if it detects that binary
logging is not enabled on the server.
Fixed by returning error code.
2008-03-07 11:15:49 +02:00
unknown
bfbea4f4b4 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel


BitKeeper/etc/ignore:
  auto-union
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
sql/handler.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
storage/myisam/myisamdef.h:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
sql/mysqld.cc:
  Manual merge with main 5.1 tree.
2008-02-27 16:46:32 +02:00
jani@hynda.mysql.fi
b806eea262 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2008-02-27 16:46:32 +02:00
unknown
85213f6235 Fix for server bug experienced in Maria (wrong "Truncated incorrect <var_name>
value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).


client/mysqldump.c:
  my_bool for C
client/mysqltest.c:
  my_bool for C
extra/replace.c:
  my_bool for C
include/my_getopt.h:
  my_bool for C
include/my_global.h:
  Prevent people from using bool in C, it causes real bugs.
include/my_sys.h:
  my_bool for C
include/my_time.h:
  my_bool for C
include/thr_lock.h:
  my_bool for C
libmysql/libmysql.c:
  my_bool for C
mysys/charset.c:
  my_bool for C
mysys/my_getopt.c:
  my_bool for C
mysys/queues.c:
  my_bool for C
mysys/thr_lock.c:
  my_bool for C
regex/reginit.c:
  my_bool for C
sql/set_var.cc:
  C functions use my_bool so we must use my_bool too.
sql/sql_plugin.cc:
  C functions use my_bool so we must use my_bool too.
  This fixes a real observed bug of Maria, because on some Mac OS X,
  sizeof(bool) is 1 in C and 4 in C++, so the bool* does wrong.
  Removing useless line.
storage/heap/hp_update.c:
  my_bool for C
storage/myisam/mi_check.c:
  my_bool for C
storage/myisam/mi_dynrec.c:
  my_bool for C
storage/myisam/mi_search.c:
  my_bool for C
storage/myisam/mi_update.c:
  my_bool for C
storage/myisam/mi_write.c:
  my_bool for C
storage/myisam/myisamdef.h:
  my_bool for C
storage/myisam/myisamlog.c:
  my_bool for C
storage/myisam/myisampack.c:
  my_bool for C
tests/mysql_client_test.c:
  my_bool for C
unittest/mysys/bitmap-t.c:
  my_bool for C
vio/viosslfactories.c:
  my_bool for C
2008-02-18 23:29:39 +01:00
guilhem@gbichot4.local
9e2b31b026 Fix for server bug experienced in Maria (wrong "Truncated incorrect <var_name>
value" error even though the value was correct): a C function in my_getopt.c
was taking bool* in parameter and was called from C++ sql_plugin.cc,
but on some Mac OS X sizeof(bool) is 1 in C and 4 in C++, giving funny
mismatches. Fixed, all other occurences of bool in C are removed, future
ones are blocked by a "C-bool-catcher" in my_global.h (use my_bool).
2008-02-18 23:29:39 +01:00
unknown
58753e5c11 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel


BitKeeper/etc/ignore:
  auto-union
client/mysqlcheck.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/Makefile.am:
  Auto merged
include/m_string.h:
  Auto merged
include/my_base.h:
  Auto merged
include/my_dbug.h:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
sql/gen_lex_hash.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/lex.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ft_nlq_search.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_check.c:
  Auto merged
storage/myisam/mi_open.c:
  Auto merged
storage/myisam/myisampack.c:
  Auto merged
storage/myisammrg/ha_myisammrg.cc:
  Auto merged
client/mysqlslap.c:
  Manual merge with main 5.1 tree.
2008-02-08 12:13:33 +01:00
jani@a88-113-38-195.elisa-laajakaista.fi
4f98f3e683 Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into  a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel
2008-02-08 12:13:33 +01:00
unknown
734c6286e9 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/misc/mysql/32350/51-32350


client/mysqldump.c:
  Auto merged
2007-12-17 06:55:47 +01:00
tnurnberg@white.intern.koehntopp.de
d611f84449 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into  mysql.com:/misc/mysql/32350/51-32350
2007-12-17 06:55:47 +01:00
unknown
309845de49 Merge mysql.com:/misc/mysql/32350/50-32350
into  mysql.com:/misc/mysql/32350/51-32350


client/mysqldump.c:
  Auto merged
2007-12-17 06:14:53 +01:00
tnurnberg@white.intern.koehntopp.de
a9cffb3e4d Merge mysql.com:/misc/mysql/32350/50-32350
into  mysql.com:/misc/mysql/32350/51-32350
2007-12-17 06:14:53 +01:00
unknown
8d495f5784 Merge mysql.com:/misc/mysql/32350/41-32350
into  mysql.com:/misc/mysql/32350/50-32350


client/mysqldump.c:
  Auto merged
2007-12-17 06:13:52 +01:00
tnurnberg@white.intern.koehntopp.de
c0f5a7cb69 Merge mysql.com:/misc/mysql/32350/41-32350
into  mysql.com:/misc/mysql/32350/50-32350
2007-12-17 06:13:52 +01:00
unknown
ef280203f5 Bug#32350: mysqldump should show more version information in output
show version of mysqldump, release of server et al., and version of
current server in mysqldumps.


client/mysqldump.c:
  show version of mysqldump, release of server et al., and version of
  current server in mysqldumps.
2007-12-17 06:13:26 +01:00
tnurnberg@mysql.com/white.intern.koehntopp.de
b52ac74d54 Bug#32350: mysqldump should show more version information in output
show version of mysqldump, release of server et al., and version of
current server in mysqldumps.
2007-12-17 06:13:26 +01:00
unknown
068b6e4222 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51-merge


client/mysqldump.c:
  Auto merged
include/my_base.h:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/innodb.result:
  Auto merged
mysql-test/r/ps.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_ssl.test:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/create.test:
  Auto merged
mysql-test/t/ps.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/records.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/ft_boolean_search.c:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
mysql-test/t/log_state.test:
  Manual merge fix-up
mysql-test/include/mix1.inc:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Manual merge
mysql-test/r/func_misc.result:
  Manual merge
mysql-test/r/innodb_mysql.result:
  Manual merge
mysql-test/r/key.result:
  Manual merge
mysql-test/r/log_state.result:
  Manual merge
mysql-test/suite/binlog/t/binlog_killed.test:
  Manual merge
mysql-test/t/ctype_ucs.test:
  Manual merge
mysql-test/t/func_misc.test:
  Manual merge
mysql-test/t/key.test:
  Manual merge
sql/item_strfunc.h:
  Manual merge
strings/ctype-simple.c:
  Manual merge
2007-12-05 12:33:36 -07:00
tsmith@ramayana.hindu.god
8fc0bfb6b6 Merge ramayana.hindu.god:/home/tsmith/m/bk/51
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51-merge
2007-12-05 12:33:36 -07:00
unknown
55a420e134 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50


client/mysqldump.c:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
myisam/ft_boolean_search.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/t/cast.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_cmpfunc.h:
  Auto merged
sql/item_timefunc.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/set_var.h:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
mysql-test/mysql-test-run.pl:
  Manual merge
mysql-test/r/ctype_ucs.result:
  Manual merge
mysql-test/r/func_misc.result:
  Manual merge
mysql-test/t/binlog_killed.test:
  Manual merge
mysql-test/t/ctype_ucs.test:
  Manual merge
mysql-test/t/func_misc.test:
  Manual merge
sql/item_strfunc.h:
  Manual merge
strings/ctype-simple.c:
  Manual merge
2007-12-04 20:58:21 -07:00
tsmith@ramayana.hindu.god
10cab933b2 Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.0
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/50
2007-12-04 20:58:21 -07:00
unknown
0ec0095de1 Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51


client/mysqldump.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-11-27 11:38:18 -07:00
tsmith@ramayana.hindu.god
b44d792324 Merge ramayana.hindu.god:/home/tsmith/m/bk/maint/50
into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
2007-11-27 11:38:18 -07:00
unknown
7a57359762 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel


BitKeeper/etc/ignore:
  auto-union
client/mysqldump.c:
  Auto merged
include/my_sys.h:
  Auto merged
libmysql/CMakeLists.txt:
  Auto merged
libmysql/Makefile.shared:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
storage/myisam/mi_dynrec.c:
  Auto merged
2007-11-26 11:27:01 +02:00
jani@hynda.mysql.fi
2e034c1e3b Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-11-26 11:27:01 +02:00
unknown
f97e4d319d BUG#27850 "mysqldump --single-transaction does not work if TRUNCATE/DROP/RENAME/ALTER":
this has already been closed by a note in the manual, now we
complete this by a note in "mysqldump --help"


client/mysqldump.c:
  mention, in "mysqldump --help", of limitations reported as BUG#27850
  "mysqldump --single-transaction does not work if TRUNCATE/DROP/RENAME/ALTER"
  The new text is inspired from what the "mysqldump" section of the
  manual now says about --single-transaction:
  http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html
2007-11-20 10:25:07 +01:00
guilhem@gbichot4.local
2bcf5b4e97 BUG#27850 "mysqldump --single-transaction does not work if TRUNCATE/DROP/RENAME/ALTER":
this has already been closed by a note in the manual, now we
complete this by a note in "mysqldump --help"
2007-11-20 10:25:07 +01:00
unknown
0eec2d63d5 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel


BitKeeper/etc/ignore:
  auto-union
client/mysql_upgrade.c:
  Auto merged
client/mysqlcheck.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqlimport.c:
  Auto merged
client/mysqlshow.c:
  Auto merged
client/mysqlslap.c:
  Auto merged
client/mysqltest.c:
  Auto merged
include/my_global.h:
  Auto merged
include/my_sys.h:
  Auto merged
mysys/mf_keycache.c:
  Auto merged
mysys/my_init.c:
  Auto merged
mysys/safemalloc.c:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/opt_range.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/unireg.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
storage/myisam/mi_write.c:
  Auto merged
sql/sql_yacc.yy:
  Merged with 5.1 main tree.
2007-11-08 13:23:08 +02:00
jani@hynda.mysql.fi
e8d8102a93 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-11-08 13:23:08 +02:00
unknown
2c6a5fd27e Bug#31113 mysqldump 5.1 can't handle a dash ("-") in database names
db name should be quoted. this code does communication with the server.
it's always ok to quote names in this case.


client/mysqldump.c:
  db name should be quoted. this code does communication with the server.
  it's always ok to quote names in this case.
mysql-test/r/mysqldump.result:
  test result
mysql-test/t/mysqldump.test:
  test case
2007-11-02 12:24:45 +04:00
gluh@mysql.com/eagle.(none)
b0e9fa31af Bug#31113 mysqldump 5.1 can't handle a dash ("-") in database names
db name should be quoted. this code does communication with the server.
it's always ok to quote names in this case.
2007-11-02 12:24:45 +04:00
unknown
95a8bb20fb Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt


client/client_priv.h:
  Auto merged
client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/information_schema.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/information_schema.test:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_func.h:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
storage/innobase/handler/ha_innodb.cc:
  Auto merged
storage/myisam/sort.c:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/query_cache.result:
  manual merge
mysql-test/include/mix1.inc:
  manual merge
mysql-test/r/innodb_mysql.result:
  manual merge
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/query_cache.test:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 19:08:21 +05:00
gluh@eagle.(none)
17acda6ca8 Merge mysql.com:/home/gluh/MySQL/Merge/5.1
into  mysql.com:/home/gluh/MySQL/Merge/5.1-opt
2007-10-23 19:08:21 +05:00
unknown
8479eb1db7 Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt


client/mysqldump.c:
  Auto merged
include/config-win.h:
  Auto merged
libmysql/libmysql.c:
  Auto merged
myisam/sort.c:
  Auto merged
mysql-test/r/func_sapdb.result:
  Auto merged
mysql-test/r/variables.result:
  Auto merged
mysql-test/t/variables.test:
  Auto merged
sql/field.cc:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/item_timefunc.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_acl.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
mysql-test/r/type_datetime.result:
  manual merge
mysql-test/r/type_decimal.result:
  manual merge
mysql-test/t/type_datetime.test:
  manual merge
mysql-test/t/type_decimal.test:
  manual merge
sql/item.cc:
  manual merge
2007-10-23 18:51:43 +05:00
gluh@eagle.(none)
237383f0fe Merge mysql.com:/home/gluh/MySQL/Merge/5.0
into  mysql.com:/home/gluh/MySQL/Merge/5.0-opt
2007-10-23 18:51:43 +05:00
unknown
f713c1ca87 Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  alf.(none):/src/bug28535/my51-bug28535


client/mysqldump.c:
  Auto merged
2007-10-08 17:46:14 -04:00
iggy@alf.(none)
dfe6c1772a Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  alf.(none):/src/bug28535/my51-bug28535
2007-10-08 17:46:14 -04:00
unknown
8dd586916c Bug#28535 mistake in mysqldump error message
- Fixed error message.


client/mysqldump.c:
  Bug#28535 mistake in mysqldump error message
  - Corrected parameter order.
2007-10-08 17:43:32 -04:00
iggy@alf.(none)
6a7947b8ab Bug#28535 mistake in mysqldump error message
- Fixed error message.
2007-10-08 17:43:32 -04:00
unknown
e06ab23ffb Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  sin.intern.azundris.com:/home/tnurnberg/30444/51-30444


client/mysqldump.c:
  Auto merged
2007-10-04 08:53:39 +02:00
tnurnberg@sin.intern.azundris.com
34d43d3b04 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  sin.intern.azundris.com:/home/tnurnberg/30444/51-30444
2007-10-04 08:53:39 +02:00
unknown
66fed4ae52 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/30444/50-30444


client/mysqldump.c:
  Auto merged
2007-10-04 08:42:36 +02:00
tnurnberg@sin.intern.azundris.com
c8a6f30a5b Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  sin.intern.azundris.com:/home/tnurnberg/30444/50-30444
2007-10-04 08:42:36 +02:00
unknown
814bc3e895 Merge sin.intern.azundris.com:/home/tnurnberg/30444/50-30444
into  sin.intern.azundris.com:/home/tnurnberg/30444/51-30444


client/mysqldump.c:
  Auto merged
2007-10-04 08:38:27 +02:00
tnurnberg@sin.intern.azundris.com
2686905392 Merge sin.intern.azundris.com:/home/tnurnberg/30444/50-30444
into  sin.intern.azundris.com:/home/tnurnberg/30444/51-30444
2007-10-04 08:38:27 +02:00
unknown
fd7d13540e Merge sin.intern.azundris.com:/home/tnurnberg/30444/41-30444
into  sin.intern.azundris.com:/home/tnurnberg/30444/50-30444


client/mysqldump.c:
  Auto merged
2007-10-04 08:32:43 +02:00
tnurnberg@sin.intern.azundris.com
fee111cd29 Merge sin.intern.azundris.com:/home/tnurnberg/30444/41-30444
into  sin.intern.azundris.com:/home/tnurnberg/30444/50-30444
2007-10-04 08:32:43 +02:00
unknown
3f4eaf57e9 Bug #30444: 5.0 mysqldump silently allows wrong backup to be taken against a 4.0 database
The combination of --single-transaction and --master-data requires
START TRANSACTION WITH CONSISTENT SNAPSHOT which is available from
mysqld 4.1 on. When trying this against an older server, print
diagnostic, then, if --force is not given, abort.

No test-case given since it would require a mysqld < 4.1.


client/mysqldump.c:
  Bug #30444: 5.0 mysqldump silently allows wrong backup to be taken against a 4.0 database
  
  The combination of --single-transaction and --master-data requires
  START TRANSACTION WITH CONSISTENT SNAPSHOT which is available from
  mysqld 4.1 on. When trying this against an older server, print
  diagnostic, then, if --force is not given, abort.
2007-10-04 08:27:03 +02:00
tnurnberg@sin.intern.azundris.com
c623e73e8f Bug #30444: 5.0 mysqldump silently allows wrong backup to be taken against a 4.0 database
The combination of --single-transaction and --master-data requires
START TRANSACTION WITH CONSISTENT SNAPSHOT which is available from
mysqld 4.1 on. When trying this against an older server, print
diagnostic, then, if --force is not given, abort.

No test-case given since it would require a mysqld < 4.1.
2007-10-04 08:27:03 +02:00
unknown
6356f16196 mysqldump.c:
Post-merge fix.


client/mysqldump.c:
  Post-merge fix.
2007-10-03 15:49:51 +05:00
gshchepa/uchum@gleb.loc
009d8b609e mysqldump.c:
Post-merge fix.
2007-10-03 15:49:51 +05:00
unknown
c1548d7442 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-31077
into  gleb.loc:/home/uchum/work/bk/5.1-opt


client/mysqldump.c:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
client/client_priv.h:
  Merge with 5.0-opt.
mysql-test/r/mysqldump.result:
  Merge with 5.0-opt.
2007-10-03 15:05:11 +05:00
gshchepa/uchum@gleb.loc
5184ff828c Merge gleb.loc:/home/uchum/work/bk/5.0-opt-31077
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-10-03 15:05:11 +05:00
unknown
853e4da88f mysqldump.c, mysqldump.test, mysqldump.result:
Bug #31077: post-commit fix.


client/mysqldump.c:
  Bug #31077: post-commit fix.
mysql-test/t/mysqldump.test:
  Bug #31077: post-commit fix.
mysql-test/r/mysqldump.result:
  Bug #31077: post-commit fix.
2007-10-03 02:50:38 +05:00
gshchepa/uchum@gleb.loc
c81751adba mysqldump.c, mysqldump.test, mysqldump.result:
Bug #31077: post-commit fix.
2007-10-03 02:50:38 +05:00
unknown
02bb72c735 Fixed bug #31077.
mysqldump adds the "-- Dump completed on YYYY-MM-DD hh:mm:ss" string
to the end of output if the --comments switch is on.
The only way to suppress this line is to use --skip-comments/--compact
switch.

New switch has been added to the mysqldump client command line:
--dump-date.

For the compatibility with previous releases, by default the --dump-date
is on.
The --dump-date switch forces mysqldump to add date to the
"-- Dump completed on ..." string at the end of output.
The --skip-dump-date switch supresses the output of date string
and uses short form of that commentary: "-- Dump completed".
--skip-comments or --compact switches disable the whole commentary
as usual.


client/client_priv.h:
  Fixed bug #31077.
  New OPT_DUMP_DATE option has been added to implement
  the mysqldump client --dump-date switch.
client/mysqldump.c:
  Fixed bug #31077.
  The opt_dump_date variable has been added to imlements
  the mysqldump cliemt --dump-date switch.
  By default this switch is on (for compatibility with previous
  releases).
  The --dump-date switch forces mysqldump to add date to the
  "-- Dump completed on ..." string at the end of output.
  The --skip-dump-date switch supresses the output of date string
  and uses short form of that commentary: "-- Dump completed".
  --skip-comments or --compact switches disable the whole commentary
  as usual.
mysql-test/t/mysqldump.test:
  Added test case for bug #31077.
mysql-test/r/mysqldump.result:
  Added test case for bug #31077.
2007-10-01 20:35:51 +05:00
gshchepa/uchum@gleb.loc
5fc81ee88e Fixed bug #31077.
mysqldump adds the "-- Dump completed on YYYY-MM-DD hh:mm:ss" string
to the end of output if the --comments switch is on.
The only way to suppress this line is to use --skip-comments/--compact
switch.

New switch has been added to the mysqldump client command line:
--dump-date.

For the compatibility with previous releases, by default the --dump-date
is on.
The --dump-date switch forces mysqldump to add date to the
"-- Dump completed on ..." string at the end of output.
The --skip-dump-date switch supresses the output of date string
and uses short form of that commentary: "-- Dump completed".
--skip-comments or --compact switches disable the whole commentary
as usual.
2007-10-01 20:35:51 +05:00
unknown
5b79e3c8d2 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1


client/mysql_upgrade.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqlslap.c:
  Auto merged
client/mysqltest.c:
  Auto merged
sql/handler.cc:
  Auto merged
2007-10-01 15:33:21 +03:00
monty@narttu.mysql.fi
5dcb64882d Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2007-10-01 15:33:21 +03:00
unknown
0741a4d1b0 Removed extra spaces
Added extra debug


client/mysql_upgrade.c:
  Removed extra space
client/mysqlcheck.c:
  Removed extra space
client/mysqldump.c:
  Removed extra space
client/mysqlimport.c:
  Removed extra space
client/mysqlshow.c:
  Removed extra space
client/mysqlslap.c:
  Removed extra space
client/mysqltest.c:
  Removed extra space
sql/handler.cc:
  Added extra debug
2007-10-01 15:32:07 +03:00
monty@mysql.com/narttu.mysql.fi
315acca125 Removed extra spaces
Added extra debug
2007-10-01 15:32:07 +03:00
unknown
139b563ec4 Merge sita.local:/Users/tsmith/m/bk/50
into  sita.local:/Users/tsmith/m/bk/maint/50


client/mysql.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
sql/sql_select.cc:
  Auto merged
2007-09-24 11:33:27 +02:00
tsmith@sita.local
5aba321046 Merge sita.local:/Users/tsmith/m/bk/50
into  sita.local:/Users/tsmith/m/bk/maint/50
2007-09-24 11:33:27 +02:00
unknown
613f7ff3b5 Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/tnurnberg/15327/50-15327


client/mysql.cc:
  Auto merged
client/mysql_upgrade.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqltest.c:
  Auto merged
configure.in:
  Auto merged
libmysql/libmysql.c:
  Auto merged
mysql-test/Makefile.am:
  Auto merged
scripts/Makefile.am:
  Auto merged
sql/mysqld.cc:
  Auto merged
tests/mysql_client_test.c:
  Auto merged
2007-09-15 04:45:20 +02:00
tnurnberg@sin.intern.azundris.com
7451aaf48c Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/tnurnberg/15327/50-15327
2007-09-15 04:45:20 +02:00
unknown
ee7f125d5f Bug #15327: configure: --with-tcp-port option being partially ignored
make sure that if builder configured with a non-standard (!= 3306)
default TCP port that value actually gets used throughout. if they
didn't configure a value, assume "use a sensible default", which
will be read from /etc/services or, failing that, from the factory
default. That makes the order of preference
- command-line option
- my.cnf, where applicable
- $MYSQL_TCP_PORT environment variable
- /etc/services (unless configured --with-tcp-port)
- default port (--with-tcp-port=... or factory default)


client/mysql.cc:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysql_upgrade.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqladmin.cc:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqlbinlog.cc:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqlcheck.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqldump.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqlimport.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqlmanagerc.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
configure.in:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  If MYSQL_TCP_PORT defaulted in configure (factory default 3306
  at the time of this writing), set MYSQL_TCP_PORT to factory
  default, then clear factory default after. That way, we lose no
  information, and we can distinguish between "defaulted" and the
  pathological case "builder specifically configured a port that
  coincides with factory default." This can in theory happen if
  builder configures and builds several servers from a script
  (--with-tcp-port=3306, --with-tcp-port=3316, --with-tcp-port=3326).
  Not all that probable, but much preferable to having more "magic"
  happen in the server when we can solve this without any guesswork.
client/mysqlshow.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
client/mysqltest.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
include/mysql_version.h.in:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make factory default for TCP port available as MYSQL_PORT_DEFAULT
  if build-time configured with a different default.  (0 if unchanged)
libmysql/libmysql.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  initialize default tcp port for client, like so:
  - if user configured --with-tcp-port, use that value as default
  - otherwise assume "use a good default": search mysqld/tcp in
    /etc/services; if that doesn't exist, use factory default (3306)
  - environment variable MYSQL_TCP_PORT overrides this default
  - command-line option overrides all of the above
mysql-test/Makefile.am:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make factory default for TCP port available as MYSQL_TCP_PORT_DEFAULT
  if build-time configured with a different default.  (0 if unchanged)
mysql-test/mysql-test-run-shell.sh:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  set up MYSQL_TCP_PORT if not already set in environment:
  - if user configured --with-tcp-port, use that value as default
  - otherwise assume "use a good default": search mysqld/tcp in
    /etc/services; if that doesn't exist, use factory default (3306)
netware/mysql_test_run.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
netware/mysqld_safe.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
scripts/Makefile.am:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make factory default for TCP port available as MYSQL_TCP_PORT_DEFAULT
  if build-time configured with a different default.  (0 if unchanged)
scripts/mysql_config.sh:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  set up MYSQL_TCP_PORT if not already set in environment:
  - if user configured --with-tcp-port, use that value as default
  - otherwise assume "use a good default": search mysqld/tcp in
    /etc/services; if that doesn't exist, use factory default (3306)
scripts/mysql_fix_privilege_tables.sh:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  clarifying notice only
scripts/mysqld_safe-watch.sh:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
server-tools/instance-manager/priv.h:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
sql/mysqld.cc:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  if builder specifically requested a default port, use that
  (even if it coincides with our factory default).
  only if they didn't do we check /etc/services (and, failing
  on that, fall back to the factory default of 3306).
  either default can be overridden by the environment variable
  MYSQL_TCP_PORT, which in turn can be overridden with command
  line options.
tests/mysql_client_test.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
tests/ssl_test.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  account for non-standard default port-no. configured at build-time
tests/thread_test.c:
  Bug #15327: configure: --with-tcp-port option being partially ignored
  
  make help on --port a little more clear
2007-09-13 16:19:46 +02:00
tnurnberg@mysql.com/sin.intern.azundris.com
3c6ca8d6ed Bug #15327: configure: --with-tcp-port option being partially ignored
make sure that if builder configured with a non-standard (!= 3306)
default TCP port that value actually gets used throughout. if they
didn't configure a value, assume "use a sensible default", which
will be read from /etc/services or, failing that, from the factory
default. That makes the order of preference
- command-line option
- my.cnf, where applicable
- $MYSQL_TCP_PORT environment variable
- /etc/services (unless configured --with-tcp-port)
- default port (--with-tcp-port=... or factory default)
2007-09-13 16:19:46 +02:00
unknown
a3dc9569e9 Merge gleb.loc:/home/uchum/work/bk/5.1-opt-29938
into  gleb.loc:/home/uchum/work/bk/5.1-opt


client/mysqldump.c:
  Auto merged
2007-09-05 11:43:40 +05:00
gshchepa/uchum@gleb.loc
582b69686c Merge gleb.loc:/home/uchum/work/bk/5.1-opt-29938
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-09-05 11:43:40 +05:00
unknown
6a71b067b0 Fixed bug #29938.
mysqldump --skip-events --all-databases dumped data of the mysqld.event table,
and during the restoration from this dump events were created in spite
of the --skip-events option.

The mysqldump client has been modified to ignore mysql.event table data
in case of --skip-events options.


client/mysqldump.c:
  Fixed bug #29938.
  The dump_table function has been modified to skip dumping of
  the mysql.event table data in case of the --skip-event mysqldump
  client option.
mysql-test/t/mysqldump.test:
  Updated test case for bug #29938.
mysql-test/r/mysqldump.result:
  Updated test case for bug #29938.
2007-09-05 11:35:29 +05:00
gshchepa/uchum@gleb.loc
adfbea368d Fixed bug #29938.
mysqldump --skip-events --all-databases dumped data of the mysqld.event table,
and during the restoration from this dump events were created in spite
of the --skip-events option.

The mysqldump client has been modified to ignore mysql.event table data
in case of --skip-events options.
2007-09-05 11:35:29 +05:00
unknown
035e516af1 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30126
into  gleb.loc:/home/uchum/work/bk/5.1-opt


client/mysqldump.c:
  Auto merged
sql/sql_parse.cc:
  SCCS merged
2007-08-31 17:50:52 +05:00
gshchepa/uchum@gleb.loc
a6d644e7b5 Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30126
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-08-31 17:50:52 +05:00
unknown
ff149b713c Fixed bug #30126.
When dumping database from a 4.x server, the mysqldump client
inserted a delimiter sign inside special commentaries of the form:
  /*!... CREATE DATABASE IF NOT EXISTS ... ;*/
During restoration that dump file was splitten by delimiter signs on
the client side, and the rest of some commentary strings was prepended
to following statements.

The 4x_server_emul test case option has been added for use with the
DBUG_EXECUTE_IF debugging macro. This option affects debug server
builds only to emulate particular behavior of a 4.x server for
the mysqldump client testing. Non-debugging builds are not affected.


mysql-test/r/mysqldump-compat.result:
  Added test case for bug #30126.
mysql-test/t/mysqldump-compat.opt:
  Added test case for bug #30126.
mysql-test/t/mysqldump-compat.test:
  Added test case for bug #30126.
sql/sql_parse.cc:
  Fixed bug #30126.
  The mysqldump client uses the "SHOW CREATE DATABASE" query to
  obtain the "CREATE DATABASE" statement from that database.
  The 4.x server doesn't recognise that query, and mysqldump
  forms the "CREATE DATABASE" statement from scratch.
  That statement was formed incorrectly.
  
  To enforce the mysqldump client to create that statement from
  scratch, debugging code has been added to the mysql_execute_command
  function: in tcase of the --loose-debug=d,4x_server_emul option,
  the server returns parse error to client to emulate old behaviour.
  
  The 4x_server_emul test case option has been added for use with the
  DBUG_EXECUTE_IF debugging macro. This option affects debug server
  builds only to emulate particular behavior of a 4.x server for
  the mysqldump client testing. Non-debugging builds are not affected.
client/mysqldump.c:
  Fixed bug #30126.
  The init_dumping_tables function has been modified to output semicolon
  outside of commentaries.
2007-08-31 16:59:07 +05:00
gshchepa/uchum@gleb.loc
3e49bbd8e7 Fixed bug #30126.
When dumping database from a 4.x server, the mysqldump client
inserted a delimiter sign inside special commentaries of the form:
  /*!... CREATE DATABASE IF NOT EXISTS ... ;*/
During restoration that dump file was splitten by delimiter signs on
the client side, and the rest of some commentary strings was prepended
to following statements.

The 4x_server_emul test case option has been added for use with the
DBUG_EXECUTE_IF debugging macro. This option affects debug server
builds only to emulate particular behavior of a 4.x server for
the mysqldump client testing. Non-debugging builds are not affected.
2007-08-31 16:59:07 +05:00
unknown
b3dd7d5ca6 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel


client/mysqldump.c:
  Auto merged
sql/event_db_repository.cc:
  Auto merged
sql/event_queue.cc:
  Auto merged
sql/field.cc:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_subselect.cc:
  Auto merged
sql/log_event.h:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_db.cc:
  Auto merged
sql/sql_handler.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
sql/sql_yacc.yy:
  Manual merge with 5.1 main tree.
2007-08-22 17:29:38 +03:00
jani@hynda.mysql.fi
6519de0469 Merge hynda.mysql.fi:/home/my/mysql-5.1-main
into  hynda.mysql.fi:/home/my/mysql-5.1-marvel
2007-08-22 17:29:38 +03:00
unknown
c514373cf3 Fix doxygen warnings.
client/mysqldump.c:
  Fix doxygen warnings
mysys/test_charset.c:
  Fix doxygen warnings
sql/event_db_repository.cc:
  Fix doxygen warnings
sql/events.cc:
  Fix doxygen warnings
sql/events.h:
  Fix doxygen warnings
sql/item_create.cc:
  Fix doxygen warnings, style.
sql/item_create.h:
  Fix coding style.
sql/item_subselect.cc:
  Fix doxygen warnings
sql/lock.cc:
  Fix doxygen warnings
sql/sp.cc:
  Fix doxygen warnings
sql/sp_head.h:
  Fix doxygen warnings
sql/sql_analyse.cc:
  Fix doxygen warnings
sql/sql_analyse.h:
  Fix doxygen warnings
sql/sql_base.cc:
  Fix doxygen warnings
sql/sql_db.cc:
  Fix doxygen warnings
sql/sql_lex.cc:
  Fix doxygen warnings
sql/sql_lex.h:
  Fix doxygen warnings
sql/sql_parse.cc:
  Fix doxygen warnings
sql/sql_plugin.cc:
  Fix doxygen warnings
sql/sql_prepare.cc:
  Fix doxygen warnings
sql/sql_show.cc:
  Fix doxygen warnings
sql/sql_trigger.cc:
  Fix doxygen warnings
sql/sql_update.cc:
  Fix doxygen warnings
sql/table.h:
  Fix doxygen warnings
2007-08-15 17:43:08 +04:00
kostja@bodhi.(none)
91fe15bb9d Fix doxygen warnings. 2007-08-15 17:43:08 +04:00
unknown
c5f0611fad Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1


configure.in:
  Auto merged
client/mysql.cc:
  Auto merged
include/m_ctype.h:
  Auto merged
sql/field.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/handler.h:
  Auto merged
sql/item.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/item_strfunc.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sp_head.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_delete.cc:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_lex.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_string.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
sql/table.cc:
  Auto merged
sql/table.h:
  Auto merged
storage/myisam/mi_rkey.c:
  Auto merged
client/mysqldump.c:
  Manual merge (trivial)
scripts/mysql_install_db.sh:
  Complex merge (parital rewrite of new code)
sql/sql_show.cc:
  Manual merge
tests/mysql_client_test.c:
  then
    if ! test -x "$print_defaults"
    then
      missing_in_basedir my_print_defaults
      exit 1
    fi
  else
2007-08-14 00:22:34 +03:00
monty@narttu.mysql.fi
9d609a59fd Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2007-08-14 00:22:34 +03:00
unknown
09a53f28a7 Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db

I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read()      -> index_read_map()
index_read_idx()  -> index_read_idx_map()
index_read_last() -> index_read_last_map()


BUILD/compile-solaris-sparc-forte:
  Updated script to current Solaris installations
  Now we compile by default for 64 bits
client/mysql.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
client/mysql_upgrade.c:
  Fixed compiler warning (on Forte)
client/mysqladmin.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
client/mysqlcheck.c:
  Fixed compiler warning (on Forte)
client/mysqldump.c:
  Fixed compiler warning (on Forte)
client/mysqlslap.c:
  Fixed compiler warning (on Forte)
client/mysqltest.c:
  Fixed compiler warning (on Forte)
client/sql_string.cc:
  Avoid compiler warnings when using C function pointers in C++
configure.in:
  Added detection of mtmalloc and ieeefp.h
extra/replace.c:
  Fixed compiler warning (on Forte)
include/m_ctype.h:
  Added some typedef's to make it easy to use C function pointers in C++
include/my_sys.h:
  Added my_file_total_opened (counter for calls to my_open())
include/myisam.h:
  Fixed compiler warning (on Forte)
libmysql/libmysql.c:
  Fixed compiler warning (on Forte) by adding casts and change types
libmysql/manager.c:
  Fixed compiler warning (on Forte) by adding casts and change types
mysql-test/r/ctype_cp932_binlog_stm.result:
  Updated positions
  (Needed because we didn't before correctly restore collation_database after running stored procedure
mysys/my_fopen.c:
  Count number of opened files
mysys/my_open.c:
  Count number of opened files
mysys/my_static.c:
  Count number of opened files
mysys/thr_alarm.c:
  Optimization to do less alarm() and pthread_sigmask() calls.
  Idea is to remember time for next pending alarm and not reschedule a new alarm if it's after the current one.
  Before we only did this if there was other pending alarms.
  We don't have to use pthread_sigmask() in case of 'USE_ONE_SIGNAL_HAND' as the alarm()
  signal will be blocked for the calling thread anyway and no other thread will have the alarm() signal enabled to call process_alarm()
regex/regcomp.c:
  Fixed compiler warning (on Forte) by adding casts and change types
scripts/mysql_install_db.sh:
  Added option --source-install to allow one to create a mysql database from the source tree without installing MySQL
  Don't give (unnecessary) warnings
server-tools/instance-manager/angel.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
server-tools/instance-manager/thread_registry.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/event_db_repository.cc:
  index_read() -> index_read_map()
sql/event_queue.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/field.cc:
  Fixed compiler warnings about hidden fields
sql/ha_partition.cc:
  Fixed compiler warnings about hidden fields
  index_read() -> index_read_map()
sql/ha_partition.h:
  index_read() -> index_read_map()
sql/handler.cc:
  Added PAGE option to row types (to prepare for future)
  index_read() -> index_read_map()
sql/handler.h:
  Added ROW_TYPE_PAGE (for future)
  Added flag to signal if table was to be created transactionally
  I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
  index_read()      -> index_read_map()
  index_read_idx()  -> index_read_idx_map()
  index_read_last() -> index_read_last_map()
sql/item.cc:
  Fixed indentation
  Renamed local variable to avoid hiding class variable
sql/item_cmpfunc.cc:
  Renamed local variable to avoid hiding class variable
sql/item_cmpfunc.h:
  Removed not used variable
sql/item_func.cc:
  Renamed local variable to avoid hiding class variable
sql/item_strfunc.cc:
  Moved functions from Item_strfunc.cc
sql/item_strfunc.h:
  Move functions to item_strfunc.cc
  Use C function pointer type to avoid compiler warnings (with Forte)
sql/item_subselect.cc:
  index_read() -> index_read_map()
sql/item_xmlfunc.cc:
  Renamed local variable to avoid hiding class variable
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/key.cc:
  Fixed indentation
sql/log.cc:
  Renamed local variable to avoid hiding class variable
sql/log_event.cc:
  Removed call to my_time() when creating class instance of Log_event() as this may have static instances.
  (One can't call my_time() before my_init())
  index_read() -> index_read_map()
  Renamed local variable to avoid hiding class variable
sql/log_event_old.cc:
  Renamed local variable to avoid hiding class variable
sql/mysql_priv.h:
  Made all create_backup_ctx() declarations identical.
  This lifted up a bug where wrong create_backup_ctx() was called in some cases.
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/mysqld.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
  Fixed indentation
  Don't call end_thr_alarm() when calling unireg_abort() as unireg_abort() already calls end_thr_alarm()
  Added variable 'Opened_files' (number of calls to my_open() or my_fopen())
  Don't print 'loose' warnings when using --bootstrap (to avoid warnings when running mysql_install_db)
  Fixed compiler warnings
sql/opt_range.cc:
  index_read() -> index_read_map()
sql/opt_sum.cc:
  index_read() -> index_read_map()
sql/partition_info.cc:
  Renamed local variable to avoid hiding class variable
sql/rpl_filter.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/set_var.cc:
  Renamed local variable to avoid hiding class variable
  Added 'process_key_cache_t' type to avoid compiler warning (on Forte)
sql/set_var.h:
  Added 'process_key_cache_t' type to avoid compiler warning (on Forte)
sql/sp.cc:
  More debugging
  index_read() -> index_read_map()
sql/sp_cache.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/sp_head.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
  Moved 'saved_creation_ctx' higher up to be able to free objects allocated by create_backup_ctx()
sql/sql_acl.cc:
  index_read() -> index_read_map()
sql/sql_class.cc:
  Renamed local variable to avoid hiding class variable
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/sql_class.h:
  Renamed local variable to avoid hiding class variable
sql/sql_db.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
sql/sql_delete.cc:
  Renamed local variable to avoid hiding class variable
sql/sql_handler.cc:
  index_read() -> index_read_map()
sql/sql_help.cc:
  index_read() -> index_read_map()
sql/sql_insert.cc:
  index_read() -> index_read_map()
  Renamed local variable to avoid hiding class variable
sql/sql_lex.cc:
  Renamed local variable to avoid hiding class variable
sql/sql_plugin.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
  index_read() -> index_read_map()
  Don't give warnings about not used plugins if we are using --warnings=0
sql/sql_select.cc:
  index_read() -> index_read_map()
sql-common/client.c:
  Fixed compiler warning (on Forte)
sql-common/my_time.c:
  Removed never accessed code
  Fixed compiler warning (on Forte)
sql/sql_servers.cc:
  index_read() -> index_read_map()
sql/sql_show.cc:
  Added TRANSACTIONAL to SHOW CREATE
  Fixed ROW_TYPE_PAGE
sql/sql_string.cc:
  Avoid compiler warnings when using C function pointers in C++
sql/sql_table.cc:
  Set create_info->transactional if we used TRANSACTIONAL=1
sql/sql_udf.cc:
  index_read() -> index_read_map()
sql/sql_yacc.yy:
  Added TRANSACTIONAL=0|1 to CREATE (for future)
  Added row type PAGE (was only partionally handled before)
sql/strfunc.cc:
  Avoid compiler warnings when using C function pointers in C++
sql/table.cc:
  More DBUG statements
  Declare all create_backup_ctx() functions identically
  Remember if table was created with TRANSACTIONAL flag or not (future safe)
  Renamed local variable to avoid hiding class variable
sql/table.h:
  Remember if table was created with TRANSACTIONAL=1
sql/tztime.cc:
  index_read() -> index_read_map()
sql-common/pack.c:
  Fixed compiler warning (on Forte)
storage/archive/archive_reader.c:
  Fixed compiler warning (on Forte)
storage/archive/azio.c:
  Fixed compiler warning (on Forte)
storage/blackhole/ha_blackhole.cc:
  index_read() -> index_read_map()
storage/blackhole/ha_blackhole.h:
  index_read() -> index_read_map()
storage/csv/ha_tina.cc:
  Declare functions sent to C code with extern "C" to avoid compiler warnings (on Forte)
storage/example/ha_example.cc:
  index_read() -> index_read_map()
storage/example/ha_example.h:
  index_read() -> index_read_map()
storage/heap/ha_heap.cc:
  index_read() -> index_read_map()
storage/heap/ha_heap.h:
  index_read() -> index_read_map()
storage/heap/hp_test1.c:
  Fixed compiler warning (on Forte)
storage/heap/hp_test2.c:
  Fixed compiler warning (on Forte)
storage/myisam/ft_boolean_search.c:
  Fixed compiler warning (on Forte)
storage/myisam/ft_nlq_search.c:
  Fixed compiler warning (on Forte)
storage/myisam/ft_parser.c:
  Fixed compiler warning (on Forte)
storage/myisam/ft_stopwords.c:
  Fixed compiler warning (on Forte)
storage/myisam/ha_myisam.cc:
  index_read() -> index_read_map()
storage/myisam/ha_myisam.h:
  index_read() -> index_read_map()
storage/myisam/mi_check.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_delete.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_dynrec.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_extra.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_key.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_keycache.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_locking.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_log.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_open.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_packrec.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_page.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_rkey.c:
  Added comment
storage/myisam/mi_search.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_statrec.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_test1.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_test2.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_test3.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_update.c:
  Fixed compiler warning (on Forte)
storage/myisam/mi_write.c:
  Fixed compiler warning (on Forte)
storage/myisam/myisamdef.h:
  Fixed that file_read/file_write returns type size_t
  Changed some functions to use uchar * as argument/return value instead of char*
  This fixed some compiler warnings on Forte
storage/myisam/myisamlog.c:
  Fixed compiler warning (on Forte)
storage/myisam/myisampack.c:
  Fixed compiler warning (on Forte)
storage/myisam/rt_test.c:
  Fixed compiler warning (on Forte)
storage/myisam/sort.c:
  Fixed compiler warning (on Forte) by adding casts or changing variables to uchar*
storage/myisam/sp_test.c:
  Fixed compiler warning (on Forte) by adding casts or changing variables to uchar*
storage/myisammrg/ha_myisammrg.cc:
  index_read() -> index_read_map()
storage/myisammrg/ha_myisammrg.h:
  index_read() -> index_read_map()
storage/myisammrg/myrg_create.c:
  Fixed compiler warning (on Forte) by adding casts or changing variable types
storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp:
  Tdummy -> align  (as in other part of cluster code)
storage/ndb/src/kernel/vm/DynArr256.cpp:
  Removed not used variable
storage/ndb/src/ndbapi/Ndb.cpp:
  Removed not used variable
strings/strtod.c:
  Include ieeefp.h to avoid compiler warning
tests/bug25714.c:
  Fixed compiler warning
tests/mysql_client_test.c:
  Remove not used variable
  Fixed indentation
  Removed never reached code
  Fixed compiler warning (on Forte) by adding casts or changing variable types
vio/viosocket.c:
  Fixed compiler warning (on Forte) by adding casts or changing variable types
2007-08-13 16:11:25 +03:00
monty@mysql.com/nosik.monty.fi
e53a73e26c Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db

I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read()      -> index_read_map()
index_read_idx()  -> index_read_idx_map()
index_read_last() -> index_read_last_map()
2007-08-13 16:11:25 +03:00
unknown
b0301f7c27 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime


client/mysqldump.c:
  Auto merged
mysql-test/r/federated.result:
  Auto merged
mysql-test/t/federated.test:
  Auto merged
2007-08-08 11:36:55 +04:00
kostja@bodhi.(none)
28f1f1828d Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
2007-08-08 11:36:55 +04:00
unknown
090cdfe27b Fix one more warning. 2007-08-06 23:43:53 +04:00
kostja@bodhi.(none)
256450d881 Fix one more warning. 2007-08-06 23:43:53 +04:00
unknown
6e2a246504 Fix "db_cl_altered might be used uninitialized" warning. 2007-08-06 22:52:50 +04:00
kostja@bodhi.(none)
4cc808b7cf Fix "db_cl_altered might be used uninitialized" warning. 2007-08-06 22:52:50 +04:00
unknown
ae3536fe4e Fix warnings. 2007-08-06 22:49:47 +04:00
kostja@bodhi.(none)
057ab256cc Fix warnings. 2007-08-06 22:49:47 +04:00
unknown
e10a415630 Fix failing ddl_i18n* tests in the team tree. 2007-08-06 22:42:13 +04:00
kostja@bodhi.(none)
0c4d8e0032 Fix failing ddl_i18n* tests in the team tree. 2007-08-06 22:42:13 +04:00
unknown
d63ec0931d Merge bk-internal:/home/bk/mysql-5.1-marvel
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-marvel-engines


BitKeeper/etc/ignore:
  auto-union
configure.in:
  Auto merged
BitKeeper/deleted/.del-CMakeLists.txt~99a50df6:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
client/mysqldump.c:
  Auto merged
include/mysql.h:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/field.cc:
  Auto merged
sql/field.h:
  Auto merged
sql/ha_ndbcluster_binlog.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/log.cc:
  Auto merged
sql/log_event.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/table.cc:
  Auto merged
sql/sql_parse.cc:
  merge fix
sql/sql_select.cc:
  merge fix
2007-08-03 17:15:23 +02:00
df@pippilotta.erinye.com
493634e4c7 Merge bk-internal:/home/bk/mysql-5.1-marvel
into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-marvel-engines
2007-08-03 17:15:23 +02:00
unknown
966e113a2a Fix for BUG#30123: mysqldump is unable to work with old servers.
New server (as of 5.1.21) provides new features:
  - SHOW CREATE TRIGGER;
  - character set information for SHOW TRIGGERS and SHOW CREATE
    EVENT | FUNCTION | PROCEDURE statements.
Mysqldump uses these features to generate proper dump.

The bug happened when new mysqldump was used to dump older servers.
The problem was that 5.1.21 new features are not available, so
mysqldump exited with error code or just crashed.

The fix is to detect if mysqldump has ben run against older server
and don't use new 5.1.21 functionality in this case. Certainly,
the dump generated for the older server suffers from the character
set problems fixed by BUG#16291 and the like.


client/mysqldump.c:
  Don't use new server features if they are not available.
2007-08-03 11:50:17 +04:00
anozdrin/alik@ibm.
e76351df1a Fix for BUG#30123: mysqldump is unable to work with old servers.
New server (as of 5.1.21) provides new features:
  - SHOW CREATE TRIGGER;
  - character set information for SHOW TRIGGERS and SHOW CREATE
    EVENT | FUNCTION | PROCEDURE statements.
Mysqldump uses these features to generate proper dump.

The bug happened when new mysqldump was used to dump older servers.
The problem was that 5.1.21 new features are not available, so
mysqldump exited with error code or just crashed.

The fix is to detect if mysqldump has ben run against older server
and don't use new 5.1.21 functionality in this case. Certainly,
the dump generated for the older server suffers from the character
set problems fixed by BUG#16291 and the like.
2007-08-03 11:50:17 +04:00
unknown
82d28fada7 WL#3732 Information schema optimization
client/mysqldump.c:
  table type compare is changed to case insensitive
mysql-test/r/information_schema.result:
  test result
mysql-test/r/information_schema_db.result:
  result fix
mysql-test/suite/ndb/r/ndb_alter_table.result:
  result fix
mysql-test/suite/ndb/r/ndb_temporary.result:
  result fix
mysql-test/t/information_schema.test:
  test case
sql/ha_ndbcluster.cc:
  char* variables are changed to LEX_STRING
sql/ha_ndbcluster.h:
  char* variables are changed to LEX_STRING
sql/ha_ndbcluster_binlog.cc:
  char* variables are changed to LEX_STRING
sql/handler.cc:
  char* variables are changed to LEX_STRING
sql/handler.h:
  char* variables are changed to LEX_STRING
sql/sql_base.cc:
  Modified functions which are used during open table process
  according to table opening method and requested_object.
sql/sql_select.cc:
  Add support for I_S tables into select_describe() function
sql/sql_show.cc:
  1. Added initialization of 'open_method' to 'st_field_info' structs.
  2. Added initialization of 'i_s_requested_object' to 'ST_SCHEMA_TABLE' structs.
  3. New function which calculates database name and table name values 
     from 'where' condition if it's possible
     void get_lookup_field_values(THD *thd, COND *cond, TABLE_LIST *table,
                                  LOOKUP_FIELD_VALUES *lookup_field_vals);
  4. New function which set table open method
     setup_table_open_method(TABLE_LIST *tables,
                             ST_SCHEMA_TABLE *schema_table,
                             enum enum_schema_tables schema_table_idx)
  5. New function
     int make_db_list(THD *thd, List<LEX_STRING> *files,
                      LOOKUP_FIELD_VALUES *lookup_field_vals,
                      bool *with_i_schema)
  6. New function
     int make_table_name_list(THD *thd, List<LEX_STRING> *files, LEX *lex,
                              LOOKUP_FIELD_VALUES *lookup_field_vals,
                              bool with_i_schema, LEX_STRING *db_name)
  7. Modified 'get_all_tables' function according to new schema(see wl#3732).
sql/sql_show.h:
  char* variables are changed to LEX_STRING
sql/table.cc:
  Modified functions which are used during open table process
  according to table opening method and requested_object.
sql/table.h:
  1. added new constants(open_method)
  #define SKIP_OPEN_TABLE 0
  #define OPEN_FRM_ONLY   1
  #define OPEN_FULL_TABLE 2
      
  2. Added new field 'open_method' into struct st_field_info;
     uint open_method;
      
  3. Added new field into ST_SCHEMA_TABLE struct
     uint i_s_requested_object;  /* the object we need to open(TABLE | VIEW) */.
  4. Added new field to TABLE_LIST struct.
     uint i_s_requested_object;
     This field is set from ST_SCHEMA_TABLE.i_s_requested_object
     for processed table before opening.
      
  5. Added new fields to TABLE_LIST struct, used for 'explain select' for I_S table
     bool has_db_lookup_value;
     bool has_table_lookup_value;
     uint table_open_method;
sql/unireg.h:
  added new constants
2007-08-03 03:14:05 +05:00
gluh@mysql.com/eagle.(none)
27ab885525 WL#3732 Information schema optimization 2007-08-03 03:14:05 +05:00
unknown
926664fe2c Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1


client/client_priv.h:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqlslap.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/event_data_objects.cc:
  Auto merged
sql/event_queue.cc:
  Auto merged
sql/ha_partition.cc:
  Auto merged
sql/lock.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/log.h:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/slave.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_plugin.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_cache.cc:
  Manual merge
  Removed comment about bug in old code (not relevant)
2007-08-02 07:55:33 +03:00
monty@nosik.monty.fi
93f0771fca Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  mysql.com:/home/my/mysql-5.1
2007-08-02 07:55:33 +03:00
unknown
f9ea427508 Set --debug-check if one uses DBUG_PUSH in all clients
Fixed bug in query cache that made it impossible to run mysqld with --debug
Fixed memory leaks in mysqldump and mysqltest
Memory leaks associated with wrong usage of mysqltest is not fixed. To find these, run
mysql-test-run --debug mysqltest


client/mysql_upgrade.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqlcheck.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqldump.c:
  Set --debug-check if one uses DBUG_PUSH
  Fixed several memory leaks
client/mysqlimport.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqlshow.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqlslap.c:
  Set --debug-check if one uses DBUG_PUSH
client/mysqltest.c:
  Set --debug-check if one uses DBUG_PUSH
  Fixed some memory leaks
  Removed MY_CHECK_ERROR argument to my_end() as mysqltest.test otherwise shows MANY memory leaks
dbug/dbug.c:
  Fixed compiler warning
  Force flush of out_file on end
  Removed some wrong dbug_flush(0) commands that could cause crashes
mysys/my_init.c:
  Don't write memory usage if MY_GIVE_INFO is not given
sql/sql_cache.cc:
  Fixed bug in query cache that made it impossible to run mysqld with --debug
2007-08-02 07:49:29 +03:00
monty@mysql.com/nosik.monty.fi
4f33d95fa3 Set --debug-check if one uses DBUG_PUSH in all clients
Fixed bug in query cache that made it impossible to run mysqld with --debug
Fixed memory leaks in mysqldump and mysqltest
Memory leaks associated with wrong usage of mysqltest is not fixed. To find these, run
mysql-test-run --debug mysqltest
2007-08-02 07:49:29 +03:00
unknown
0c9a3e597d Fixes Bug#30127: --debug-info no longer prints memory usage in mysql
Fixed compiler warnings, errors and link errors
Fixed new bug on Solaris with gethrtime()
Added --debug-check option to all mysql clients to print errors and memory leaks
Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage


BUILD/compile-solaris-sparc-debug:
  Remove old cpu options
client/client_priv.h:
  Added OPT_DBUG_CHECK
client/mysql.cc:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysql_upgrade.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqladmin.cc:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlbinlog.cc:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlcheck.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqldump.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlimport.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlshow.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqlslap.c:
  --debug-info now prints memory usage 
  Added --debug-check
client/mysqltest.c:
  --debug-info now prints memory usage 
  Added --debug-check
include/my_sys.h:
  Added extra option to TERMINATE to not print statistics
libmysql/libmysql.c:
  Fixed compiler warning
mysql-test/mysql-test-run.pl:
  --debug-info -> --debug-check to not print memory usage
mysys/my_getsystime.c:
  Moved fast time calculation to my_micro_time_and_time()
  Fixed bug in previous push related to HAVE_GETHRTIME
mysys/my_init.c:
  Print not freed memory in my_end() if MY_CHECK_ERROR is given
mysys/my_static.c:
  Cleanup
mysys/safemalloc.c:
  Added extra option to TERMINATE to not print statistics
sql/item_xmlfunc.cc:
  Fixed compiler warning
sql/sql_test.cc:
  Fixed TERMINATE() call
unittest/mysys/base64-t.c:
  Fixed link error
unittest/mysys/bitmap-t.c:
  Fixed link error
unittest/mysys/my_atomic-t.c:
  Fixed link error
2007-08-01 22:59:05 +03:00
monty@mysql.com/nosik.monty.fi
96f90711a7 Fixes Bug#30127: --debug-info no longer prints memory usage in mysql
Fixed compiler warnings, errors and link errors
Fixed new bug on Solaris with gethrtime()
Added --debug-check option to all mysql clients to print errors and memory leaks
Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage
2007-08-01 22:59:05 +03:00
unknown
91f54bf1f7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
sql/sql_base.cc:
  Auto merged
sql/table.cc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Manual merge.
mysql-test/t/innodb_mysql.test:
  Manual merge.
sql/sql_table.cc:
  Manual merge.
2007-07-31 20:03:52 +04:00
kostja@bodhi.(none)
1bf318b895 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.(none):/opt/local/work/mysql-5.0-runtime
2007-07-31 20:03:52 +04:00
unknown
ced93a5cc8 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-25422-d


client/mysqldump.c:
  Auto merged
mysql-test/r/log_state.result:
  Auto merged
mysql-test/r/show_check.result:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sp.cc:
  Auto merged
2007-07-27 12:22:00 -06:00
malff/marcsql@weblab.(none)
32668a2e08 Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into  weblab.(none):/home/marcsql/TREE/mysql-5.1-25422-d
2007-07-27 12:22:00 -06:00
unknown
4596ef83e7 Merge ibm.:/home/alik/Documents/MySQL/devel/5.0-rt
into  ibm.:/home/alik/Documents/MySQL/devel/5.1-rt-merge


mysql-test/r/mysqldump-max.result:
  Auto merged
mysql-test/r/openssl_1.result:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
sql/sp.cc:
  Auto merged
sql/sql_yacc.yy:
  Auto merged
client/mysqldump.c:
  Manual merge.
mysql-test/r/mysqldump.result:
  Manual merge + use local.
2007-07-27 21:30:43 +04:00
anozdrin/alik@ibm.
af9e57562d Merge ibm.:/home/alik/Documents/MySQL/devel/5.0-rt
into  ibm.:/home/alik/Documents/MySQL/devel/5.1-rt-merge
2007-07-27 21:30:43 +04:00
unknown
e030b5dcc0 Fix for BUG#30027: mysqldump does not dump views properly.
mysqldump generates view defitions in two stages:

  - dump CREATE TABLE statements for the temporary tables.  For each view a
    temporary table, that has the same structure as the view is created.

  - dump DROP TABLE statements for the temporary tables and CREATE VIEW
    statements for the view.

This approach is required because views can have dependencies on each other
(a view can use other views). So, they should be created in the particular
order. mysqldump however is not smart enough, so in order to resolve
dependencies it creates temporary tables first of all.

The problem was that mysqldump might have generated incorrect dump for the
temporary table when a view has non-ASCII column name. That happened when
default-character-set is not utf8.

The fix is to:

  1. Switch character_set_client for the mysqldump's connection to binary
     before issuing SHOW FIELDS statement in order to avoid conversion.
    
  2. Dump switch character_set_client statements to UTF8 and back for
     CREATE TABLE statement that is issued to create temporary table.


client/mysqldump.c:
  1. Switch character_set_results for mysqldump's connection to
  binary before SHOW FIELDS in order to avoid conversion to client
  character set.
  
  2. Dump switch character_set_client statements to UTF8 and back
  for CREATE TABLE statement.
mysql-test/r/mysqldump.result:
  Update result file.
mysql-test/t/mysqldump.test:
  Test case for BUG#30027.
2007-07-27 18:20:17 +04:00
anozdrin/alik@ibm.
e73f004fe6 Fix for BUG#30027: mysqldump does not dump views properly.
mysqldump generates view defitions in two stages:

  - dump CREATE TABLE statements for the temporary tables.  For each view a
    temporary table, that has the same structure as the view is created.

  - dump DROP TABLE statements for the temporary tables and CREATE VIEW
    statements for the view.

This approach is required because views can have dependencies on each other
(a view can use other views). So, they should be created in the particular
order. mysqldump however is not smart enough, so in order to resolve
dependencies it creates temporary tables first of all.

The problem was that mysqldump might have generated incorrect dump for the
temporary table when a view has non-ASCII column name. That happened when
default-character-set is not utf8.

The fix is to:

  1. Switch character_set_client for the mysqldump's connection to binary
     before issuing SHOW FIELDS statement in order to avoid conversion.
    
  2. Dump switch character_set_client statements to UTF8 and back for
     CREATE TABLE statement that is issued to create temporary table.
2007-07-27 18:20:17 +04:00
unknown
4462578a1c WL#3984 (Revise locking of mysql.general_log and mysql.slow_log)
Bug#25422 (Hang with log tables)
Bug 17876 (Truncating mysql.slow_log in a SP after using cursor locks the
          thread)
Bug 23044 (Warnings on flush of a log table)
Bug 29129 (Resetting general_log while the GLOBAL READ LOCK is set causes
           a deadlock)

Prior to this fix, the server would hang when performing concurrent
ALTER TABLE or TRUNCATE TABLE statements against the LOG TABLES,
which are mysql.general_log and mysql.slow_log.

The root cause traces to the following code:
in sql_base.cc, open_table()
  if (table->in_use != thd)
  {
    /* wait_for_condition will unlock LOCK_open for us */
    wait_for_condition(thd, &LOCK_open, &COND_refresh);
  }
The problem with this code is that the current implementation of the
LOGGER creates 'fake' THD objects, like
- Log_to_csv_event_handler::general_log_thd
- Log_to_csv_event_handler::slow_log_thd
which are not associated to a real thread running in the server,
so that waiting for these non-existing threads to release table locks
cause the dead lock.

In general, the design of Log_to_csv_event_handler does not fit into the
general architecture of the server, so that the concept of general_log_thd
and slow_log_thd has to be abandoned:
- this implementation does not work with table locking
- it will not work with commands like SHOW PROCESSLIST
- having the log tables always opened does not integrate well with DDL
operations / FLUSH TABLES / SET GLOBAL READ_ONLY

With this patch, the fundamental design of the LOGGER has been changed to:
- always open and close a log table when writing a log
- remove totally the usage of fake THD objects
- clarify how locking of log tables is implemented in general.

See WL#3984 for details related to the new locking design.

Additional changes (misc bugs exposed and fixed):

1)

mysqldump which would ignore some tables in dump_all_tables_in_db(),
 but forget to ignore the same in dump_all_views_in_db().

2)

mysqldump would also issue an empty "LOCK TABLE" command when all the tables
to lock are to be ignored (numrows == 0), instead of not issuing the query.

3)

Internal errors handlers could intercept errors but not warnings
(see sql_error.cc).

4)

Implementing a nested call to open tables, for the performance schema tables,
exposed an existing bug in remove_table_from_cache(), which would perform:
  in_use->some_tables_deleted=1;
against another thread, without any consideration about thread locking.
This call inside remove_table_from_cache() was not required anyway,
since calling mysql_lock_abort() takes care of aborting -- cleanly -- threads
that might hold a lock on a table.
This line (in_use->some_tables_deleted=1) has been removed.


sql/handler.cc:
  Moved logic for system / log tables in the SQL layer.
sql/handler.h:
  Moved logic for system / log tables in the SQL layer.
sql/lock.cc:
  Revised locking of log tables
sql/log.cc:
  Major cleanup: changed how log tables are locked / written to.
sql/log.h:
  Major cleanup: changed how log tables are locked / written to.
sql/mysql_priv.h:
  performance schema helpers
sql/slave.cc:
  open_ltable() lock flags
sql/sp.cc:
  open_ltable() lock flags
sql/sql_acl.cc:
  open_ltable() lock flags
sql/sql_class.h:
  performance schema helpers
sql/sql_delete.cc:
  log tables cleanup in TRUNCATE
sql/sql_error.cc:
  Internal handlers can also intercept warnings
sql/sql_insert.cc:
  open_ltable() lock flags
sql/sql_parse.cc:
  performance schema helpers
sql/sql_plugin.cc:
  open_ltable() lock flags
sql/sql_rename.cc:
  log tables cleanup in RENAME
sql/sql_servers.cc:
  open_ltable() lock flags
sql/sql_show.cc:
  Move INFORMATION_SCHEMA_NAME to table.cc
sql/sql_table.cc:
  log tables cleanup (admin operations, ALTER TABLE)
sql/sql_udf.cc:
  open_ltable() lock flags
sql/table.cc:
  Implemented TABLE_CATEGORY.
sql/share/errmsg.txt:
  Changed the wording and name of ER_CANT_READ_LOCK_LOG_TABLE
sql/table.h:
  Implemented TABLE_CATEGORY.
storage/csv/ha_tina.cc:
  Moved logic for system / log tables in the SQL layer.
storage/csv/ha_tina.h:
  Moved logic for system / log tables in the SQL layer.
storage/myisam/ha_myisam.cc:
  Moved logic for system / log tables in the SQL layer.
storage/myisam/ha_myisam.h:
  Moved logic for system / log tables in the SQL layer.
client/mysqldump.c:
  Don't lock tables in the ignore list.
  Don't issue empty LOCK TABLES queries.
sql/sql_base.cc:
  log tables cleanup
  performance schema helpers
mysql-test/r/ps.result:
  Adjust test results
mysql-test/r/show_check.result:
  Adjust test results
mysql-test/r/status.result:
  Adjust test results
mysql-test/t/log_state.test:
  Added tests for Bug#29129
mysql-test/t/ps.test:
  Make the test output deterministic
mysql-test/t/show_check.test:
  Make the test output deterministic
mysql-test/r/log_state.result:
  Changed the default location of the log output to LOG_FILE,
  for backward compatibility with MySQL 5.0
  ---
  Adjust test results
mysql-test/r/log_tables.result:
  cleanup for -ps-protocol
mysql-test/t/log_tables.test:
  cleanup for -ps-protocol
sql/set_var.cc:
  Changed the default location of the log output to LOG_FILE,
  for backward compatibility with MySQL 5.0
  ---
  log tables cleanup
2007-07-27 00:31:06 -06:00
malff/marcsql@weblab.(none)
c7bbd8917c WL#3984 (Revise locking of mysql.general_log and mysql.slow_log)
Bug#25422 (Hang with log tables)
Bug 17876 (Truncating mysql.slow_log in a SP after using cursor locks the
          thread)
Bug 23044 (Warnings on flush of a log table)
Bug 29129 (Resetting general_log while the GLOBAL READ LOCK is set causes
           a deadlock)

Prior to this fix, the server would hang when performing concurrent
ALTER TABLE or TRUNCATE TABLE statements against the LOG TABLES,
which are mysql.general_log and mysql.slow_log.

The root cause traces to the following code:
in sql_base.cc, open_table()
  if (table->in_use != thd)
  {
    /* wait_for_condition will unlock LOCK_open for us */
    wait_for_condition(thd, &LOCK_open, &COND_refresh);
  }
The problem with this code is that the current implementation of the
LOGGER creates 'fake' THD objects, like
- Log_to_csv_event_handler::general_log_thd
- Log_to_csv_event_handler::slow_log_thd
which are not associated to a real thread running in the server,
so that waiting for these non-existing threads to release table locks
cause the dead lock.

In general, the design of Log_to_csv_event_handler does not fit into the
general architecture of the server, so that the concept of general_log_thd
and slow_log_thd has to be abandoned:
- this implementation does not work with table locking
- it will not work with commands like SHOW PROCESSLIST
- having the log tables always opened does not integrate well with DDL
operations / FLUSH TABLES / SET GLOBAL READ_ONLY

With this patch, the fundamental design of the LOGGER has been changed to:
- always open and close a log table when writing a log
- remove totally the usage of fake THD objects
- clarify how locking of log tables is implemented in general.

See WL#3984 for details related to the new locking design.

Additional changes (misc bugs exposed and fixed):

1)

mysqldump which would ignore some tables in dump_all_tables_in_db(),
 but forget to ignore the same in dump_all_views_in_db().

2)

mysqldump would also issue an empty "LOCK TABLE" command when all the tables
to lock are to be ignored (numrows == 0), instead of not issuing the query.

3)

Internal errors handlers could intercept errors but not warnings
(see sql_error.cc).

4)

Implementing a nested call to open tables, for the performance schema tables,
exposed an existing bug in remove_table_from_cache(), which would perform:
  in_use->some_tables_deleted=1;
against another thread, without any consideration about thread locking.
This call inside remove_table_from_cache() was not required anyway,
since calling mysql_lock_abort() takes care of aborting -- cleanly -- threads
that might hold a lock on a table.
This line (in_use->some_tables_deleted=1) has been removed.
2007-07-27 00:31:06 -06:00
unknown
2612fc43b5 Patch inspired by BUG#10491: Server returns data as charset
binary SHOW CREATE TABLE or SELECT FROM I_S.

The problem is that mysqldump generates incorrect dump for a table
with non-ASCII column name if the mysqldump's character set is
ASCII.

The fix is to:
  1. Switch character_set_client for the mysqldump's connection
  to binary before issuing SHOW CREATE TABLE statement in order
  to avoid conversion.
  
  2. Dump switch character_set_client statements to UTF8 and back
  for CREATE TABLE statement.


client/mysqldump.c:
  1. Switch character_set_client for the mysqldump's connection
  to binary before issuing SHOW CREATE TABLE statement in order
  to avoid conversion.
  
  2. Dump switch character_set_client statements to UTF8 and back
  for CREATE TABLE statement.
mysql-test/r/mysqldump-max.result:
  Update result file.
mysql-test/r/mysqldump.result:
  Update result file.
mysql-test/r/openssl_1.result:
  Update result file.
mysql-test/r/show_check.result:
  Update result file.
mysql-test/t/show_check.test:
  Test case:
    - create a table with non-ASCII column name;
    - dump the database by mysqldump using ASCII character set;
    - drop the database;
    - load the dump;
    - check that the table has been re-created properly.
2007-07-25 19:46:50 +04:00
anozdrin/alik@ibm.
9f8593e81c Patch inspired by BUG#10491: Server returns data as charset
binary SHOW CREATE TABLE or SELECT FROM I_S.

The problem is that mysqldump generates incorrect dump for a table
with non-ASCII column name if the mysqldump's character set is
ASCII.

The fix is to:
  1. Switch character_set_client for the mysqldump's connection
  to binary before issuing SHOW CREATE TABLE statement in order
  to avoid conversion.
  
  2. Dump switch character_set_client statements to UTF8 and back
  for CREATE TABLE statement.
2007-07-25 19:46:50 +04:00
unknown
cff531ffc1 Fixed bug #29788.
After dumping triggers mysqldump copied 
the value of the OLD_SQL_MODE variable to the SQL_MODE
variable. If the --compact option of the mysqldump was
not set the OLD_SQL_MODE variable had the value
of the uninitialized SQL_MODE variable. So
usually the NO_AUTO_VALUE_ON_ZERO option of the
SQL_MODE variable was discarded.

This fix is for non-"--compact" mode of the mysqldump,
because mysqldump --compact never set SQL_MODE to the
value of NO_AUTO_VALUE_ON_ZERO.

The dump_triggers_for_table function has been modified
to restore previous value of the SQL_MODE variable after
dumping triggers using the SAVE_SQL_MODE temporary
variable.


client/mysqldump.c:
  Fixed bug #29788.
  The dump_triggers_for_table function has been modified
  to restore previous value of the SQL_MODE variable after
  dumping triggers using the SAVE_SQL_MODE temporary
  variable.
mysql-test/r/mysqldump.result:
  Updated test case for bug #29788.
mysql-test/t/mysqldump.test:
  Updated test case for bug #29788.
2007-07-21 04:50:11 +05:00
gshchepa/uchum@gleb.loc
c3e925eec3 Fixed bug #29788.
After dumping triggers mysqldump copied 
the value of the OLD_SQL_MODE variable to the SQL_MODE
variable. If the --compact option of the mysqldump was
not set the OLD_SQL_MODE variable had the value
of the uninitialized SQL_MODE variable. So
usually the NO_AUTO_VALUE_ON_ZERO option of the
SQL_MODE variable was discarded.

This fix is for non-"--compact" mode of the mysqldump,
because mysqldump --compact never set SQL_MODE to the
value of NO_AUTO_VALUE_ON_ZERO.

The dump_triggers_for_table function has been modified
to restore previous value of the SQL_MODE variable after
dumping triggers using the SAVE_SQL_MODE temporary
variable.
2007-07-21 04:50:11 +05:00
unknown
e395b0ace2 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt


client/mysqldump.c:
  Auto merged
include/my_base.h:
  Auto merged
mysql-test/include/mix1.inc:
  Auto merged
mysql-test/r/innodb_mysql.result:
  Auto merged
mysql-test/t/disabled.def:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_insert.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/sql_update.cc:
  Auto merged
storage/myisam/ha_myisam.cc:
  Auto merged
2007-07-19 20:01:13 +05:00
gshchepa/uchum@gleb.loc
35a2a20160 Merge gleb.loc:/home/uchum/work/bk/5.1
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-07-19 20:01:13 +05:00
unknown
0a433b21db Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt


client/mysqldump.c:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/r/mysqldump.result:
  Merge with 5.0-opt.
2007-07-19 14:23:53 +05:00
gshchepa/uchum@gleb.loc
7481113f1b Merge gleb.loc:/home/uchum/work/bk/5.0-opt
into  gleb.loc:/home/uchum/work/bk/5.1-opt
2007-07-19 14:23:53 +05:00
unknown
2bfe84d434 Fixed bug #28524.
For each view the mysqldump utility creates a temporary table
with the same name and the same columns as the view 
in order to satisfy views that depend on this view.
After the creation of all tables, mysqldump drops all
temporary tables and creates actual views.
However, --skip-add-drop-table and --compact flags disable
DROP TABLE statements for those temporary tables. Thus, it was
impossible to create the views because of existence of the
temporary tables with the same names.


client/mysqldump.c:
  Fixed bug #28524.
  The mysqldump utility has been modified to unconditionally drop
  temporary tables before the creation of views.
mysql-test/t/mysqldump.test:
  Updated test case for bug #28524 and updated result of previous tests.
mysql-test/r/mysqldump.result:
  Updated test case for bug #28524 and updated result of previous tests.
2007-07-18 19:14:48 +05:00
gshchepa/uchum@gleb.loc
3f91aedadb Fixed bug #28524.
For each view the mysqldump utility creates a temporary table
with the same name and the same columns as the view 
in order to satisfy views that depend on this view.
After the creation of all tables, mysqldump drops all
temporary tables and creates actual views.
However, --skip-add-drop-table and --compact flags disable
DROP TABLE statements for those temporary tables. Thus, it was
impossible to create the views because of existence of the
temporary tables with the same names.
2007-07-18 19:14:48 +05:00
unknown
146b0e1475 Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime


client/mysqldump.c:
  Auto merged
mysql-test/r/show_check.result:
  Auto merged
mysql-test/t/show_check.test:
  Auto merged
sql/ha_ndbcluster.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_cache.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
mysql-test/r/events_bugs.result:
  Manual merge.
2007-07-16 17:22:33 +04:00
kostja@bodhi.(none)
be4f73c44f Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into  bodhi.(none):/opt/local/work/mysql-5.1-runtime
2007-07-16 17:22:33 +04:00
unknown
6ba23b0ac9 Fix for 5.1 for BUG#10491: Server returns data as charset binary
SHOW CREATE TABLE or SELECT FROM I_S.

This is the last patch for this bug, which depends on the big
CS patch and was pending.

The problem was that SHOW CREATE statements returned original
queries in the binary character set. That could cause the query
to be unreadable.

The fix is to use original character_set_client when sending
the original query to the client. In order to preserve the query
in mysqldump, 'binary' character set results should be set when
issuing SHOW CREATE statement. If either source or destination
character set is 'binary' , no conversion is performed.
The idea is that since the source character set is no longer
'binary', we fix the destination character set to still produce
valid dumps.


client/mysqldump.c:
  Switch character_set_results of mysqldump-connection before
  calling SHOW CREATE statements for the objects.
mysql-test/r/show_check.result:
  Result file.
mysql-test/t/show_check.test:
  Add test case for the part of BUG#10491.
sql/events.cc:
  Send original query in the original character set.
sql/sp_head.cc:
  Send original query in the original character set.
sql/sql_show.cc:
  Send original query in the original character set.
2007-07-12 12:49:39 +04:00
anozdrin/alik@ibm.
3f2e94c401 Fix for 5.1 for BUG#10491: Server returns data as charset binary
SHOW CREATE TABLE or SELECT FROM I_S.

This is the last patch for this bug, which depends on the big
CS patch and was pending.

The problem was that SHOW CREATE statements returned original
queries in the binary character set. That could cause the query
to be unreadable.

The fix is to use original character_set_client when sending
the original query to the client. In order to preserve the query
in mysqldump, 'binary' character set results should be set when
issuing SHOW CREATE statement. If either source or destination
character set is 'binary' , no conversion is performed.
The idea is that since the source character set is no longer
'binary', we fix the destination character set to still produce
valid dumps.
2007-07-12 12:49:39 +04:00
unknown
9e14ae9472 Merge maint1.mysql.com:/data/localhome/tsmith/bk/51
into  maint1.mysql.com:/data/localhome/tsmith/bk/maint/51


client/mysqldump.c:
  Auto merged
mysql-test/lib/mtr_cases.pl:
  Auto merged
mysql-test/lib/mtr_report.pl:
  Auto merged
mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/suite/binlog/r/binlog_multi_engine.result:
  Auto merged
mysql-test/suite/binlog/t/binlog_multi_engine.test:
  Auto merged
mysql-test/suite/ndb/r/ndb_read_multi_range.result:
  Auto merged
mysql-test/suite/ndb/r/ndb_sp.result:
  Auto merged
mysql-test/suite/ndb/r/ndb_trigger.result:
  Auto merged
mysql-test/suite/ndb/r/ps_7ndb.result:
  Auto merged
mysql-test/suite/ndb/t/loaddata_autocom_ndb.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_alter_table.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_alter_table2.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_alter_table3.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_autodiscover.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_autodiscover2.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_autodiscover3.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_basic.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_binlog_ddl_multi.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_binlog_log_bin.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_binlog_multi.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_bitfield.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_blob.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_blob_partition.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_cache.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_cache2.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_cache_multi.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_cache_multi2.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_charset.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_condition_pushdown.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_config.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_config2.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_cursor.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_database.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_dd_alter.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_dd_backuprestore.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_dd_basic.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_dd_ddl.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_dd_disk2memory.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_dd_dump.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_dd_sql_features.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_gis.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_index.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_index_ordered.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_index_unique.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_insert.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_limit.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_loaddatalocal.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_lock.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_minmax.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_multi.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_partition_error.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_partition_key.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_partition_list.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_partition_range.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_read_multi_range.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_rename.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_replace.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_restore.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_restore_partition.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_restore_print.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_row_format.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_single_user.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_sp.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_subquery.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_temporary.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_transaction.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_trigger.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_truncate.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_types.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_update.test:
  Auto merged
mysql-test/suite/ndb/t/ndb_view.test:
  Auto merged
mysql-test/suite/ndb/t/ndbapi.test:
  Auto merged
mysql-test/suite/ndb/t/ps_7ndb.test:
  Auto merged
mysql-test/suite/ndb/t/strict_autoinc_5ndb.test:
  Auto merged
mysql-test/suite/rpl/r/rpl_events.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_replicate_do.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_row_UUID.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_sp.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_trigger.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_view.result:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_UUID.result:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_dd_advance.result:
  Auto merged
mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result:
  Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_commit_afterflush.test:
  Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_dd_advance.test:
  Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_innodb_trans.test:
  Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb-master.opt:
  Auto merged
mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test:
  Auto merged
mysql-test/t/sp.test:
  Auto merged
sql/Makefile.am:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/sql_class.h:
  Auto merged
mysql-test/t/disabled.def:
  manual merge
  (Will need to follow up with moving a few test cases around post-merge)
2007-07-04 22:38:53 +02:00
tsmith@maint1.mysql.com
54253a0763 Merge maint1.mysql.com:/data/localhome/tsmith/bk/51
into  maint1.mysql.com:/data/localhome/tsmith/bk/maint/51
2007-07-04 22:38:53 +02:00
unknown
2b59f496b7 Folow up on the CS patch:
1. Fix ddl_i18n_koi8r, ddl_i18n_utf8: explicitly specify character-sets
directory for mysqldump;
2. Fix crash in mysqldump if collation is not found;
3. Use proper way to compare character set names.


client/mysqldump.c:
  Prevent crash if collation does not exist.
mysql-test/t/ddl_i18n_koi8r.test:
  Explicitly specify character-sets-directory for mysqldump.
mysql-test/t/ddl_i18n_utf8.test:
  Explicitly specify character-sets-directory for mysqldump.
sql/sql_lex.cc:
  Use my_charset_same() function to check if the charset names are equal.
2007-06-29 16:52:05 +04:00
anozdrin/alik@ibm.
bceff6f1d4 Folow up on the CS patch:
1. Fix ddl_i18n_koi8r, ddl_i18n_utf8: explicitly specify character-sets
directory for mysqldump;
2. Fix crash in mysqldump if collation is not found;
3. Use proper way to compare character set names.
2007-06-29 16:52:05 +04:00
unknown
405f82d390 Patch for the following bugs:
- BUG#11986: Stored routines and triggers can fail if the code
    has a non-ascii symbol
  - BUG#16291: mysqldump corrupts string-constants with non-ascii-chars
  - BUG#19443: INFORMATION_SCHEMA does not support charsets properly
  - BUG#21249: Character set of SP-var can be ignored
  - BUG#25212: Character set of string constant is ignored (stored routines)
  - BUG#25221: Character set of string constant is ignored (triggers)

There were a few general problems that caused these bugs:
1. Character set information of the original (definition) query for views,
   triggers, stored routines and events was lost.
2. mysqldump output query in client character set, which can be
   inappropriate to encode definition-query.
3. INFORMATION_SCHEMA used strings with mixed encodings to display object
   definition;

1. No query-definition-character set.

In order to compile query into execution code, some extra data (such as
environment variables or the database character set) is used. The problem
here was that this context was not preserved. So, on the next load it can
differ from the original one, thus the result will be different.

The context contains the following data:
  - client character set;
  - connection collation (character set and collation);
  - collation of the owner database;

The fix is to store this context and use it each time we parse (compile)
and execute the object (stored routine, trigger, ...).

2. Wrong mysqldump-output.

The original query can contain several encodings (by means of character set
introducers). The problem here was that we tried to convert original query
to the mysqldump-client character set.

Moreover, we stored queries in different character sets for different
objects (views, for one, used UTF8, triggers used original character set).

The solution is
  - to store definition queries in the original character set;
  - to change SHOW CREATE statement to output definition query in the
    binary character set (i.e. without any conversion);
  - introduce SHOW CREATE TRIGGER statement;
  - to dump special statements to switch the context to the original one
    before dumping and restore it afterwards.

Note, in order to preserve the database collation at the creation time,
additional ALTER DATABASE might be used (to temporary switch the database
collation back to the original value). In this case, ALTER DATABASE
privilege will be required. This is a backward-incompatible change.

3. INFORMATION_SCHEMA showed non-UTF8 strings

The fix is to generate UTF8-query during the parsing, store it in the object
and show it in the INFORMATION_SCHEMA.

Basically, the idea is to create a copy of the original query convert it to
UTF8. Character set introducers are removed and all text literals are
converted to UTF8.

This UTF8 query is intended to provide user-readable output. It must not be
used to recreate the object.  Specialized SHOW CREATE statements should be
used for this.

The reason for this limitation is the following: the original query can
contain symbols from several character sets (by means of character set
introducers).

Example:

  - original query:
    CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1;

  - UTF8 query (for INFORMATION_SCHEMA):
    CREATE VIEW v1 AS SELECT 'Hello' AS c1;


client/mysqldump.c:
  Set original character set and collation before dumping definition query.
include/my_sys.h:
  Move out-parameter to the end of list.
mysql-test/lib/mtr_report.pl:
  Ignore server-warnings during the test case.
mysql-test/r/create.result:
  Update result file.
mysql-test/r/ctype_cp932_binlog_stm.result:
  Update result file.
mysql-test/r/events.result:
  Update result file.
mysql-test/r/events_bugs.result:
  Update result file.
mysql-test/r/events_grant.result:
  Update result file.
mysql-test/r/func_in.result:
  Update result file.
mysql-test/r/gis.result:
  Update result file.
mysql-test/r/grant.result:
  Update result file.
mysql-test/r/information_schema.result:
  Update result file.
mysql-test/r/information_schema_db.result:
  Update result file.
mysql-test/r/lowercase_view.result:
  Update result file.
mysql-test/r/mysqldump.result:
  Update result file.
mysql-test/r/ndb_sp.result:
  Update result file.
mysql-test/r/ps.result:
  Update result file.
mysql-test/r/rpl_replicate_do.result:
  Update result file.
mysql-test/r/rpl_sp.result:
  Update result file.
mysql-test/r/rpl_trigger.result:
  Update result file.
mysql-test/r/rpl_view.result:
  Update result file.
mysql-test/r/show_check.result:
  Update result file.
mysql-test/r/skip_grants.result:
  Update result file.
mysql-test/r/sp-destruct.result:
  Update result file.
mysql-test/r/sp-error.result:
  Update result file.
mysql-test/r/sp-security.result:
  Update result file.
mysql-test/r/sp.result:
  Update result file.
mysql-test/r/sql_mode.result:
  Update result file.
mysql-test/r/system_mysql_db.result:
  Update result file.
mysql-test/r/temp_table.result:
  Update result file.
mysql-test/r/trigger-compat.result:
  Update result file.
mysql-test/r/trigger-grant.result:
  Update result file.
mysql-test/r/trigger.result:
  Update result file.
mysql-test/r/view.result:
  Update result file.
mysql-test/r/view_grant.result:
  Update result file.
mysql-test/t/events.test:
  Update test case (new columns added).
mysql-test/t/information_schema.test:
  Update test case (new columns added).
mysql-test/t/show_check.test:
  Test case for SHOW CREATE TRIGGER in prepared statements and
  stored routines.
mysql-test/t/sp-destruct.test:
  Update test case (new columns added).
mysql-test/t/sp.test:
  Update test case (new columns added).
mysql-test/t/view.test:
  Update test.
mysys/charset.c:
  Move out-parameter to the end of list.
scripts/mysql_system_tables.sql:
  Add new columns to mysql.proc and mysql.event.
scripts/mysql_system_tables_fix.sql:
  Add new columns to mysql.proc and mysql.event.
sql/event_data_objects.cc:
  Support new attributes for events.
sql/event_data_objects.h:
  Support new attributes for events.
sql/event_db_repository.cc:
  Support new attributes for events.
sql/event_db_repository.h:
  Support new attributes for events.
sql/events.cc:
  Add new columns to SHOW CREATE event resultset.
sql/mysql_priv.h:
  1. Introduce Object_creation_ctx;
  2. Introduce SHOW CREATE TRIGGER;
  3. Introduce auxilary functions.
sql/sp.cc:
  Add support for new store routines attributes.
sql/sp_head.cc:
  Add support for new store routines attributes.
sql/sp_head.h:
  Add support for new store routines attributes.
sql/sql_lex.cc:
  Generate UTF8-body on parsing/lexing.
sql/sql_lex.h:
  1. Generate UTF8-body on parsing/lexing.
  2. Introduce SHOW CREATE TRIGGER.
sql/sql_parse.cc:
  Introduce SHOW CREATE TRIGGER.
sql/sql_partition.cc:
  Update parse_sql().
sql/sql_prepare.cc:
  Update parse_sql().
sql/sql_show.cc:
  Support new attributes for views
sql/sql_trigger.cc:
  Support new attributes for views
sql/sql_trigger.h:
  Support new attributes for views
sql/sql_view.cc:
  Support new attributes for views
sql/sql_yacc.yy:
  1. Add SHOW CREATE TRIGGER statement.
  2. Generate UTF8-body for views, stored routines, triggers and events.
sql/table.cc:
  Introduce Object_creation_ctx.
sql/table.h:
  Introduce Object_creation_ctx.
sql/share/errmsg.txt:
  Add new errors.
mysql-test/include/ddl_i18n.check_events.inc:
  Aux file for test suite.
mysql-test/include/ddl_i18n.check_sp.inc:
  Aux file for test suite.
mysql-test/include/ddl_i18n.check_triggers.inc:
  Aux file for test suite.
mysql-test/include/ddl_i18n.check_views.inc:
  Aux file for test suite.
mysql-test/include/have_cp1251.inc:
  Aux file for test suite.
mysql-test/include/have_cp866.inc:
  Aux file for test suite.
mysql-test/include/have_koi8r.inc:
  Aux file for test suite.
mysql-test/include/have_utf8.inc:
  Aux file for test suite.
mysql-test/r/ddl_i18n_koi8r.result:
  Result file.
mysql-test/r/ddl_i18n_utf8.result:
  Result file.
mysql-test/r/have_cp1251.require:
  Aux file for test suite.
mysql-test/r/have_cp866.require:
  Aux file for test suite.
mysql-test/r/have_koi8r.require:
  Aux file for test suite.
mysql-test/r/have_utf8.require:
  Aux file for test suite.
mysql-test/t/ddl_i18n_koi8r.test:
  Complete koi8r test case for the CS patch.
mysql-test/t/ddl_i18n_utf8.test:
  Complete utf8 test case for the CS patch.
2007-06-28 21:34:54 +04:00
anozdrin/alik@ibm.
9fae9ef66f Patch for the following bugs:
- BUG#11986: Stored routines and triggers can fail if the code
    has a non-ascii symbol
  - BUG#16291: mysqldump corrupts string-constants with non-ascii-chars
  - BUG#19443: INFORMATION_SCHEMA does not support charsets properly
  - BUG#21249: Character set of SP-var can be ignored
  - BUG#25212: Character set of string constant is ignored (stored routines)
  - BUG#25221: Character set of string constant is ignored (triggers)

There were a few general problems that caused these bugs:
1. Character set information of the original (definition) query for views,
   triggers, stored routines and events was lost.
2. mysqldump output query in client character set, which can be
   inappropriate to encode definition-query.
3. INFORMATION_SCHEMA used strings with mixed encodings to display object
   definition;

1. No query-definition-character set.

In order to compile query into execution code, some extra data (such as
environment variables or the database character set) is used. The problem
here was that this context was not preserved. So, on the next load it can
differ from the original one, thus the result will be different.

The context contains the following data:
  - client character set;
  - connection collation (character set and collation);
  - collation of the owner database;

The fix is to store this context and use it each time we parse (compile)
and execute the object (stored routine, trigger, ...).

2. Wrong mysqldump-output.

The original query can contain several encodings (by means of character set
introducers). The problem here was that we tried to convert original query
to the mysqldump-client character set.

Moreover, we stored queries in different character sets for different
objects (views, for one, used UTF8, triggers used original character set).

The solution is
  - to store definition queries in the original character set;
  - to change SHOW CREATE statement to output definition query in the
    binary character set (i.e. without any conversion);
  - introduce SHOW CREATE TRIGGER statement;
  - to dump special statements to switch the context to the original one
    before dumping and restore it afterwards.

Note, in order to preserve the database collation at the creation time,
additional ALTER DATABASE might be used (to temporary switch the database
collation back to the original value). In this case, ALTER DATABASE
privilege will be required. This is a backward-incompatible change.

3. INFORMATION_SCHEMA showed non-UTF8 strings

The fix is to generate UTF8-query during the parsing, store it in the object
and show it in the INFORMATION_SCHEMA.

Basically, the idea is to create a copy of the original query convert it to
UTF8. Character set introducers are removed and all text literals are
converted to UTF8.

This UTF8 query is intended to provide user-readable output. It must not be
used to recreate the object.  Specialized SHOW CREATE statements should be
used for this.

The reason for this limitation is the following: the original query can
contain symbols from several character sets (by means of character set
introducers).

Example:

  - original query:
    CREATE VIEW v1 AS SELECT _cp1251 'Hello' AS c1;

  - UTF8 query (for INFORMATION_SCHEMA):
    CREATE VIEW v1 AS SELECT 'Hello' AS c1;
2007-06-28 21:34:54 +04:00
unknown
741e527fa8 Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint


client/mysqldump.c:
  Auto merged
mysql-test/r/mysqldump.result:
  Merge from 5.0
2007-06-28 11:31:09 +02:00
msvensson@pilot.(none)
bf5ced4035 Merge pilot.(none):/data/msvensson/mysql/mysql-5.0-maint
into  pilot.(none):/data/msvensson/mysql/mysql-5.1-new-maint
2007-06-28 11:31:09 +02:00