Commit graph

3292 commits

Author SHA1 Message Date
unknown
30625323e9 Bug #34777 mysqlbinlog: --help output for --base64-output is hard to understand
Append the description of the 'decode-rows' value for --base64-output argument.
2009-10-28 15:04:06 +08:00
unknown
37743aedda Merge from mysql-5.0.87-release 2009-10-26 19:20:02 +01:00
Tatiana A. Nurnberg
5ef63a4f1c Bug#28141: Control C on query waiting on lock causes ERROR 1053 (server shutdown)
If a thread is killed in the server, we throw "shutdown" only if one is actually in
progress; otherwise, we throw "query interrupted".

Control-C in the mysql command-line client is "incremental" now.
First Control-C sends KILL QUERY (when connected to 5.0+ server, otherwise, see next)
Next  Control-C sends KILL CONNECTION
Next  Control-C aborts client.

As the first two steps only pertain to an existing query,
Control-C will abort the client right away if no query is running.

client will give more detailed/consistent feedback on Control-C now.


client/mysql.cc:
  Extends Control-C handling; enhances up feedback to user.
  
  On 5.0+ servers, we try to be nice and send KILL QUERY first
  if Control-C is pressed in the command-line client, but if
  that doesn't work, we now give the user the opportunity to
  send KILL CONNECTION with another Control-C (and to kill the
  client with another Control-C if that somehow doesn't work
  either).
mysql-test/t/flush_read_lock_kill.test:
  we're getting correct "thread killed" rather than
  "in shutdown" error now
mysql-test/t/kill.test:
  we're getting correct "thread killed" rather than
  "in shutdown" error now
mysql-test/t/rpl000001.test:
  we're getting correct "thread killed" rather than
  "in shutdown" error now
mysql-test/t/rpl_error_ignored_table.test:
  we're getting correct "thread killed" rather than
  "in shutdown" error now
sql/records.cc:
  make error messages on KILL uniform for rr_*()
  by folding that handling into rr_handle_error()
sql/sql_class.h:
  Only throw "shutdown" when we have one flagged as being in progress;
  otherwise, throw "query interrupted" as it's likely to be "KILL CONNECTION"
  or related.
2009-10-19 21:42:10 -07:00
Georgi Kodinov
88084d6763 merged 5.1-main-> 5.1-bugteam 2009-10-23 15:12:26 +03:00
Tatiana A. Nurnberg
495cde347b auto-merge 2009-10-20 20:37:33 -07:00
Tatiana A. Nurnberg
3f0d0d0633 manual merge of 28141 2009-10-20 11:00:07 -07:00
unknown
52db2f3646 Bug #34777 mysqlbinlog: --help output for --base64-output is hard to understand
There are some problems about help text:
- It is stated that "auto" is the default twice. It need be stated only once.
- It is stated that --base64-output is short for --base64-output=always. But that sounds
like the default is "always", not "auto".

