Commit graph

3152 commits

Author SHA1 Message Date
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
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
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
Jim Winstead
c65ebb5d13 Merge from 5.0-bugteam 2009-05-12 14:20:33 -07:00
Jim Winstead
4161dc49b3 Merge from 5.0-bugteam 2009-05-13 08:48:00 -07:00
Jim Winstead
10611fe61b Merge in approved bug-fixes 2009-05-12 14:27:19 -07:00
Alexey Kopytov
c63a916dce Automerge. 2009-05-08 21:50:04 +04:00
Alexey Kopytov
5390ad33f9 Manual merge. 2009-05-08 21:24:15 +04:00
Jim Winstead
464252a25b The mysql command-line client did not properly handle MYSQL_HISTFILE being set
to an empty string, or to /dev/null, as we suggest and have suggested in the
documentation. (Bug #34224)
2009-05-07 17:48:20 -07:00
Jim Winstead
9345dbba6f mysqladmin kill can't handle 64-bit thread IDs. (Bug #32457) 2009-05-07 13:09:53 -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
3fe1d299ec Fix support for -i (--ignore-spaces) in the mysql command line application,
which didn't actually do anything. (Bug #39101)
2009-05-07 10:28:29 -07:00
Alexey Kopytov
c0cd2742af Bug #41943: mysqlbinlog.exe crashes if --hexdump option is used
The --hexdump option crashed mysqlbinlog when used together  
with the --read-from-remote-server option due to use of  
uninitialized memory.  
  
Since Log_event::print_header() relies on temp_buf to be  
initialized when the --hexdump option is present,  
dump_remote_log_entries() was fixed to setup temp_buf to point  
to the start of a binlog event as done in  
dump_local_log_entries().  
 
The root cause of this bug is identical to the one for 
bug #17654. The latter was fixed in 5.1 and up, so this 
patch is backport of the patches for bug #17654 to 5.0. 
 
Only 5.0 needs a changelog entry. 

client/mysqlbinlog.cc:
  Fixed dump_remote_log_entries() so that temp_buf is initialized 
  as it may be used later by Log_event::print_header() if the 
  --hexdump option is present.
mysql-test/r/mysqlbinlog.result:
  Added a test case for bug #41943.
mysql-test/t/mysqlbinlog.test:
  Added a test case for bug #41943.
2009-05-07 18:31:02 +04:00
Jim Winstead
39e4b5ebd2 Remove extraneous space in --debug-check usage info. 2009-04-28 11:30:21 -07:00
Jim Winstead
23116951ae Make SSL options appear in correct place in mysql_upgrade and mysqltest
usage information. (Bug #31883)
2009-04-28 11:26:31 -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
fb2d75cb75 Bug #27884: mysql --html does not quote HTML special characters in output
Fix encoding of field values and names in HTML output from mysql client.
2009-04-28 10:54:26 -07:00
Sergey Glukhov
3819daf064 Bug#41268 Help Text for \c is misleading in client command line interface(addon)
fixed message for 'help' command


client/mysql.cc:
  fixed message for 'help' command
2009-04-14 19:16:30 +05:00
Sergey Glukhov
f739349994 5.0-bugteam->5.1-bugteam merge 2009-04-14 19:17:44 +05:00
He Zhenxing
3b4ec32d45 Fix compile error on windows for BUG#37145 on 5.0-bugteam 2009-04-09 16:58:18 +08:00
He Zhenxing
3308a7f2fd post fix compiling problem after push BUG#37145 to 5.0-bugteam 2009-04-09 15:42:59 +08:00
He Zhenxing
51a9116638 BUG#37145 Killing a statement doing DDL may log binlog event with error code 1053
When the thread executing a DDL was killed after finished its
execution but before writing the binlog event, the error code in
the binlog event could be set wrongly to ER_SERVER_SHUTDOWN or
ER_QUERY_INTERRUPTED.

This patch fixed the problem by ignoring the kill status when
constructing the event for DDL statements.

This patch also included the following changes in order to
provide the test case.

 1) modified mysqltest to support variable for connection command

 2) modified mysql-test-run.pl, add new variable MYSQL_SLAVE to
    run mysql client against the slave mysqld.
