Commit graph

627 commits

Author SHA1 Message Date
ramil/ram@mysql.com/myoffice.izhnet.ru
a072688eea Fix for bug #22913: mysql --quick doesn't report some errors.
We don't check for errors that may occur during data printing.
2006-11-02 14:32:00 +04:00
msvensson@neptunus.(none)
7946e8c3c8 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-10-26 20:11:13 +02:00
msvensson@neptunus.(none)
74a29e5db4 Bug#20894 Reproducible MySQL client segmentation fault
- Add two null bytes in  "buff" variable allowing us to call
   get_arg two times also for strings longer than sizeof(buff)
2006-10-26 19:51:29 +02:00
cmiller@zippy.cornsilk.net
6a870d4cfc Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug17583/my50-bug17583
2006-10-09 18:54:48 -04:00
cmiller@zippy.cornsilk.net
0ab343a7dc Merge bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug17583/my41-bug17583
2006-10-09 18:53:17 -04:00
cmiller@zippy.cornsilk.net
681acdf055 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug17583/my50-bug17583
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug17583/my51-bug17583
2006-10-09 18:51:02 -04:00
cmiller@zippy.cornsilk.net
4d0023edf6 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug17583/my41-bug17583
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug17583/my50-bug17583
2006-10-09 18:46:28 -04:00
cmiller@zippy.cornsilk.net
4812d81eab Bug#17583: mysql drops connection when stdout is not writable
When the client program had its stdout file descriptor closed by the calling
shell, after some amount of work (enough to fill a socket buffer) the server 
would complain about a packet error and then disconnect the client.

This is a serious security problem.  If stdout is closed before the mysql is
exec()d, then the first socket() call allocates file number 1 to communicate
with the server.  Subsequent write()s to that file number (as when printing
results that come back from the database) go back to the server instead in 
the command channel.  So, one should be able to craft data which, upon being
selected back from the server to the client, and injected into the command
stream become valid MySQL protocol to do something nasty when sent /back/ to 
the server.

The solution is to close explicitly the file descriptor that we *printf() to, 
so that the libc layer and the OS layer both agree that the file is closed.
2006-10-09 18:28:06 -04:00
msvensson@neptunus.(none)
237779218c Merge bk-internal:/home/bk/mysql-5.1-new-rpl
into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
2006-10-03 15:56:56 +02:00
msvensson@neptunus.(none)
3f8edc3706 Merge bk-internal:/home/bk/mysql-5.0-rpl
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-10-03 14:24:43 +02:00
bar@bar.intranet.mysql.r18.ru
3cfbe36adc After merge fix 2006-10-03 16:00:09 +05:00
jpipes@shakedown.(none)
b57051381a Fix for Bug #21412 (client allows DELIMITER with backslash character) 2006-10-02 11:45:48 -04:00
tsmith/tim@siva.hindu.god
5ceadf8987 Merge siva.hindu.god:/usr/home/tim/m/bk/wl3516/50
into  siva.hindu.god:/usr/home/tim/m/bk/wl3516/51
2006-09-29 14:12:57 -06:00
tsmith/tim@siva.hindu.god
b7d0ec2422 WL #3516: MySQL Enterprise: implement Version Display Specification
Print version_comment after server version in:
mysql.cc:  Welcome message and 'status' command output
log.cc: Top of log files
2006-09-29 12:52:48 -06:00
bar@mysql.com/bar.intranet.mysql.r18.ru
8b0f82b9b8 Bug#21263 mysql client XML output does not distinguish between NULL and string 'NULL'
Fix: "mysql --xml" now print NULL values the same way that "mysqldump --xml" does:
  
    <field name="name" xsi:nil="true" />
  
  to distinguish from empty strings:
  
    <field name="name"></field>
  
  and from string "NULL":
  
    <field name="name">NULL</field>
2006-09-29 16:29:39 +05:00
cmiller@zippy.cornsilk.net
6042eebda6 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2006-09-28 07:35:04 -04:00
cmiller@zippy.cornsilk.net
ca7ade8825 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-09-28 07:30:24 -04:00
ramil/ram@mysql.com/myoffice.izhnet.ru
7f410eed5e Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/usr/home/ram/work/bug21142/my41-bug21142
2006-09-18 09:06:05 +05:00
cmiller@zippy.cornsilk.net
4cb1fdfb35 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug21618/my50-bug21618
into  zippy.cornsilk.net:/home/cmiller/work/mysql/bug21618/my51-bug21618
2006-09-14 09:56:06 -04:00
cmiller@zippy.cornsilk.net
ebf4d199df Merge zippy.cornsilk.net:/home/cmiller/work/mysql/bug21618/my50-bug21618
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
2006-09-14 09:21:09 -04:00
cmiller@zippy.cornsilk.net
94382c313a Bug #21618: NULL shown as empty string in client
The column's NOT NULL flag doesn't affect what we should print.  Remove the
wrong logic that does check it.