Make the help text clear as following:
Determine when the output statements should be base64-encoded BINLOG 
statements: 'never' disables it and works only for binlogs without 
row-based events; 'auto' prints base64 only when necessary (i.e., 
for row-based events and format description events); 'always' prints 
base64 whenever possible. 'always' is for debugging only and should 
not be used in a production system. If this argument is not given, 
the default is 'auto'; if it is given with no argument, 'always' is used.
2009-10-20 13:16:09 +08:00
Bjorn Munch
72c96cbd0e merge from 5.1 main 2009-10-16 23:25:05 +02:00
Hery Ramilison
7df70d09a9 Added make targets 'test-bt-fast' and 'test-bt-debug-fast'
Put variable declaration at the beginning of a block
2009-10-15 00:40:40 +02:00
Georgi Kodinov
67113c2e29 merge 2009-10-14 17:36:11 +03:00
Kent Boortz
128e676c0d "MySQL Network" => "MySQL Enterprise" 2009-10-08 22:55:28 +02:00
Frazer Clement
c7470df2fe Merge 5.0-bugteam-> 5.1-bugteam 2009-10-08 16:36:36 +01:00
Frazer Clement
fd04391340 Fix compile break from bug#39663 fix 2009-10-08 16:23:15 +01:00
Bjorn Munch
9edd40c87e Bug #47218 mysqltest ignores "error" command inside if inside loop
This was affected by same problem as append_file etc.
Added Q_ERROR to special handling, and added small test
2009-10-08 11:30:03 +02:00
Frazer Clement
de985fc732 Merge 5.0-bugteam->5.1 bugteam 2009-10-05 13:57:59 +01:00
Frazer Clement
379d1f19ce Bug#39663 mysqltest: --enable_info, affected_rows and ps-protocol broken 2009-10-05 13:57:00 +01:00
Georgi Kodinov
370acc8b56 automerge 2009-10-04 12:15:05 +03:00
unknown
508527a94c Bug #46998 mysqlbinlog can't output BEGIN even if the database is included in a transaction
The 'BEGIN/COMMIT/ROLLBACK' log event could be filtered out if the
database is not selected by --database option of mysqlbinlog command.
This can result in problem if there are some statements in the
transaction are not filtered out.

To fix the problem, mysqlbinlog will output 'BEGIN/ROLLBACK/COMMIT' 
in regardless of the database filtering rules.

client/mysqlbinlog.cc:
  Skip the database check for BEGIN/COMMIT/ROLLBACK log events.
mysql-test/r/mysqlbinlog.result:
  Test result for bug#46998
mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test:
  The test case is updated duo to the patch of bug#46998
mysql-test/t/mysqlbinlog.test:
  Added test to verify if the 'BEGIN', 'COMMIT' and 'ROLLBACK' are output
  in regardless of database filtering
2009-09-30 10:31:25 +08:00
unknown
de04eb6c37 Bug #46998 mysqlbinlog can't output BEGIN even if the database is included in a transaction
The 'BEGIN/COMMIT/ROLLBACK' log event could be filtered out if the
database is not selected by --database option of mysqlbinlog command.
This can result in problem if there are some statements in the
transaction are not filtered out.

To fix the problem, mysqlbinlog will output 'BEGIN/ROLLBACK/COMMIT' 
in regardless of the database filtering rules.

client/mysqlbinlog.cc:
  Skip the database check for BEGIN/COMMIT/ROLLBACK log events.
mysql-test/r/mysqlbinlog.result:
  Test result for bug#46998
mysql-test/t/mysqlbinlog.test:
  Added test to verify if the 'BEGIN', 'COMMIT' and 'ROLLBACK' are output
  in regardless of database filtering
2009-09-30 10:01:52 +08:00
Joerg Bruehe
d609fdf98b Upmerge 5.0-build -> 5.1-build. 2009-09-28 11:07:31 +02:00
unknown
96665fd9cc BUG#43579 mysql_upgrade tries to alter log tables on replicated database
All statements executed by mysql_upgrade are binlogged and then are replicated to slave.
This will result in some errors. The report of this bug has demonstrated some examples.

Master and slave should be upgraded separately. All statements executed by
mysql_upgrade will not be binlogged. 
--write-binlog and --skip-write-binlog options are added into mysql_upgrade. 
These options control whether sql statements are binlogged or not.
2009-09-28 14:24:19 +08:00
Staale Smedseng
6a89842e36 Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2

Cleaning up warnings not present in 5.0.
2009-09-23 15:21:29 +02:00
Georgi Kodinov
9910148c72 automerge 2009-09-23 11:31:18 +03:00
Jim Winstead
8f4d1026de The mysql command line client ignored the --skip-column-names option
when used in conjunction with --vertical. (Bug #47147, patch by
Harrison Fisk)
2009-09-21 15:20:14 -07:00
Georgi Kodinov
4ac694822b automerge 2009-09-18 16:35:40 +03:00
Magnus Blåudd
58628cbbb4 Merge bug#42850 to 5.0 2009-09-28 14:40:20 +02:00
Joerg Bruehe
db89051656 Fix bug#46980
Option "--without-server" still not working in 5.1

