Commit graph

461 commits

Author SHA1 Message Date
bar@mysql.com/bar.myoffice.izhnet.ru
2b42750a51 Bug#29323 mysql client only accetps ANSI encoded files
Fix: ignore BOM marker in the first line.
2007-10-04 13:06:01 +05:00
kaa@polly.(none)
2bb849644b Bug #30164: Using client side macro inside server side comments generates broken queries
Problem:
  
In cases when a client-side macro appears inside a server-side comment, the add_line() function in mysql.cc discarded all characters until the next delimiter to remove macro arguments from the query string. This resulted in broken queries being sent to the server when the next delimiter character appeared past the comment's boundaries, because the comment closing sequence ('*/') was discarded.
  
Fix:
  
If a client-side macro appears inside a server-side comment, discard all characters in the comment after the macro (that is, until the end of the comment rather than the next delimiter).
This is a minimal fix to allow only simple cases used by the mysqlbinlog utility. Limitations that are worth documenting:
  
- Nested server-side and/or client-side comments are not supported by mysql.cc
- Using client-side macros in multi-line server-side comments is not supported
- All characters after a client-side macro in a server-side comment will be omitted from the query string (and thus, will not be sent to server).
2007-08-30 12:53:24 +04:00
gkodinov/kgeorge@magare.gmz
7735a2f2eb Bug #29469: Client dies if a query is issued after hitting Ctrl + C
The Ctrl-C handler in mysql closes the console while ReadConsole()
waits for console input.
But the main thread was detecting that ReadConsole() haven't read 
anything and was processing as if there're data in the buffer.
Fixed to handle correctly this error condition.
No test case added as the test relies on Ctrl-C sent to the client
from its console.
2007-07-10 10:43:12 +03:00
msvensson@pilot.blaudden
dcd914e24e Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-04-23 16:22:01 +02:00
ramil/ram@mysql.com/ramil.myoffice.izhnet.ru
e62dbcf746 Fix for
bug #27715: mysqld --character-sets-dir buffer overflow
bug ##26851: Mysql Client --pager Buffer Overflow

Using strmov() to copy an argument may cause overflow 
if the argument's length is bigger than the buffer:
use strmake instead.
Also, we have to encrease the error message buffer size to fit 
the longest message.
2007-04-16 12:28:02 +05:00
bar@mysql.com
9faaec9e1b bug#27608 XML output is not well-formed
Problem: output was empty if the result is empty.
Fix: print XML header and footer, even if the result
is empty, to produce well-formed XML output.
2007-04-09 17:53:10 +05:00
bar@mysql.com
5e52cd3650 Bug#25946 Namespace not include for xsi usage within --xml output with null/nil values
Fix: adding namespace reference into "mysql --xml" output,
to make it work similary to "mysqldump --xml".
2007-03-27 13:30:43 +05:00
msvensson@pilot.blaudden
be1e948543 Merge 192.168.0.10:mysql/my50-m-bug18431
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.0-maint
2007-03-03 12:14:36 +01:00
monty@mysql.com/narttu.mysql.fi
26aa385bc5 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-02-21 14:07:08 +02:00
joerg@trift2.
e56eb2288c Fix bug#23293 "readline detection broken on NetBSD":
Its root cause is a difference between the "readline" and "libedit" (header files)
definitions of "rl_completion_entry_function", where the "libedit" one is wrong anyway:
This variable is used as a pointer to a function returning "char *",
but "libedit" declares it as returning "int" and then adds casts on usage.

Change it to "CPFunction *" and get rid of the casts.
2007-01-31 15:25:56 +01:00
monty@mysql.com/narttu.mysql.fi
a04157fbb3 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2007-01-22 14:04:40 +02:00
kent@mysql.com/kent-amd64.(none)
226a5c833f Many files:
Changed header to GPL version 2 only
2006-12-23 20:17:15 +01:00
monty@mysql.com/narttu.mysql.fi
a6481aa4c7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/my/mysql-5.0
2006-12-15 01:01:52 +02:00
monty@mysql.com/narttu.mysql.fi
88dd873de0 Fixed compiler warnings detected by option -Wshadow and -Wunused:
- Removed not used variables and functions
- Added #ifdef around code that is not used
- Renamed variables and functions to avoid conflicts
- Removed some not used arguments

Fixed some class/struct warnings in ndb
Added define IS_LONGDATA() to simplify code in libmysql.c

I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
2006-12-15 00:51:37 +02:00
msvensson@neptunus.(none)
128b73fc36 Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-12-04 19:28:38 +01:00
monty@mysql.com/narttu.mysql.fi
601e6f4b2a Fixed compiler warnings
Don't assert if my_thread_end() is called twice (common case)
2006-11-30 21:56:03 +02:00
jpipes@shakedown.(none)
03a5dcd7ce Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  shakedown.(none):/home/jpipes/dev/mysql-5.0-maint
2006-11-27 14:58:57 -05:00
ramil/ram@mysql.com/myoffice.izhnet.ru
82ec5bd111 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/usr/home/ram/work/bug22913/my50-bug22913
2006-11-02 16:20:52 +04:00
ramil/ram@mysql.com/myoffice.izhnet.ru
9361705934 Merge mysql.com:/usr/home/ram/work/bug22913/my41-bug22913
into  mysql.com:/usr/home/ram/work/bug22913/my50-bug22913
2006-11-02 14:33:22 +04:00
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)
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
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)
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
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
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
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
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
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
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
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
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
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
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