Also, verify that this and the previous two tests print the same data as 
other output formats.
2006-09-13 11:41:41 -04:00
cmiller@zippy.cornsilk.net
d58cd1de27 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0-maint
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
2006-09-05 17:03:58 -04:00
tsmith@maint2.mysql.com
e2f40aa6d0 Merge maint2.mysql.com:/data/localhome/tsmith/bk/41
into  maint2.mysql.com:/data/localhome/tsmith/bk/50
2006-09-01 08:53:56 +02:00
ramil/ram@mysql.com/myoffice.izhnet.ru
f25b8f20d2 Fix for bug #21142: Malformed insert causes a segmentation fault.
- possible stack overflow fixed.
2006-08-29 14:38:02 +05:00
tnurnberg@salvation.intern.azundris.com
d847e46c1a Merge salvation.intern.azundris.com:/home/tnurnberg/mysql-5.1
into  salvation.intern.azundris.com:/home/tnurnberg/mysql-5.1-maint
2006-08-28 19:35:25 +02:00
brian@zim.(none)
7216b5bc7a Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1
into  zim.(none):/home/brian/mysql/arch-5.1
2006-08-25 14:07:30 -07:00
iggy@rolltop.ignatz42.dyndns.org
a21ec5dbd4 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.0-maint_11972
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-5.1-new-maint_11972
2006-08-24 15:03:33 -04:00
iggy@rolltop.ignatz42.dyndns.org
8bc745456f Bug #11972: client uses wrong character set after reconnect.
The mysql client uses the default character set on reconnect.  The default character set is now controled by the client charset command while the client is running.  The charset command now also issues a SET NAMES command to the server to make sure that the client's charset settings are in sync with the server's.
2006-08-24 11:15:08 -04:00
brian@zim.(none)
d41188130a This is a cleanup of warnings that windows is complaining about. 2006-08-23 15:12:42 -07:00
cmiller@zippy.cornsilk.net
f2f90320de Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1
2006-08-21 12:59:46 -04:00
tnurnberg@salvation.intern.azundris.com
9335cba3e4 17926 duplicates Bug#1989 in bug db
on up-merging 17926 from 5.0 tree it collides with near-identical fix 1989
in 5.1 tree. backing 17926 out of 5.1 tree.
2006-08-18 19:29:54 +02:00
cmiller@zippy.cornsilk.net
c821fa8bc6 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.1
2006-08-17 12:17:52 -04:00
rburnett@bk-internal.mysql.com
d65095b451 Merge bk-internal.mysql.com:/data0/bk/tmp_reg
into  bk-internal.mysql.com:/data0/bk/mysql-5.1
2006-08-17 17:19:41 +02:00
cmiller@zippy.cornsilk.net
6998c5140b Merge zippy.cornsilk.net:/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.cornsilk.net:/home/cmiller/work/mysql/merge/mysql-5.0
2006-08-17 10:53:12 -04:00
bar@mysql.com/bar.intranet.mysql.r18.ru
638300fa9e Merge mysql.com:/usr/home/bar/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b17939
2006-08-15 14:41:29 +05:00
brian@zim.(none)
8deb5beb9c Merge zim.(none):/home/brian/mysql/dep-5.0
into  zim.(none):/home/brian/mysql/dep-5.1
2006-08-14 15:24:29 -07:00
kostja@bodhi.local
04c97488f9 Merge bodhi.local:/opt/local/work/tmp_merge
into  bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
2006-08-12 21:06:51 +04:00
rburnett@bk-internal.mysql.com
6b399a498b Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
2006-08-10 19:24:46 +02:00
cmiller@zippy.cornsilk.net
543fcde9b9 Merge zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.0
2006-08-09 22:23:41 -04:00
tnurnberg@salvation.intern.azundris.com
cbe81c301a Bug#17926: mysql.exe crashes when ctrl-c is pressed in windows
SIGINT is handled in funny ways on windows, which could lead to problems when
Control-C was pressed in the client during a long-running query.  Now Control-C
during a query aborts that query (by sending KILL to the server on a second
connexion), while Control-C outside of a running query terminates the client.
2006-08-10 03:46:46 +02:00
rburnett@bk-internal.mysql.com
86d74dc6dc Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
2006-08-04 19:19:26 +02:00
rburnett@bk-internal.mysql.com
22c77e87a2 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
2006-08-03 16:54:06 +02:00
msvensson@neptunus.(none)
7280f63100 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-08-03 09:32:58 +02:00
evgen@sunlight.local
d4f92cbb5c Merge sunlight.local:/local_work/tmp_merge-5.0-opt-mysql
into  sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
2006-08-01 20:52:21 +04:00
gkodinov/kgeorge@macbook.gmz
7b5e4ed026 Bug #20103: Escaping with backslash does not work
- make the client to respect the server-side 
   no_backslash_escapes option and disable the 
   special meaning of backslash also at client side.
2006-08-01 11:05:54 +03:00
igreenhoe/greenman@anubis.greendragongames.com
940db2e976 Merge anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/mysql-4.1-maint
into  anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/pending/bug-4.1-19364
2006-07-31 12:53:47 -07:00
msvensson@neptunus.(none)
2461e48698 Bug#21042 mysql client segfaults on importing a mysqldump export
- Use strmake, that will both protect the buffer and make sure it's terminated by a zero
 - Add test case