The general approach is to make sure that source files
which require thread support are only compiled if the build
really needs thread support,
which means when the server is built or a thread-safe client
library.

This required several changes:
- Make sure the subdirectories "storage/" and "plugin/" are
  only processed if the server is built, not ifclient-only.
- Make the compilation of some modules which inherently
  require threading depend on thread supportin the build.
- Separate the handling of threading in "configure.in" from
  that of server issues, threading is also needed in a
  non-server build of a thread-safe client library.

Also, "libdbug" must get built even in a client-only build,
so "dbug/" must be in the list of client directories.

In addition, calls to thread functions in source files which
can be built without thread support must use the wrapper
functions which handle the non-threaded build.
So the modules "client/mysqlimport.c" and "client/mysqlslap.c"
must call "my_thread_end()" only via "mysql_thread_end()".


Makefile.am:
  The directories "storage/" and "plugin/" contain files
  which are needed for the server only, so their contents
  is to be built only if a server is built.
  
  They must not be named unconditionally, because building
  their contents will fail unless threads are enabled.
  
  These directories are now listed in the "configure"
  variable "sql_server_dirs" which becomes part of
  "sql_union_dirs" if the server is to be built.
client/mysqlimport.c:
  Use the wrapper function "mysql_thread_end()" which
  correctly handles the case of a non-threaded build.
client/mysqlslap.c:
  Use the wrapper function "mysql_thread_end()" which
  correctly handles the case of a non-threaded build.
configure.in:
  Various changes to support builds "--without-server":
  
  1) For the unit tests, we need "libdbug".
  
  2) Separate the treatment of the server from that of the
     thread-safe client library.
  
  3) Introduce an "automake conditional" "NEED_THREAD"
     which can be checked in some "Makefile.am".
  
  4) Include "storage/" and "plugin/" in the list of
     "sql_server_dirs" so that they are handled in the
     top "Makefile.am" only if the server is to be built
     (see the change in that file).
mysys/Makefile.am:
  The code of "mf_keycache.c" in 5.1 is no longer safe
  to be built without thread support.
  (In 5.0, this was possible.)
  
  Rather than fix these issues, which is tedious and risky,
  avoid the need to ever build it without thread support:
  It is needed in the server only, which needs thread support.
  
  The only case where we build a "libmysys" without thread
  support is for a non-threaded client, where "mf_keycache"
  is not neded.
  So its inclusion in the list of source files can depend
  on the new conditional "NEED_THREAD".
unittest/mysys/Makefile.am:
  Test program "my_atomic-t" is to verify the correct handling
  of threads only, it cannot be built without thread support
  and is not needed in such cases either.
  
  Let its build depend on the new conditional "NEED_THREAD".
2009-09-17 18:34:24 +02:00
Alexander Nozdrin
70972926ab A patch for Bug#45118 (mysqld.exe crashed in debug mode
on Windows in dbug.c) -- part 2: a patch for the DBUG subsystem
to detect misuse of DBUG_ENTER / DBUG_RETURN macros.
5.1 version.
2009-09-10 11:40:57 +04:00
hery
df1660986e change c++ comment to c comment 2009-09-09 20:52:17 +02:00
Satya B
482fdb5fc7 Addition to Fix for BUG#46591 - .frm file isn't sync'd with sync_frm enabled
for CREATE TABLE...LIKE...

Add my_sync.c to mysqltest sources list in CMakeLists.txt

client/CMakeLists.txt:
  BUG#46591 - .frm file isn't sync'd with sync_frm enabled
              for CREATE TABLE...LIKE...
  
  Add my_sync.c to mysqltest sources list
2009-09-04 11:19:44 +05:30
Satya B
2fc9c5d199 Fix for BUG#46591 - .frm file isn't sync'd with sync_frm enabled for
CREATE TABLE...LIKE...
      
