Commit graph

627 commits

Author SHA1 Message Date
Jim Winstead
337a20a800 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
8a43356fac Remove extraneous space in --debug-check usage info. 2009-04-28 11:30:21 -07:00
Jim Winstead
345040a025 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
c0db307e28 5.0-bugteam->5.1-bugteam merge 2009-04-14 19:17:44 +05: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
Tatiana A. Nurnberg
8aff42f6a0 auto-merge 2009-03-23 05:21:45 +01:00
Tatiana A. Nurnberg
deb566d6b3 auto-merge 2009-03-23 05:09:51 +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
Tatiana A. Nurnberg
dc1e9bfb56 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.
2009-03-19 18:42:43 +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
e55b1424af 5.0-bugteam->5.1-bugteam merge 2009-03-19 13:26:12 +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
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
Alexey Kopytov
fefff5e496 Manual merge. 2009-03-18 11:27:49 +03:00
Georgi Kodinov
1a292ee535 merged bug 31060 to 5.1-bugteam 2009-02-25 11:09:41 +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
Georgi Kodinov
5cc8c6f380 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
d16c7dd182 automerge 2009-02-24 09:33:04 +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
4c45c68e08 merge of bug 26724 to 5.1-bugteam 2009-02-18 12:26:11 +02: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
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
6387fe92ea merged 5.0-bugteam -> 5.1-bugteam 2009-02-10 16:26:18 +02: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
Alfranio Correia
7b6ff85e43 BUG#36391: "mysqlbinlog creates invalid charset statements"
The fix for BUG#20103 "Escaping with backslash does not work as expected"
was implemented too greedy though in that it not only changes the behavior
of backslashes within strings but in general, so disabling command shortcuts
like \G or \C (which in turn leads to Bug #36391: "mysqlbinlog creates invalid charset
statements").
      
The fix allows the escaping with backslash to take place only inside a string, 
thus enabling the execution of command shortcuts and presevering the fix for
BUG#20103.
2009-01-27 20:49:37 +00:00
Georgi Kodinov
8c25823f94 merged 5.1-main -> 5.1-bugteam 2009-01-05 18:10:20 +02:00
Chad MILLER
14f2ce6dbd Merge fix for Bug 33812 from 5.0-bugteam. 2008-12-11 12:46:20 -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
Joerg Bruehe
c7d03ca35b Merge main 5.1 into 5.1-build 2008-12-10 21:14:50 +01:00
Vladislav Vaintroub
4dfbf2ec93 Bug#38522: 5 seconds delay when closing application using embedded server
The problem here is that embedded server starts handle_thread manager 
thread  on mysql_library_init() does not stop it on mysql_library_end().
At shutdown, my_thread_global_end() waits for thread count to become 0,
but since we did not stop the thread it will give up after 5 seconds.
             
Solution is to move shutdown for handle_manager thread from kill_server()
(mysqld specific) to clean_up() that is used by both embedded and mysqld.
            
This patch also contains some refactorings - to avoid duplicate code,
start_handle_manager() and stop_handle_manager() functions are introduced.
Unused variables are eliminated. handle_manager does not rely on global
variable abort_loop anymore to stop (abort_loop is not set for embedded).
            
Note: Specifically on Windows and when using DBUG version of libmysqld, 
the complete solution requires removing obsolete code my_thread_init() 
from my_thread_var(). This has a side effect that a DBUG statement 
after my_thread_end() can cause thread counter to be incremented, and 
embedded will hang for some seconds. Or worse, my_thread_init() will 
crash if critical sections have been deleted by the global cleanup 
routine that runs in a different thread. 

This patch also fixes and revert prior changes for Bug#38293 
"Libmysqld crash in mysql_library_init if language file missing".

Root cause of the crash observed in Bug#38293  was bug in my_thread_init() 
described above
2008-12-04 19:41:53 +01:00
kent.boortz@sun.com
906e12124c Changes of copyright output from "--version" and similar.
Changes of copyright in RPM spec file.
2008-11-14 17:29:38 +01:00
Georgi Kodinov
38dcc057c2 merge of 38158 to 5.1-bugteam 2008-07-18 15:00:45 +03:00
Georgi Kodinov
5c256ec67a Bug 38158: mysql client regression, can't read dump files
- Revert the fix for bug 33812
- fixed a win32 warning
2008-07-18 13:24:59 +03:00
Gleb Shchepa
f3978f77cb auto merge 5.0-bugteam --> 5.1-bugteam 2008-06-24 21:15:00 +05:00
Gleb Shchepa
748a9b1a4b back-port from 5.1.
Bug#35480: BOM detection code crashes mysql CLI with zero-sized input
      
MySQL client crashed if no input was passed to it.
2008-06-24 21:05:56 +05:00
Gleb Shchepa
9ffe2c02bf back-port from 5.1.
Bug#33812: mysql client incorrectly parsing DELIMITER
      
Remove unnecessary and incorrect code that tried
to pull delimiter commands out of the middle of
statements.
2008-06-24 21:03:17 +05:00
Gleb Shchepa
7ad63a7202 Bug #36244: MySQL CLI doesn't recognize standalone --
as a commentary

mysql client has been modified to interpret EOL after
standalone -- commentary strings like whitespace
character (according to
http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-comments.html)
2008-06-24 19:32:06 +05:00
iggy@amd64.(none)
09a2292d3f Merge amd64.(none):/src/bug26243/my50-bug26243
into  amd64.(none):/src/bug26243/my51-bug26243
2008-03-28 14:20:21 -04:00
iggy@amd64.(none)
79e434bc67 Bug#26243 mysql command line crash after control-c
- Backported the 5.1 DBUG to 5.0.
- Avoid memory cleanup race on Windows client for CTRL-C
2008-03-28 14:02:27 -04: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
kaa@kaamos.(none)
d0eb90501d Merge kaamos.(none):/data/src/mysql-5.0
into  kaamos.(none):/data/src/opt/mysql-5.0-opt
2008-03-12 10:59:15 +03:00
holyfoot/hf@hfmain.(none)
b727a22d97 Merge mysql.com:/home/hf/work/25097/my50-25097
into  mysql.com:/home/hf/work/25097/my51-25097
2008-02-27 13:00:59 +04:00
holyfoot/hf@mysql.com/hfmain.(none)
140ca59538 Bug #25097 mysql_server_init fails silently if no errmsg.sys is present.
There was no way to return an error from the client library
if no MYSQL connections was established.
So here i added variables to store that king of errors and
made functions like mysql_error(NULL) to return these.
2008-02-27 12:42:43 +04:00
cmiller@zippy.cornsilk.net
1f13c62225 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug24624/my50-bug24624
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug24624/my51-bug24624
2008-01-30 18:15:00 -05:00
cmiller@zippy.cornsilk.net
806ff0187d Bug#24624: MySQL client ignores its own completion table
Nothing was in the command-line dictionary, because of the wrong 
order of instructions when populating it.

This is a smaller, less optimistic patch that both fixes a bug and
refreshes the list of keywords that the command-line library (e.g., 
readline) can use to expand typed commands.  Now, read from the 
command list /after/ we free the list, not before.

The best way is to read the keywords from the lexer code, but that
doesn't work everywhere yet.  Grr.
2008-01-30 16:51:39 -05:00
cmiller@zippy.cornsilk.net
c173a217d5 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-build
2008-01-29 18:24:38 -05:00
cmiller@zippy.cornsilk.net
3e23741bc6 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-build
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-build
2008-01-29 18:23:40 -05:00
cmiller@zippy.cornsilk.net
b040a97c2a Bug#33841: mysql client crashes when returning results for long-\
running queries

Bug#33976: buffer overflow of variable time_buff in function com_go()

An internal buffer was too short.  Overextending could smash the 
stack on some architectures and cause SEGVs.  This is not a problem
that could be exploited to run arbitrary code.

To fix, I expanded one buffer to cover all the size that could be
written to (we know the abolute max).
2008-01-25 10:53:21 -05:00
kaa@kaamos.(none)
0cec5f8e4b Merge kaamos.(none):/data/src/mysql-5.1
into  kaamos.(none):/data/src/opt/mysql-5.1-opt
2008-01-10 20:44:23 +03:00