2006-07-31 14:22:32 +02:00
jimw@rama.(none)
f7e19b40f3 Merge rama.(none):/home/jimw/my/tmp_merge
into  rama.(none):/home/jimw/my/mysql-5.1-clean
2006-07-28 15:51:48 -07:00
msvensson@neptunus.(none)
b3bbb3789e Bug#21042 mysql client segfaults on importing a mysqldump export
- Use strxnmov to protect the "buff" variable from overrun
2006-07-27 12:28:49 +02:00
rburnett@bk-internal.mysql.com
fe7c252078 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-kt
2006-07-24 16:25:20 +02:00
msvensson@neptunus.(none)
162e0e0db1 Remove strange comment 2006-07-23 22:13:12 +02:00
iggy@rolltop.ignatz42.dyndns.org
2835ebdf63 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_bug20328
2006-07-19 17:00:39 -04:00
cmiller@zippy.cornsilk.net
34256fb8f5 Bug #14448: delimiter in 'prompt'
"I want to have the current delimiter in the prompt so that I can know at 
a glance which is set."

Add a 'l' format specifier that represents the current statement delimiter.
2006-07-19 14:33:56 -04:00
jimw@rama.(none)
3fb0f420ac Merge bk-internal:/home/bk/mysql-5.0-kt
into  rama.(none):/home/jimw/my/mysql-5.0-17485
2006-07-17 12:55:36 -07:00
igreenhoe/greenman@anubis.greendragongames.com
abb75129f8 4.1 -> 5.0 merge 2006-07-13 16:35:25 -07:00
igreenhoe/greenman@anubis.greendragongames.com
a5b8596c37 Fix for Bug #19364 "mysql --help gives old informations".
Old option ordering in the help was confusing to some users.  Changed
ordering of deprecated options to be consistent, and added mention to
entry for options with a "--no-option" variant mentioning the
"--disable-option" variant.
2006-07-13 00:31:47 -07:00
tnurnberg@mysql.com/salvation.intern.azundris.com
4be51e1644 Bug#20432: mysql client interprets commands in comments
do not look for client-specific commands while inside a multi-line comment.
we will allow multi-comments pretty much anywhere within SQL-statements,
but client-specific commands (help, use, print, ...) must be the first token
in the input.
2006-07-13 09:04:06 +02:00
jimw@rama.(none)
9a2a3c6edf Bug #17485: mysql client crashes when connecting to the Instance Manager
Using \U or \u in a prompt with the mysql command-line client could
  crash when connecting to the instance manager, since it does not return
  information about the user when asked by the client. This is fixed by
  having the client use what it knowns about the user (or giving up and
  saying "(unknown)").
2006-07-11 12:42:03 -07:00
bar@mysql.com
c86acb53fa Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/usr/home/bar/mysql-5.0.b10979
2006-07-07 12:14:12 +05:00
iggy@mysql.com
f6658356c6 Bug#20328 mysql client: dumb about trailing spaces on help command. 2006-06-29 17:06:28 -04:00
cmiller@zippy.(none)
00243ac847 Merge zippy.(none):/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new
2006-06-13 16:06:35 -04:00
anjuta@arthur.local
bd8eef5647 BUG#19363: mysql --no_pager makes core dump.
The problem was missing break; operator.
2006-06-02 22:03:39 +03:00
bar@mysql.com
1579af9578 bug#10979 USE does not refresh db privilege changes if the same db is used in command.
The problem happened because "mysql" didn't send mysql_select_db() if 
the current active database was specified in USE.
Now it always send mysql_select_db().
Rebuilding of completion hash is skipped in the same db is used
(for performance purposes).
2006-05-24 16:10:25 +05:00
kent@mysql.com
d48e55eefd Merge 2006-05-17 23:41:56 +02:00
tomas@poseidon.ndb.mysql.com
6cb699d208 Merge poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
into  poseidon.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2006-05-16 10:37:40 +02:00
cmiller@zippy.(none)
d8330e2858 Merge zippy.(none):/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new
2006-05-15 19:26:49 -04:00
cmiller@zippy.(none)
eca1b560ae Porting fix of Bug#19564 from 5.0/5.1 trees. 2006-05-15 14:58:48 -04:00
cmiller@zippy.(none)
d24b4d6e99 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0-maint
2006-05-11 09:14:09 -04:00
cmiller@zippy.(none)
18754b0a97 Bug#19564: mysql displays NULL instead of space
Correct a bug (that I introduced, after using Oracle's database software for 
too many years) where the length of the database-sent data is incorrectly 
used to infer NULLness.
2006-05-09 22:35:51 -04:00
jani@ua141d10.elisa.omakaista.fi
083f8455c7 Merge ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.0
into  ua141d10.elisa.omakaista.fi:/home/my/bk/mysql-5.1-new
2006-05-09 20:50:29 +03:00
msvensson@neptunus.(none)
a15415cc04 BUG#16803 "ln -s /dev/null .mysql_history" doesn't work!
- Add a check to see if the .mysql_history file a symlink to /dev/null 
   and in such case, skip reading and writing to it.