The mysql server option 'sync_frm' is ignored when table is created with 
syntax CREATE TABLE .. LIKE.. 
      
Fixed by adding the MY_SYNC flag and calling my_sync() from my_copy() when
the flag is set.

In mysql_create_table(), when the 'sync_frm' is set, MY_SYNC flag is passed 
to my_copy(). 
      
Note: TestCase is not attached and can be tested manually using debugger.

client/Makefile.am:
  BUG#46591 - .frm file isn't sync'd with sync_frm enabled for 
              CREATE TABLE...LIKE...
      
  add my_sync to sources as it is used in my_copy() method
include/my_sys.h:
  BUG#46591 - .frm file isn't sync'd with sync_frm enabled for 
              CREATE TABLE...LIKE...
      
  MY_SYNC flag is added to call my_sync() method
mysys/my_copy.c:
  BUG#46591 - .frm file isn't sync'd with sync_frm enabled for 
              CREATE TABLE...LIKE...
      
  my_sync() is method is called when MY_SYNC is set in my_copy()
sql/sql_table.cc:
  BUG#46591 - .frm file isn't sync'd with sync_frm enabled for 
              CREATE TABLE...LIKE...
      
  Fixed mysql_create_like_table() to call my_sync() when opt_sync_frm variable
  is set
2009-09-03 16:02:03 +05:30
Bjorn Munch
31f9d5fd16 second merge from main, with adaptions 2009-09-02 23:29:11 +02:00
Bjorn Munch
a829604260 first merge from main 2009-09-02 18:58:17 +02:00
Bjorn Munch
fe3ea31d93 Bug #32296 mysqltest fails to parse "append_file" inside a "while", it works inside
a "if"
Bug #41913 mysqltest cannot source files from if inside while
Some commands require additional processing which only works first time
Keep content for write_file or append_file with the st_command struct
Add tests for those cases to mysqltest.test
2009-09-02 11:17:33 +02:00
Bjorn Munch
d4854d7494 merge 2009-09-01 19:31:28 +02:00
Tatiana A. Nurnberg
cf69196922 manual merge 2009-08-31 12:40:33 -07:00
Tatiana A. Nurnberg
d85148d84c Bug#35132: MySQLadmin --wait ping always crashes on Windows systems
Failing to connect would release parts of the MYSQL struct.
We would then proceed to try again to connect without re-
initializing the struct.

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


client/mysqladmin.cc:
  Losing a connection (or not even getting on in the first place) should
  not trash the MYSQL-struct.
  
  Add a lot of comments.
  
  Rewrite re-connection fu.
sql-common/client.c:
  Assert against bad parameters usually caused by de-initing a
  MYSQL-struct without re-initing it again before re-use.
2009-08-31 10:01:13 -07:00
Staale Smedseng
5be4c38226 Merge from 5.0 for 43414 2009-08-28 18:21:54 +02:00
Staale Smedseng
1ba25ae47c Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
      
This patch fixes a number of GCC warnings about variables used
before initialized. A new macro UNINIT_VAR() is introduced for
use in the variable declaration, and LINT_INIT() usage will be
gradually deprecated. (A workaround is used for g++, pending a
patch for a g++ bug.)
      
