Commit graph

2206 commits

Author SHA1 Message Date
Staale Smedseng
19dfaa5824 Merge from 5.0-bt 2009-06-29 15:17:01 +02:00
Alexey Kopytov
9c1e2bbcf6 Automerge. 2009-06-17 16:36:45 +04:00
Alexey Kopytov
08410f34dd 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.
2009-06-10 11:24:47 +04:00
Davi Arnaut
82d2797d0a Don't mix declarations and code (not widely portable). 2009-06-06 12:26:39 -03:00
Georgi Kodinov
b311cb83f2 automerge 2009-06-05 19:27:48 +03:00
Georgi Kodinov
c6fdeff0c7 Addendum to Bug #45286 : implement reviewer's remarks. 2009-06-05 19:23:44 +03:00
Georgi Kodinov
7787dee76a Bug #43532 : backport of the 5.1 code to 5.0 mysqltest 2009-06-05 17:59:23 +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
Sergey Glukhov
394f6ba478 Bug#37268 'binary' character set makes CLI-internal commands case sensitive
The fix is to use case insensitive collation
for mysql client command search.
2009-05-28 13:34:30 +05:00
Jim Winstead
6cbe3ef3f9 Merge from 5.0-bugteam 2009-05-12 14:20:33 -07:00
Jim Winstead
0ba8aa103e 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
025ca02f28 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.
2009-05-07 18:31:02 +04:00
Sergey Glukhov
04ee3f2ffa Bug#41268 Help Text for \c is misleading in client command line interface(addon)
fixed message for 'help' command
2009-04-14 19:16:30 +05:00
He Zhenxing
b6e8991cd1 Fix compile error on windows for BUG#37145 on 5.0-bugteam 2009-04-09 16:58:18 +08:00
He Zhenxing
74a332d504 post fix compiling problem after push BUG#37145 to 5.0-bugteam 2009-04-09 15:42:59 +08:00
He Zhenxing
9530126822 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
Sergey Glukhov
1cff5b9c53 remove compiler warnings 2009-03-23 16:51:39 +04:00
Tatiana A. Nurnberg
8aff42f6a0 auto-merge 2009-03-23 05:21:45 +01:00
Tatiana A. Nurnberg
e5a599bd73 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.
2009-03-23 05:08:32 +01:00
Ignacio Galarza
5d13d4f34e auto-merge 2009-03-19 09:58:56 -04:00
Ignacio Galarza
e82390130e auto-merge 2009-03-19 09:44:58 -04:00
Sergey Glukhov
a910db2b91 automerge 2009-03-19 12:42:26 +04:00
Sergey Glukhov
28d6b77c23 Bug#41268 Help Text for \c is misleading in client command line interface
fixed help message
2009-03-19 12:37:34 +04:00
Satya B
6ca68ad189 merge to 5.0-bugteam 2009-03-19 13:53:24 +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
Alexey Kopytov
5315ffa7fa Automerge. 2009-03-18 11:35:52 +03:00
Alexey Kopytov
a3e5737abd 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().
2009-03-18 11:18:24 +03:00
Chad MILLER
8725bcd944 Merge bug fix and upstream. 2009-03-12 13:32:13 -04:00
Chad MILLER
6b72857803 Merge from bugfix tree. 2009-03-10 12:53:43 -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
0693a99cfd Fix non-DBUG return. 2009-03-09 16:56:46 -04:00
Georgi Kodinov
5b9a33aafe Bug #42434: license of mysys MD5 implementation is not GPL-compatible
Took the Xfree implementation (based on the same rewrite as the NDB one)
and added it instead of the current implementation.
Added a macro to make the calls to MD5 more streamlined.
2009-03-09 20:57:03 +02:00
Georgi Kodinov
13ec76b0ad Bug #31060: MySQL CLI parser bug 2
There was a problem when a DELIMITER COMMAND is not the first 
command on the line. I this case an extra line feed was added
to the glob buffer and this was causing subsequent attempts 
to enter this delimiter to fail.
Fixed by not adding a new line to the glob buffer if the 
command being added is a DELIMITER
2009-02-24 15:06:28 +02:00
Tatiana A. Nurnberg
1fbfd317d6 automerge 2009-02-24 09:31:42 +01:00
Tatiana A. Nurnberg
f218f9f278 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-19 17:33:28 +01:00
Tatiana A. Nurnberg
11ff14d5b1 Bug#37400: mysql: Bad help message for charset command
Typo existed in help-text for command "charset" in mysql
client, making the parameter-name different for long and
short forms of the command for no good reason.