2009-03-27 13:19:50 +08:00
Georgi Kodinov
c36e935ac2 merged 5.0-bugteam -> 5.1-bugteam 2009-03-24 15:58:52 +02:00
Sergey Glukhov
9a561879c5 remove compiler warnings 2009-03-23 16:51:39 +04:00
Georgi Kodinov
84557d4423 merged 5.1-main -> 5.1-bugteam 2009-03-23 11:36:39 +02:00
Tatiana A. Nurnberg
aeb9747a95 auto-merge 2009-03-23 05:21:45 +01:00
Tatiana A. Nurnberg
2e4ac39640 auto-merge 2009-03-23 05:09:51 +01:00
Tatiana A. Nurnberg
4093dcfb03 Bug#43254: SQL_SELECT_LIMIT=0 crashes command line client
When asking what database is selected, client expected
to *always* get an answer from the server.

We now handle failure more gracefully.

See comments in ticket for a discussion of what happens,
and how things interlock.


client/mysql.cc:
  Handle empty result-sets gracefully, as opposed
  to just result sets with n>0 items that may themselves
  be empty.
2009-03-23 05:08:32 +01:00
Tatiana A. Nurnberg
a9c1df9398 auto-merge 2009-03-20 19:10:12 +01:00
Georgi Kodinov
e8cc09dc8d fixed compilation warnings. addendum to the fix for bug 29125 2009-03-20 16:27:53 +02:00
Tatiana A. Nurnberg
6f572a8eaf Bug#43153: Version comment is too long
mysql-client used static buffer to concatenate server-
version and version_comment. Sufficiently long comments
could get cut off. This was harmless, but looked daft.

Now using a dynamic buffer instead.

client/mysql.cc:
  Use dynamic rather than static buffer for server
  information. If we can get both version and comment,
  concat them and use that. Otherwise, try to use just
  version. If that fails too, return empty string so
  overly trusting callers do not crash. Release memory
  as needed.
2009-03-19 18:42:43 +01:00
Ignacio Galarza
868db2f21d 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
675c3ce2bb auto-merge 2009-03-19 09:44:58 -04:00
Magnus Svensson
776bb04abf Merge 2009-03-19 12:42:55 +01:00
Sergey Glukhov
2ea2cc02c3 5.0-bugteam->5.1-bugteam merge 2009-03-19 13:26:12 +04:00
Satya B
5c49e6ebb3 Merge 5.0-bugteam to 5.1-bugteam 2009-03-19 14:19:51 +05:30
Sergey Glukhov
173ea364c8 automerge 2009-03-19 12:42:26 +04:00
Sergey Glukhov
8c7789c313 Bug#41268 Help Text for \c is misleading in client command line interface
fixed help message


client/mysql.cc:
  fixed help message
2009-03-19 12:37:34 +04:00
Satya B
322fe7419f merge to 5.0-bugteam 2009-03-19 13:53:24 +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
Bjorn Munch
9f32fdd9e2 merge from main 2009-03-18 13:44:05 +01:00
Alexey Kopytov
da7dc30371 Automerge. 2009-03-18 11:35:52 +03:00
Alexey Kopytov
73a7d99331 Fix for bug#41486: extra character appears in BLOB for every
~40Mb after mysqldump/import 
        
When the input string exceeds the maximum allowed size for the 
internal buffer, batch_readline() returns a truncated string. 
Since there was no way for a caller to determine whether the 
string was truncated or not, the command line client assumed 
batch_readline() to always return the whole input string and 
appended a newline character. This resulted in garbled data 
when importing dumps containing strings longer than the 
maximum input buffer size. 
  
Fixed by adding a flag to the batch_readline() interface to 
signal a truncated string to the caller. 
  
Other minor problems fixed during patch implementation: 
 
- The maximum allowed buffer size for batch_readline() was set 
up depending on the client's max_allowed_packet value. It does 
not actully make any sense, as those variables are not 
related. The input buffer size limit is now always set to 1 
MB. 
  
- fill_buffer() did not always set the EOF flag. 
 
- The input buffer could actually grow twice as the specified 
limit due to insufficient checks in intern_read_line(). 

client/my_readline.h:
  Changed the interface of batch_readline().
client/mysql.cc:
  Honor the truncated flag returned by batch_readline() and do  
  not append the newline character if it was set. Since we can't 
  change the interfaces for readline()/fgets() used in the  
  interactive mode, always assume the returned string was not  
  truncated. In addition, always set the batch_readline()  
  internal buffer to 1 MB, independently from the client's  
  max_allowed_packet.
client/readline.cc:
  Added the 'truncated' argument do batch_readline() to signal 
  truncated string to a caller. 
  Fixed fill_buffer() to set the EOF flag correctly. 
  Fixed checks in intern_read_line() to not allow the internal  
  buffer grow past the specified limit.
mysql-test/r/mysql.result:
  Added a test case for bug #41486.
mysql-test/t/mysql.test:
  Added a test case for bug #41486.
2009-03-18 11:18:24 +03:00