GCC warnings for unused results (attribute warn_unused_result)
for a number of system calls (present at least in later
Ubuntus, where the usual void cast trick doesn't work) are
also fixed.


client/mysqlmanager-pwgen.c:
  A fix for warn_unused_result, adding fallback to use of
  srand()/rand() if /dev/random cannot be used. Also actually
  adds calls to rand() in the second branch so that it actually
  creates a random password.
2009-08-28 17:51:31 +02:00
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
Bjorn Munch
d19eda4a9b Bug #39003 mtr's diff_files command failed in pushbuild without printing a result diff
diff was actually called but result never outputted before exiting
Added extra code to dump output *unless* failure was expected
2009-08-19 13:48:56 +02:00
Bjorn Munch
b9d1c04b79 Bug #46164 memory leak in mysqltest after parse error with --debug
Moved some dynstr_free() further up
2009-08-18 15:26:17 +02:00
Bjorn Munch
b742c771af Bug #44012 mtr: test cases that are not supposed to return output always fail
Output would match an empty result file but we don't check
Allow empty output IFF there is an empty result file.
2009-08-11 23:41:44 +02:00
Ignacio Galarza
09877515f2 Bug#17270 - mysql client tool could not find ../share/charsets folder and fails.
- Define and pass compile time path variables as pre-processor definitions to 
  mimic the makefile build.
- Set new CMake version and policy requirements explicitly.
- Changed DATADIR to MYSQL_DATADIR to avoid conflicting definition in 
  Platform SDK header ObjIdl.h which also defines DATADIR.
2009-07-31 15:22:02 -04: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
Ignacio Galarza
008dd95f70 Auto-merge 2009-07-31 15:28:15 -04: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
a90bcde091 Merge bug fix. 2009-07-30 17:51:25 -07:00
Jim Winstead
c754b00a1f The handling of NUL bytes in column data in the various output formats
supported by the mysql client was inconsistent. (Bug #28203)
2009-07-14 17:03:51 -07: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
Staale Smedseng
ab2f3dd2a2 Bug #43397 mysql headers redefine pthread_mutex_init
unnecessarily
      
The problem is that libmysqlclient.so is built with THREAD
undefined, while a client compiling against the same header
files will see THREAD as defined and definitions in
my_pthread.h will be included, possibly resulting in undefined
symbols that cannot be resolved with libmysqlclient.so.
      
The suggested solution is to require that clients wanting to
link with libmysqlclient.so should be built with
MYSQL_CLIENT_NO_THREADS defined. This requires a documentation
change, and more details for this will be supplied if this
patch is approved.
      
The MYSQL_CLIENT_NO_THREADS define was renamed from
UNDEF_THREADS_HACK, to get a more suitable (less suspicious)
name for the define. (The UNDEF_THREADS_HACK is retained for
backwards compatibility, though.)
      
This patch is also in anticipation of WL#4958, which will
remove this problem altogether by dropping the building of
libmysqlclient.
2009-07-08 16:49:45 +02: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
abfe915ac9 fixed compilation warnings on macosx 2009-07-07 16:11:46 +03:00
Kristofer Pettersson
5899e13a8e Bug#37274 client 'status' command doesn't print all info after losing connection to
server

If the server connection was lost during repeated status commands,
the client would fail to detect this and the client output would be inconsistent.

This patch fixes this issue by making sure that the server is online
before the client attempts to execute the status command.


client/mysql.cc:
  * Replace variable "connected" with a call to mysql_real_query_for_lazy()
    will attempt to reconnect to server on if there is a failure.
2009-07-03 13:55:45 +02:00
Luis Soares
38088ef6a4 merge: 5.1-bt bug branch --> 5.1-bt latest 2009-06-30 19:40:38 +01:00
Staale Smedseng
300a8721fa Merge from 5.0 2009-06-29 16:00:47 +02:00
Staale Smedseng
6777150883 Merge from 5.0-bt 2009-06-29 15:17:01 +02:00
Sergey Glukhov
9347649c16 Bug#44834 strxnmov is expected to behave as you'd expect
The problem: described in the bug report.
The fix:
--increase buffers where it's necessary
  (buffers which are used in stxnmov)
--decrease buffer lengths which are used


client/mysql.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/ha_ndbcluster.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/ha_ndbcluster_binlog.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/handler.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/log.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/mysqld.cc:
  removed unnecessary line
sql/parse_file.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/sql_acl.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/sql_base.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/sql_db.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/sql_delete.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/sql_partition.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/sql_rename.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/sql_show.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/sql_table.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
sql/sql_view.cc:
  --increase buffers where it's necessary
    (buffers which are used in stxnmov)
  --decrease buffer lengths which are used
    as argument for strxnmov function
2009-06-19 13:24:43 +05:00
Alexey Kopytov
de4d3f2b39 Automerge. 2009-06-17 16:37:10 +04:00
Alexey Kopytov
689901f36f Automerge. 2009-06-17 16:36:45 +04:00
Alexey Kopytov
736fa25e58 Automerge. 2009-06-17 15:50:50 +04:00
Alexey Kopytov
897a1b56d8 Bug #45236: large blob inserts from mysqldump fail, possible
memory issue ? 
 
The mysql command line client could misinterpret some character 
sequences as commands under some circumstances. 
 
The upper limit for internal readline buffer was raised to 1 GB 
(the same as for server's max_allowed_packet) so that any input 
line is processed by add_line() as a whole rather than in 
chunks.

client/mysql.cc:
  The upper limit for internal readline buffer was raised to 1 GB 
  (the same as for server's max_allowed_packet) so that any input 
  line is processed by add_line() as a whole rather than in 
  chunks.
mysql-test/r/mysql-bug45236.result:
  Added a test case for bug #45236.
mysql-test/t/mysql-bug45236.test:
  Added a test case for bug #45236.
2009-06-10 11:24:47 +04:00
Davi Arnaut
55eee5208c Merge from 5.1 main. 2009-06-08 09:55:37 -03:00
Luis Soares
1b1ca7fe38 BUG#42941: --database paramater to mysqlbinlog fails with RBR
mysqlbinlog --database parameter was being ignored when processing
row events. As such no event filtering would take place.
            
This patch addresses this by deploying a call to shall_skip_database
when table_map_events are handled (as these contain also the name of
the database). All other rows events referencing the table id for the
filtered map event, will also be skipped.

client/mysqlbinlog.cc:
  Added shall_skip_database call to the part of the code that handles 
  Table_map_log_events. It inspects the database name and decides whether
  to filter the event or not. Furthermore, if table map event is filtered
  next events referencing the table id in the table map event, will also
  be filtered.
mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_db_filter.test:
  Test case that checks if row events are actually filtered out.
sql/log_event.h:
  Added a map for holding the currently ignored table map events.
  Table map events are inserted when they shall be skipped and removed
  once the last row event in the statement is processed.
2009-06-07 23:28:08 +01:00
Tatiana A. Nurnberg
d7d61f59dd manual merge 2009-06-06 18:41:40 +02:00
Davi Arnaut
07547c7d4a Don't mix declarations and code (not widely portable).
client/mysqltest.c:
  Don't mix declarations and code.
  Tid up function code.
2009-06-06 12:26:39 -03:00
Georgi Kodinov
9ceb37269d merged 5.0-bugteam -> 5.1-bugteam 2009-06-05 19:40:36 +03:00
Georgi Kodinov
6010bd18ae automerge 2009-06-05 19:27:48 +03:00
Georgi Kodinov
07f33a21d7 Addendum to Bug #45286 : implement reviewer's remarks. 2009-06-05 19:23:44 +03:00
Georgi Kodinov
9c7d7d4ea2 Bug #43532 : backport of the 5.1 code to 5.0 mysqltest 2009-06-05 17:59:23 +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
5fc05b9528 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
Alexander Nozdrin
744373ecc0 Fix compilation failures: get rid of C++ specifics in C-code. 2009-06-03 15:18:12 +04:00
Tatiana A. Nurnberg
88e84c1fbf auto-merge 2009-05-29 18:49:35 +02:00
Alexey Kopytov
ca7a17dc31 Automerge 2009-05-29 18:08:16 +04:00
Bjorn Munch
cf6aeea48c merge from 5.1 main 2009-05-29 13:04:02 +02:00
Sergey Glukhov
0aa26d39aa 5.0-bugteam->5.1-bugteam merge 2009-05-28 13:40:09 +05:00
Sergey Glukhov
1b91400ac6 Bug#37268 'binary' character set makes CLI-internal commands case sensitive
The fix is to use case insensitive collation
for mysql client command search.



client/mysql.cc:
  The fix is to use case insensitive collation
  for mysql client command search.
mysql-test/r/mysql.result:
  test result
mysql-test/t/mysql.test:
  test case
2009-05-28 13:34:30 +05:00
Bjorn Munch
444bbe56f5 cherry picking fix for Bug #39542 from 6.0-runtime 2009-05-27 22:54:40 +02: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
Alexey Kopytov
808bed557e Bug #44638: mysql_upgrade, mysqlcheck output instance unclear
Dump all connection-related arguments when running mysqlcheck
from mysql_upgrade.

No test case, since the output depends on the test suite
configuration and platform.

client/mysql_upgrade.c:
  Dump all connection-related arguments when running mysqlcheck
  from mysql_upgrade.
2009-05-27 12:24:25 +04:00
Bjorn Munch
d07bef15c6 Bug #44964 mysqltest: connection <connection><some spaces>; fails now
Incorrection assumption about delimiter character in connection command
2009-05-26 12:45:14 +02:00
Bjorn Munch
b12bb225d1 Bug #44922 mysqltest's query_get_value function can't work with queries containing ','
check_command_args() always looks for the first , (or whatever)
Extended check_command_args() to let arguments be quoted
Added test in mysqltest.test
2009-05-25 17:19:20 +02:00
Jim Winstead
f0f4efd77e mysqlcheck failed to fix table names when using the --fix-table-names
and --all-in-1 options together. (Bug #31821)
2009-05-20 18:31:10 -07:00
Jim Winstead
d57bb98ff5 mysqladmin --count=X --sleep=Y would always delay Y seconds after the last
iteration before exiting. (Bug #42639)
2009-05-20 17:25:10 -07:00
Jim Winstead
1e9a02c943 The mysql command-line client would include superfluous spaces at the end of
some result set lines. (Bug #29622)
2009-05-20 17:04:44 -07:00
Jim Winstead
50e7c39112 Fix warning in use of strlen(). 2009-05-20 12:58:01 -07:00
Jim Winstead
1c9e45c3c4 Table identifiers and file names were not quoted and escaped correctly by
mysqlimport. (Bug #28071)
2009-05-19 15:26:57 -07:00
Jim Winstead
86dc69e045 mysql_upgrade ignored the --basedir and --datadir arguments as it has no use
for them, but it did so silently. (Bug #36558)
2009-05-19 10:39:03 -07:00
Jim Winstead
e2808aa217 The mysql command-line client didn't implement the readline magic-space
command, which bash does, which could result in a user accidentally disabling
the use of the space key in the mysql command-line client. (Bug #27439)
2009-05-19 10:17:05 -07:00
Jim Winstead
9796aec876 mysqlslap didn't correctly handle --csv with no argument. (Bug #44412) 2009-05-18 18:23:43 -07:00
Jim Winstead
1f6fa46b7a mysqladmin did not have enough space allocated for tracking all variables
when using --vertical or --relative with extended-status. (Bug #40395)

  This patch simply increases the buffer size and adds an assert to
  check that it is big enough -- a more comprehensive fix would dynamically
  allocate the appropriate buffers.
2009-05-18 14:19:18 -07:00
Jim Winstead
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
2a4e1220c8 Add usage for --base64-output=DECODE-ROWS and note that UNSPEC is
intentionally unmentioned (it is just a placeholder). (Bug #41403)
2009-05-15 13:25:22 -07:00
Jim Winstead
261238b924 Remove out-of-date and unnecessary comment in source code about what versions
are supported. (Bug #42021)
2009-05-15 13:12:20 -07:00
Jim Winstead
c65ebb5d13 Merge from 5.0-bugteam 2009-05-12 14:20:33 -07:00
Jim Winstead
eae91cc781 mysqlimport was not always compiled correctly to allow thread support,
required for the --use-threads option. (Bug #32991)
2009-05-12 10:45:40 -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