Fixed.
2009-02-19 04:58:10 +01:00
Georgi Kodinov
2202d5b7f5 Bug #26724: mysql command line client, ignores input to internal cmd after space
Removed the misleading "NOTE:" from the \h command.
2009-02-18 12:18:38 +02:00
Alexey Kopytov
9d21ff1148 Merge from dev tree. 2009-02-14 12:09:35 +03:00
Alexey Kopytov
ccd5a4dc46 Merge from dev tree. 2009-02-13 19:17:07 +03: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
Georgi Kodinov
773b18e69a From jperkin : Merge libedit 2.11 and related files,
based on NetBSD CVS as of 2009/02/06 20:09:00.
2009-02-10 14:39:14 +02:00
Alexey Kopytov
a715b70278 Fix for bug #41868: crash or memory overrun with concat + upper,
date_format functions

String::realloc() did not check whether the existing string data fits in
the newly allocated buffer for cases when reallocating a String object
with external buffer (i.e.alloced == FALSE).  This could lead to memory
overruns in some cases.
2009-02-10 15:38:56 +03: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
Alexey Kopytov
30ac49019d Fix for bug #21205: Different number of digits for float/double/real in --ps-protocol
Various parts of code used different 'precision' arguments for sprintf("%g") when converting
floating point numbers to a string. This led to differences in results in some cases 
depending on whether the text-based or prepared statements protocol is used for a query.

Fixed by changing arguments to sprintf("%g") to always be 15 (DBL_DIG) so that results are
consistent regardless of the protocol.

This patch will be null-merged to 6.0 as the problem does not exists there (fixed by the
patch for WL#2934).
2009-01-28 20:59:08 +03:00
Bjorn Munch
e08d21b708 Bug #42216 mysqltest: Use of diff belonging to current OS, with wrong option for Solaris
Check for existence of diff fails on Solaris due to unsupported "-v"
Fix is to do this check only on Windows where it was needed
2009-01-28 14:14:05 +01:00
Georgi Kodinov
06b3e7e21d fixed a compile warning 2009-01-09 20:30:55 +02:00
Patrick Crews
ece07248f4 Bug#38833: mysql-test-run needs diff. Problem w/ error handling in calling diff on Windows.
Added function to check for diff and return an error message if the utility is not present.
Previously, the way we did this didn't work on Windows, but did work on *Nix systems.
2009-01-05 12:10:22 -05:00
Chad MILLER
cf9126a034 Bug#33812: mysql client incorrectly parsing DELIMITER
Fix parsing of mysql client commands, especially in relation to
single-line comments when --comments was specified.

This is a little tricky, because we need to allow single-line
comments in the middle of statements, but we don't want to allow
client commands in the middle of statements. So in
comment-preservation mode, we go ahead and send single-line
comments to the server immediately when we encounter them on their
own. 

This is still slightly flawed, in that it does not handle a
single-line comment with leading spaces, followed by a client-side
command when --comment has been enabled. But this isn't a new
problem, and it is quite an edge condition. Fixing it would require
a more extensive overall of how the mysql client parses commands.
2008-12-11 12:26:03 -05:00
Ramil Kalimullin
e0d5a6c15f Fix for bug#37527: mysqlcheck fails to report entire database
when InnoDB frm file corruption

Problem: mysqlcheck runs 'SHOW FULL TABLE' queries to get table lists.
The query may fail for some reasons (e.g. null .frm file) then
mysqlcheck doesn't process the database tables.

Fix: try to run 'SHOW TABLES' if 'SHOW FULL TABLES' failed.
2008-11-14 11:40:46 +04: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