2006-05-09 11:01:50 +02:00
jimw@mysql.com
da9a11669d Merge mysql.com:/home/jimw/my/mysql-4.1-wl2852
into  mysql.com:/home/jimw/my/mysql-5.1-clean
2006-05-03 15:58:16 -07:00
msvensson@neptunus.(none)
cccc2c4b6a Merge bk-internal:/home/bk/mysql-5.0-maint
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-04-28 08:33:42 +02:00
msvensson@shellback.(none)
e5004d1312 Merge shellback.(none):/home/msvensson/mysql/mysql-5.0
into  shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-04-27 17:35:29 +02:00
msvensson@neptunus.(none)
31db4898c3 Merge neptunus.(none):/home/msvensson/mysql/bug17208/my50-bug17208
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-04-26 22:24:25 +02:00
cmiller@zippy.(none)
9ae7dd9e35 Merge zippy.(none):/home/cmiller/work/mysql/merge/jimw_merge
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new
2006-04-24 16:17:50 -04:00
msvensson@neptunus.(none)
29ace143a1 Backport fix for mysql client not using SSl library directly
- Add function mysql_get_ssl_cipher
 - Use function mysql_get_ssl_cipher from mysql
2006-04-22 00:48:13 +02:00
kent@mysql.com
1472ed2061 Merge 2006-04-21 20:04:13 +02:00
msvensson@neptunus.(none)
a51668c74c Bug#17208 SSL: client does not verify server certificate
- Add new function 'ssl_verify_server_cert' which is used if we are 
   connecting to the server with SSL. It will compare the hostname in 
   the server's cert against the hostname that we used when connecting 
   to the server. Will reject the connection if hostname does not match.
 - Add new option "OPT_SSL_VERIFY_SERVER_CERT" to be passed to mysql_options
   which will turn on checking of servers cert.
 - Add new argument "ssl-verify-server-cert" to all mysql* clients which 
   will activate the above option.
 - Generate a new server cert with 1024 bits that has "localhost" as the server name.
2006-04-18 17:58:27 +02:00
kent@mysql.com
64295d82d1 Merge 2006-04-18 17:16:27 +02:00
serg@mysql.com
98ea03931e mysql.cc:
revert bug#16855 "fix" per Monty's request
2006-04-18 10:16:06 +02:00
bar@mysql.com
aa8ab68fea Bug#17939: Wrong table format when using UTF8 strings
Lines with column names consisting of national letters
were wrongly formatted in "mysql --table" results:

mysql> SELECT 'xxx xxx xxx' as 'xxx xxx xxx';
+-------------------+
| xxx xxx xxx |
+-------------------+
| xxx xxx xxx       |
+-------------------+
1 row in set (0.00 sec)

It happened because in UTF-8 (and other multibyte charsets)
the number of display cells is not always equal to the number
of bytes of the string.

Data lines (unlike column name lines) were formatted correctly,
because data lines were displayed taking in account number of
display cells. This patch takes in account number of cells when
displaying column names, the same way like displaying data lines does.

Note: The patch is going to be applied to 4.1.
Test case will be added after merge to 5.0,
into "mysql.test", which appeared in 5.0.

mysql.cc:
  Adding column name allignment using numcells(),
  the same to data alignment, which was implemented earlier.
2006-04-17 12:33:45 +05:00
cmiller@zippy.(none)
7d282984f3 Only expand the empty string to the letters "NULL" if the column
does not have "NOT NULL" attribute set.  Also, calculate the padding
characters more safely, so that a negative number doesn't cause it to 
print MAXINT-n spaces.
2006-04-16 17:17:36 -04:00
brian@zim.(none)
5d1d27c016 Final patch to remove the last of the OS2 support. 2006-04-15 18:17:32 -07:00
cmiller@zippy.(none)
c7513d482f Merge zippy.(none):/home/cmiller/work/mysql/merge/tmp_merge
into  zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new
2006-04-14 13:33:02 -04:00
msvensson@neptunus.(none)
24a6dd64b5 Update implementation of new function 'mysql_get_ssl_cipher' after review 2006-04-10 12:23:20 +02:00
msvensson@neptunus.(none)
98904a8caa Add new function mysql_get_ssl_cipher to libmysl and use it from client to avoid dependency on SSL libs from mysql client. 2006-04-07 11:26:21 +02:00
cmiller@zippy.(none)
0db6176bfc Bug#18265: mysql client: No longer right-justifies numeric columns
Also fixes a new bug for which "NULL" wasn't printed (because the 
data it represents has length zero).  (Discovered my Paul DuBois.)
2006-04-04 17:35:07 -04:00
ian@zim.(none)
a66aace3e9 Fix for bug #16855 2006-03-27 17:45:06 -08:00
cmiller@zippy.(none)
599c710a5b Bug#16859 involves truncating column data at NUL characters. Instead, the
client will now substitute spaces for NULs, so that the grid isn't messed up
due to silently consumed NULs and that the full field is shown.
2006-03-03 16:26:38 -05:00
aelkin@mysql.com
14ced05e55 BUG#16217 fix partly backported from 5.0. It is different in mysqlbinlog part.
This changeset is assumed to stay in 4.1.
2006-02-10 15:12:27 +02:00
aelkin@mysql.com
dd2a44c497 BUG#16217 forced to introduce a separate mysql client command to adopt its
internal charset to one associated with currently being handled query. 
To note such a query can come from interactive client either.

There was a discussion within replication team and Monty who's suggestion won.
It avoids straightforward parsing of all `set' queries that could affect client side 
character set. 
According to the idea, mysql client does not parse `set' queries but rather cares of
`charset new_cs_name' command.
This command is generated by mysqlbinlog in form of exclaiming comment (Lars' suggestion)
so that enlightened clients like `mysql' knows what to do with it.

Interactive human can switch between many multi-byte charsets during the session 
providing the command explicitly. 
To note that setting new internal mysql's charset does not
trigger sending any `SET' sql statement to the server.
2006-02-09 16:23:09 +02:00
stewart@mysql.com
efbdf7b225 Merge mysql.com:/home/stewart/Documents/MySQL/4.1/main
into  mysql.com:/home/stewart/Documents/MySQL/5.0/main
2005-12-28 00:57:18 +11:00
paul@snake-hub.snake.net
f5cc3fd619 mysql.cc:
Typo in help message.
2005-12-20 12:47:44 -06:00
knielsen@mysql.com
17cab43fcf Bug#15097: Missing \n in header printed by mysql --help when HAVE_READLINE
is not defined.
2005-12-05 12:12:08 +01:00
jani@a193-229-222-105.elisa-laajakaista.fi
d88d8081da Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
2005-12-04 15:34:47 +02:00
jani@a193-229-222-105.elisa-laajakaista.fi
669a12fdb0 A set of Netware related patches. 2005-12-04 15:02:06 +02:00
joerg@mysql.com
b3b124f9e4 Merge the last 5.0.16 (Unix, Windows) and 5.0.16a (Netware) changes to the general tree. 2005-11-21 15:49:34 +01:00
jamppa@suse9-x86.mysql.com
a50cc250ff Netware specific changes for 5.0.16a 2005-11-18 18:25:46 +01:00
jimw@mysql.com
f8ce7bc01e Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-11-17 13:37:30 -08:00
jimw@mysql.com
2ffc7ff2a2 Update out-of-date URLs in 'help' text of mysql client. (Bug #14801) 2005-11-11 15:23:04 -08:00
tim@siva.hindu.god
c704130389 BUG#14358: in mysql.cc, don't neglect to strip delimiter off lines < 9 characters long. 2005-10-28 12:13:34 +13:00
kent@mysql.com
70c816c801 Merge mysql.com:/Users/kent/mysql/bk/mysql-5.0-release
into mysql.com:/Users/kent/mysql/bk/mysql-5.0
2005-10-20 23:23:33 +02:00
reggie@ugeek.(none)
600c7df8f1 readd the my_cgets call that SergeyV originally put in 2005-10-18 17:53:09 -05:00
bar@mysql.com
e7fa41ebf7 mysql.cc:
After merge fix.
2005-10-14 14:19:15 +05:00
bar@mysql.com
aec79cc463 Merge mysql.com:/usr/home/bar/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-5.0
2005-10-14 14:17:15 +05:00
bar@mysql.com
48238e1b90 Merge mysql.com:/usr/home/bar/mysql-4.1.b13487
into  mysql.com:/usr/home/bar/mysql-4.1
2005-10-14 14:07:22 +05:00
monty@mysql.com
17d7ba931d Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2005-10-08 03:37:23 +03:00
gluh@mysql.com
041eab4663 4.1 -> 5.0 merge 2005-10-07 14:26:32 +05:00
monty@mysql.com
78e828d32f Review of code pushed since last 5.0 pull:
Ensure that ccache is also used for C programs
mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode
mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter
Fixed test cases by adding missing DROP's and rename views to be of type 'v#'
Removed MY_UNIX_PATH from fn_format()
Removed current_db_used from TABLE_LIST
Removed usage of 'current_thd' in Item_splocal
Removed some compiler warnings
A bit faster longlong2str code
2005-10-06 17:54:43 +03:00
jimw@mysql.com
f1006fa620 In the command-line client, try to abort the current query by issuing a
KILL command on a second connection when handling Ctrl-C. (WL#2852) 

Based on patch by Harrison Fisk.
2005-10-05 12:54:04 -07:00
georg@lmy002.wdf.sap.corp
f846bc32c1 Windows compilation fix: Added typecast (const char* to char *) 2005-10-04 10:54:58 +02:00
kent@mysql.com
7b2e04d5a2 Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-5.0-release
2005-09-30 16:37:02 +02:00
kent@mysql.com
21cf818a8d Many files:
New VC7 project files
des_key_file.cc:
  Visual C++ wants '"' for local include
mysql.cc:
  Cast my_cgets() argument for VC6 and VC7
dummy.cpp:
  Added to convince VS .Net generate a lib for mysqlserver
2005-09-30 14:03:55 +02:00
bar@mysql.com
ceb541e4bc Bug#13487 Japanese data inside a comment causes the syntax error
mysql.cc:
  Fixed not to copy multibyte characters to the
  target string if we are inside a comment.
2005-09-28 15:46:09 +05:00
msvensson@neptunus.(none)
fbf4a5e079 Merge neptunus.(none):/home/msvensson/mysql/mysql-4.1
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2005-09-28 11:34:53 +02:00
monty@mysql.com
ea6d5f9ec3 Fixed error found during review of new pushed code 2005-09-25 21:22:23 +03:00
serg@serg.mylan
a083ff160e merged 2005-09-21 13:53:22 +02:00
SergeyV@selena.
2e9e0b33c5 Fixes bug #12929. Uses my_cgets instead of _cgets function, thus eliminating
a restriction to 255 chars for editable buffer.
2005-09-16 01:56:16 +04:00
jimw@mysql.com
25adba36b1 Merge mysql.com:/home/jimw/my/mysql-5.0-11523
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-08-29 10:02:23 -07:00
jani@a193-229-222-105.elisa-laajakaista.fi
7b7188cea6 Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-5.0
2005-08-26 15:56:52 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
e767eb330e Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0
into  a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.1
2005-08-25 12:08:26 +03:00
jani@a193-229-222-105.elisa-laajakaista.fi
fe977b0cd0 Several fixes for Netware. 2005-08-24 22:03:34 +03:00
serg@sergbook.mysql.com
2870638ef2 client/mysql.cc
mysql default port cleanup (it's set in libmysql.c, NOT in my_getopt)
configure.in
    autoconf 2.52 is enough to build mysql-5.0
2005-08-14 14:06:47 +02:00
acurtis@xiphis.org
b9476f7d50 Merge xiphis.org:/usr/home/antony/work2/mysql-4.1
into  xiphis.org:/usr/home/antony/work2/merge-5.0
2005-08-11 12:18:53 +01:00
jimw@mysql.com
397cef9413 Fix 'source' command in mysql client to handle delimiter command
in sourced file properly. (Bug #11523)
2005-08-09 12:17:28 -07:00
patg@krsna.patg.net
74c7168992 BUG #12119
Removed unnecessary error message from mysql.cc (client program)
2005-08-08 13:50:10 -07:00
monty@mishka.local
8437e9c1be Fixes during review of new pushed code
Change bool in C code to my_bool
Added to mysqltest --enable_parsning and --disable_parsing to avoid to have to comment parts of tests
Added comparison of LEX_STRING's and use this to compare file types for view and trigger files.
2005-07-31 12:49:55 +03:00
monty@mishka.local
78c65b5adc Cleanups during review
Changed defaults option --instance to --defaults-group-suffix
Changed option handling to allow --defaults-file, --defaults-extra-file and --defaults-group-suffix to be given in any order
Changed MYSQL_INSTANCE to MYSQL_GROUP_SUFFIX
mysql_print_defaults now understands --defaults-group-suffix
Remove usage of my_tempnam() (not safe function)
if( -> if ( and while( to while (
2005-07-18 15:33:18 +03:00
jimw@mysql.com
99e35c84ac Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-06-20 15:02:45 -07:00
jimw@mysql.com
5381e18673 Fix handling of command-line on Windows, missed as part of earlier
commit. (Bug #10840)
2005-06-20 18:54:45 +02:00
jimw@mysql.com
55f962c0cf Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2005-06-10 20:11:20 -07:00
jimw@mysql.com
e4cb794750 Fix use of _cgets() to handle an input line that exceeds our buffer space
before a newline is found. (Bug #10840)
2005-06-09 19:44:59 +02:00
jimw@mysql.com
9ba4a6c722 Fix calculation of buffer size for _cgets() on Windows. (Bug #10841) 2005-06-08 00:43:57 +02:00
monty@mysql.com
4b7882dc73 merge 2005-06-05 17:19:50 +03:00
serg@serg.mylan
d26c13b439 client/mysql.cc
make print_field_types() somewhat more useful
2005-06-03 21:59:33 +02:00
monty@mysql.com
a69f432115 Code cleanups during code reviews
Ensure we get error if INSERT IGNORE ... SELECT fails
Fixed wrong key_part->key_length usage in index_merge
2005-06-01 16:35:09 +03:00
kent@mysql.com
318c41e94d default.c:
Disabled use of GetSystemWindowsDirectory() when compiled with VC6
mysql.cc:
  Removed unused variable 'field' from print_warnings()
libmysql.dsp:
  Added "my_chsize.c" and "my_seek.c"
mysqlclient.dsp:
  Added "my_chsize.c"
2005-05-18 12:15:28 +02:00
monty@mysql.com
3b3d00c4a2 Merge with 4.1 to get fix for memory leak 2005-05-16 20:21:38 +03:00
monty@mysql.com
8b1673f18e Fix memory leak 2005-05-16 20:16:46 +03:00
serg@serg.mylan
40ce1e174d merged 2005-05-14 19:28:29 +02:00
antony@ltantony.mysql.com
7a56977a79 Bug#6925
Comment/*COMMENT*/is not a separator
  Ensure that whitespace is inserted after C-style comment if required.
2005-05-08 00:13:35 +01:00
jimw@mysql.com
80933d9f95 Merge 2005-05-07 08:25:58 -07:00
jimw@mysql.com
7e7ed0f6a8 Merge mysql.com:/home/jimw/my/mysql-4.1-9186
into mysql.com:/home/jimw/my/mysql-4.1-clean
2005-05-07 01:05:19 -07:00
rburnett@bk-internal.mysql.com
82f4a0b021 Merge bk-internal.mysql.com:/users/rburnett/bug10245
into bk-internal.mysql.com:/users/rburnett/mysql-5.0
2005-05-06 15:21:30 +02:00
rburnett@bk-internal.mysql.com
8e286b7934 Bug #10245 VC++ compiler error with mysql.cc
Only print the read line version if we are on a platform that supports readline

mysql.cc:
  Add #ifdef to only print readline version if we are on a platform that supports readline
2005-05-05 17:48:50 +02:00
geert@kriem.kemuri.org
0dab212f5c Merge gvanderkelen@bk-internal.mysql.com:/home/bk/mysql-5.0
into kriem.kemuri.org:/home/geert/MySQL/mysql-5.0
2005-04-29 14:46:53 +02:00
geert@kriem.kemuri.org
166af66440 Merge gvanderkelen@bk-internal.mysql.com:/home/bk/mysql-5.0
into kriem.kemuri.org:/home/geert/MySQL/mysql-5.0
2005-04-27 14:17:50 +02:00
msvensson@neptunus.(none)
203cdde955 Merge from 4.1 to 5.0 2005-04-27 12:56:01 +02:00
jani@ua141d10.elisa.omakaista.fi
0ca934de63 Improved client internal help.
Doc fix for Bug#9870.
2005-04-26 14:02:16 +03:00
msvensson@neptunus.(none)
e0edc9a630 BUG#2596 MySQL Client Segmentation Fault on Solaris 9
- Print readline or libedit version
2005-04-25 12:05:13 +02:00
geert@kriem.kemuri.org
e432a7b263 Removing useless mysql_field_seek 2005-04-25 09:51:37 +02:00
msvensson@neptunus.(none)
3aecb8acce Upgrade to libedit-2.9 2005-04-21 12:06:46 +02:00
geert@kriem.kemuri.org
8e671105ac \W enables show warnings, \w disables; Showing message while interactive when using the \w and \W commands; using strmov instead of my_strdup; removed case for options, my_getopt does it 2005-04-14 15:07:08 +02:00
geert@kriem.kemuri.org
e5c607e0ad Removing for-loop in print_warnings() 2005-04-08 16:54:50 +02:00
geert@kriem.kemuri.org
8c42aceb0a Adding --show-warnings option for the mysql command line tool so warnings,
if any, are shown after execution of a statement in both batch and 
interactive mode. 
In interactive mode \w means show the warnings and \W means don't 
show the warnings.
2005-04-05 15:30:17 +02:00
jimw@mysql.com
dee535be63 Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
2005-03-25 10:51:08 -08:00
georg@lmy002.wdf.sap.corp
a9fde23474 typecast fix for windows 64-bit compilation error 2005-03-16 08:51:57 +01:00
jimw@mysql.com
3a6af0b28f Change mysql prompt while inside a multiline comment. (Bug #9186) 2005-03-15 17:33:06 -08:00
jimw@mysql.com
5e0d06da82 Fix 'tee' command in mysql client. (Bug #8499) 2005-03-15 16:37:05 -08:00
serg@serg.mylan
956682de1a merged 2005-03-09 14:09:06 +01:00
jani@ua141d10.elisa.omakaista.fi
8db4423b8c Fixed Bug#8922.
Reverted Jim's patch.
2005-03-08 18:12:12 +02:00
georg@lmy002.wdf.sap.corp
877b2f4688 fixed conversion errors (Windows IA64 build) 2005-03-07 09:47:24 +01:00
monty@mysql.com
3839e443a4 merge with 4.1 2005-02-28 12:18:39 +02:00
ramil@mysql.com
dee22632f7 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1.b4802
2005-02-25 15:47:36 +04:00
monty@mysql.com
e2ea35ec67 Merge with 4.1 2005-02-22 15:47:00 +02:00
monty@mysql.com
e2dc9b4099 Backport my_strntod() from 5.0
Change string->float conversion to delay division as long as possible.
This gives us more exact integer->float conversion for numbers of type '123.45E+02' (Bug #7740)
2005-02-22 12:51:23 +02:00
bar@mysql.com
e2bd15eca2 mysql.cc:
bug#7571:
  Server & Client characterset are shown under different decriptions
  Switch them into the correct order.
2005-02-21 15:43:25 +04:00
ramil@mysql.com
8cf2b82f94 After review fixes 2005-02-02 15:52:19 +04:00
ramil@mysql.com
7f68f132fd Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1.b4802
2005-02-02 15:06:36 +04:00
jimw@mysql.com
85a5c61c5d Merge mysql.com:/home/jimw/my/mysql-4.1-7811
into mysql.com:/home/jimw/my/mysql-5.0-clean
2005-01-31 17:51:45 -08:00
jimw@mysql.com
ec98b8f235 Change 'mysql' client to output XML like the 'mysqldump'
tool does, with the column names as attributes on <field>
elements, instead of trying to use the column name as the
element name. Also fix some encoding issues. (Bug #7811)
2005-01-25 14:25:40 -08:00
jani@ua141d10.elisa.omakaista.fi
d5f76d50f6 Some bug fixes and a feature add to mysql-test-run 2005-01-25 18:32:09 +02:00
serg@serg.mylan
c76405a7ee merged 2005-01-24 19:41:42 +01:00
serg@serg.mylan
67ba2e367a fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
monty@mysql.com
502ba93b38 Merge with global tree 2005-01-18 04:03:26 +02:00
reggie@bob.(none)
da9f7c7ec4 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into bob.(none):/home/reggie/bk/mysql-4.1
2005-01-17 14:08:36 -06:00
guilhem@mysql.com
05793bb9b9 Merge 2005-01-16 21:39:21 +01:00
reggie@bob.(none)
68c540f090 Bug #7922 prompt \p fails on Windows for shared-memory connections
Fixed bug by adding code that displays the contents of mysql.host when \p is added as part of the prompt.

mysql.cc:
  Added code to display mysql.host as prompt when using shared memory
2005-01-15 23:19:34 -06:00
serg@serg.mylan
275a9293e4 protect against malicious server trying to crash command-line client :) 2005-01-14 22:46:04 +01:00
hf@deer.(none)
196c95e938 Merging conflicts resolved 2005-01-11 21:00:53 +04:00
hf@deer.(none)
8b3b364893 Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.5920
2005-01-11 19:58:52 +04:00
pekka@mysql.com
195f7bda02 Merge 2005-01-08 22:34:16 +01:00
serg@sergbook.mylan
247052fecc few harmless warnings from automated code-checking tools fixed 2005-01-08 21:25:31 +01:00
hf@deer.(none)
5eb5fd12be fix for bug #5920 (embedded-server mysql doesn't handle --defaults-file) 2005-01-03 19:21:54 +04:00
monty@mishka.local
4f4bbfc279 Merge with 4.1 2004-12-22 13:54:39 +02:00
paul@frost.snake.net
66f0ff16a3 mysql.cc:
Fix up mysql help messages.
2004-12-18 14:30:00 -06:00
guilhem@mysql.com
1cbc904c59 Changing the default of libmysqlclient : it's now NO reconnection.
All our programs which use mysql_real_connect() and mysql_connect() are updated accordingly, though I have deliberately
made mysqlimport not reconnect anymore (already true for mysqldump >= 4.1.8).
All Connector devs have been warned about the change I'm doing here - which was agreed with Monty,
and fixes BUG#2555.
2004-12-09 14:44:10 +01:00
paul@kite-hub.kitebird.com
59c0102e23 mysql.cc:
Tweak some help text.
2004-11-19 14:53:40 -06:00
monty@mysql.com
3afecef4df Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094)
2004-10-22 18:44:51 +03:00
ram@gw.mysql.r18.ru
61c7767786 A fix (bug #4802 prompt in mysql client shows wrong database after dropping default db). 2004-10-21 17:02:24 +05:00
jani@a80-186-41-201.elisa-laajakaista.fi
a37355fb98 Added option --sigint-ignore to mysql.cc 2004-10-07 22:47:11 +03:00
bar@mysql.com
dcfb23f37f mysql.cc:
SQL_SELECT_LIMIT=0 protection
2004-09-15 13:26:47 +05:00
bar@mysql.com
1992322af5 Restoring old code to be used with 4.0 server if 4.1-compient query fails.
Restoring displaying database and user which was removed in a mistake
in the previous change.
2004-09-15 10:06:30 +05:00
bar@mysql.com
49728cce7e mysql.cc:
Bug #5536: wrong server character set in "status" command
  More character set variables.
2004-09-13 12:51:08 +05:00
hf@deer.(none)
7aa25240f7 Fix for bug #4809 (Backticks not handled in mysql) 2004-09-13 12:13:24 +05:00
paul@kite-hub.kitebird.com
a022b3c549 mysql.cc:
Print sqlstate value in batch mode, not just in interactive mode.
2004-09-08 13:28:11 -05:00
rburnett@build.mysql.com
751071a677 [This patch has already been approved by Serge. I am recommitting and pushing from a new repository because there were other changesets that couldn't be pushed.]
BUG# 5229 --password=foobar does not override the empty 'password' option in the my.cnf
This is a backport of a change made by jani in the 4.1 tree.

mysql.cc:
  Add tty_password=0 in the p case handling in get_one_option
2004-09-08 16:31:01 +02:00
serg@serg.mylan
0afcaac5a8 after merge 2004-09-07 22:10:15 +02:00
serg@serg.mylan
323e683cbf merged 2004-09-07 21:30:28 +02:00