Commit graph

335 commits

Author SHA1 Message Date
unknown
1ba16a86c5 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  mysql.com:/usr/home/ram/work/bug21142/my41-bug21142


client/mysql.cc:
  Auto merged
2006-09-18 09:06:05 +05:00
unknown
c3508e602f Fix for bug #21142: Malformed insert causes a segmentation fault.
- possible stack overflow fixed.


client/mysql.cc:
  Fix for bug #21142: Malformed insert causes a segmentation fault.
    - as 'line' may be longer than 'buff' we must take into account its length.
2006-08-29 14:38:02 +05:00
unknown
73c1453e35 Merge mysql.com:/usr/home/bar/mysql-4.1
into  mysql.com:/usr/home/bar/mysql-4.1.b17939


client/mysql.cc:
  Auto merged
2006-08-15 14:41:29 +05:00
unknown
0f581cd3c5 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


client/mysql.cc:
  Auto merged
2006-07-31 12:53:47 -07:00
unknown
e71f3f1f14 Merge rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint
into  rolltop.ignatz42.dyndns.org:/mnt/storeage/mysql-4.1-maint_bug20328


client/mysql.cc:
  Auto merged
mysql-test/r/bug20328.result:
  Merge rename: mysql-test/r/mysql_client.result -> mysql-test/r/bug20328.result
mysql-test/t/bug20328.test:
  Merge rename: mysql-test/t/mysql_client.test -> mysql-test/t/bug20328.test
2006-07-19 17:00:39 -04:00
unknown
06e218194f 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.


client/mysql.cc:
  Rearranged options for clarity.  Deprecated "--no-X" options now
  follow the "--X" option, and all of the "--X" options that have a
  "--no-X" variant now mention the "--disable-X" variant.
2006-07-13 00:31:47 -07:00
unknown
7621597785 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.


client/mysql.cc:
  Bug#20432: mysql client interprets commands in comments
mysql-test/r/mysql_client.result:
  Bug#20432: mysql client interprets commands in comments
  test client-side parsing of comments and client-specific commands
mysql-test/t/mysql_client.test:
  Bug#20432: mysql client interprets commands in comments
  test client-side parsing of comments and client-specific commands
2006-07-13 09:04:06 +02:00
unknown
f26639c9f2 Bug#20328 mysql client: dumb about trailing spaces on help command.
client/mysql.cc:
  Remove trailing spaces from help arguments in com_server_help. 
  Disregard trailing spaces from command in com_help.
mysql-test/r/mysql_client.result:
  Test trailing spaces on the help command.
mysql-test/t/mysql_client.test:
  Result trailing spaces on the help command.
2006-06-29 17:06:28 -04:00
unknown
ca9c47936c 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.



client/mysql.cc:
  Adding column name allignment, the same to
  data alignment, which was implemented earlier.
2006-04-17 12:33:45 +05:00
unknown
a68f171585 BUG#16217 fix partly backported from 5.0. It is different in mysqlbinlog part.
This changeset is assumed to stay in 4.1.


client/mysql.cc:
  BUG#16217 forced to introduce a separate mysql client command.
  Feature is backported from 5.0, precisely 
  ChangeSet 1.2034 06/02/09 16:23:09 aelkin@mysql.com
  (under second review at the moment)
mysql-test/r/mysqlbinlog.result:
  changed in 5.0
mysql-test/t/mysqlbinlog.test:
  backported from 5.0. The last part of the test to mimic bug#16217
sql/log_event.cc:
  Inserting exclaiming comment command for mysql client made differently than in 5.0.
  Parsing still is cheap enough not to think to modify server code instead.
2006-02-10 15:12:27 +02:00
unknown
fd46c78871 mysql.cc:
Typo in help message.


client/mysql.cc:
  Typo in help message.
2005-12-20 12:47:44 -06:00
unknown
69e0cc6d41 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


client/mysql.cc:
  Auto merged
client/mysqladmin.cc:
  Auto merged
client/mysqlbinlog.cc:
  Auto merged
client/mysqlcheck.c:
  Auto merged
client/mysqldump.c:
  Auto merged
client/mysqlimport.c:
  Auto merged
client/mysqlshow.c:
  Auto merged
isam/isamchk.c:
  Auto merged
myisam/myisamchk.c:
  Auto merged
myisam/myisampack.c:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/sql_parse.cc:
  Merged from 4.0.
2005-12-04 15:34:47 +02:00
unknown
60f2e7a9a4 A set of Netware related patches.
client/mysql.cc:
  Fixed option name.
client/mysqladmin.c:
  Fixed option name.
client/mysqlbinlog.cc:
  Fixed option name.
client/mysqlcheck.c:
  Fixed option name.
client/mysqldump.c:
  Fixed option name.
client/mysqlimport.c:
  Fixed option name.
client/mysqlshow.c:
  Fixed option name.
isam/isamchk.c:
  Fixed option name.
myisam/myisamchk.c:
  Fixed option name.
myisam/myisampack.c:
  Fixed option name.
sql/sql_parse.cc:
  Fix problem with kill connection on NetWare.
2005-12-04 15:02:06 +02:00
unknown
26eb2ecc1d Update out-of-date URLs in 'help' text of mysql client. (Bug #14801)
client/mysql.cc:
  Update text, URLs in mysql client 'help' text
2005-11-11 15:23:04 -08:00
unknown
08bf55c71f Merge mysql.com:/usr/home/bar/mysql-4.1.b13487
into  mysql.com:/usr/home/bar/mysql-4.1


client/mysql.cc:
  Auto merged
2005-10-14 14:07:22 +05:00
unknown
e447057841 Windows compilation fix: Added typecast (const char* to char *) 2005-10-04 10:54:58 +02:00
unknown
1bdd8a6275 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.


client/mysql.cc:
  Bug#13487 Japanese data inside a comment causes the syntax error
  Fixed not to copy multibyte characters to the
  target string if we are inside a comment.
  ,
2005-09-28 15:46:09 +05:00
unknown
466b46a66a Fixed error found during review of new pushed code
client/mysql.cc:
  Don't use c_ptr() for cgets() and ensure buffer is not overwritten
mysql-test/r/cast.result:
  More test for CAST(0x.... as signed)
sql/opt_sum.cc:
  Fix bugs found during review
  - Changed code to be able to remove one if
  - Ensure that count == 0 only if is_exact_count == TRUE
sql/sql_delete.cc:
  Ensure 'allow_sum_func' is reset before call to setup_conds
sql/sql_lex.cc:
  allow_sum_func doesn't have to be reset for each query
  (It's to be reset in setup_fields() or before call to setup_conds()
sql/sql_load.cc:
  Move set of auto_increment_field_not_null so that it's not set if field value is NULL
sql/sql_prepare.cc:
  allow_sum_func doesn't have to be reset for each query
  (It's to be reset in setup_fields() or before call to setup_conds()
sql/sql_update.cc:
  Ensure 'allow_sum_func' is reset before call to setup_conds
2005-09-25 21:22:23 +03:00
unknown
627bf43d9f Fixes bug #12929. Uses my_cgets instead of _cgets function, thus eliminating
a restriction to 255 chars for editable buffer.


VC++Files/mysys/mysys.dsp:
  Added my_conio.c
VC++Files/mysys/mysys_ia64.dsp:
  Added my_conio.c
include/my_sys.h:
  Added declarations for my_conio.c functions
mysys/my_conio.c:
  Added _cgets() replacement that is not limited to 255 chars retrieval
  from win32 console.
2005-09-16 01:56:16 +04:00
unknown
ea09b97036 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


client/mysqlcheck.c:
  Auto merged
client/mysqlimport.c:
  Auto merged
client/mysqltest.c:
  Auto merged
extra/my_print_defaults.c:
  Auto merged
extra/perror.c:
  Auto merged
extra/resolve_stack_dump.c:
  Auto merged
include/help_end.h:
  Auto merged
include/help_start.h:
  Auto merged
isam/isamchk.c:
  Auto merged
isam/pack_isam.c:
  Auto merged
myisam/myisamlog.c:
  Auto merged
netware/myisamchk.def:
  Auto merged
netware/mysql.def:
  Auto merged
netware/mysqladmin.def:
  Auto merged
netware/mysqlbinlog.def:
  Auto merged
netware/mysqlcheck.def:
  Auto merged
netware/mysqldump.def:
  Auto merged
netware/mysqlimport.def:
  Auto merged
netware/mysqlshow.def:
  Auto merged
client/client_priv.h:
  Merged from 4.0.
client/mysql.cc:
  Merged from 4.0.
client/mysqladmin.cc:
  Merged from 4.0.
client/mysqlbinlog.cc:
  Merged from 4.0.
client/mysqldump.c:
  Merged from 4.0.
client/mysqlshow.c:
  Merged from 4.0.
myisam/myisamchk.c:
  Merged from 4.0.
myisam/myisampack.c:
  Merged from 4.0.
netware/mysql_test_run.c:
  Merged from 4.0.
netware/mysqld_safe.c:
  Merged from 4.0.
sql/mysqld.cc:
  Merged from 4.0.
2005-08-25 12:08:26 +03:00
unknown
97dbe8dbe3 Several fixes for Netware.
client/client_priv.h:
  Added option auto close for Netware.
client/mysql.cc:
  Added option auto close for Netware.
client/mysqladmin.c:
  Added option auto close for Netware.
client/mysqlbinlog.cc:
  Added option auto close for Netware.
client/mysqlcheck.c:
  Added option auto close for Netware.
client/mysqldump.c:
  Added option auto close for Netware.
client/mysqlimport.c:
  Added option auto close for Netware.
client/mysqlshow.c:
  Added option auto close for Netware.
client/mysqltest.c:
  Fixed help messages for Netware.
extra/my_print_defaults.c:
  Fixed help messages for Netware.
extra/perror.c:
  Fixed help messages for Netware.
extra/resolve_stack_dump.c:
  Fixed help messages for Netware.
include/help_end.h:
  Fixed help messages for Netware.
include/help_start.h:
  Fixed help messages for Netware.
isam/isamchk.c:
  Added auto close of window for Netware
isam/pack_isam.c:
  Added auto close of window for Netware
myisam/myisamchk.c:
  Added auto close of window for Netware
myisam/myisamlog.c:
  Added help for Netware.
myisam/myisampack.c:
  Added auto close for Netware.
netware/myisamchk.def:
  Scrollable screen patch.
netware/mysql.def:
  Scrollable screen patch.
netware/mysql_test_run.c:
  Fixed strindex for Netware.
netware/mysqladmin.def:
  Scrollable screen patch.
netware/mysqlbinlog.def:
  Scrollable screen patch.
netware/mysqlcheck.def:
  Scrollable screen patch.
netware/mysqld_safe.c:
  Removed debug message for Netware.
netware/mysqldump.def:
  Scrollable screen patch.
netware/mysqlimport.def:
  Scrollable screen patch.
netware/mysqlshow.def:
  Scrollable screen patch.
sql/mysqld.cc:
  Abnormal end patch when shutting down and volume not ready.
2005-08-24 22:03:34 +03:00
unknown
b10670142c BUG #12119
Removed unnecessary error message from mysql.cc (client program)


client/mysql.cc:
  BUG #12119
  
  The error message "Didn't find any fields in table ..." would 
  be printed out when a table was created and dropped in rapid succession 
  via a perl script. The client would get a list of tables, meanwhile, the 
  one table would be deleted, and then this error message printed when the 
  table was not found, which it should just quietly not print the fields.
  Removing the error message fixes this issue.
2005-08-08 13:50:10 -07:00
unknown
7b24dad470 Fix handling of command-line on Windows, missed as part of earlier
commit. (Bug #10840)


client/mysql.cc:
  Add cast of unsigned value stored in signed char
2005-06-20 18:54:45 +02:00
unknown
3841a370a1 Fix use of _cgets() to handle an input line that exceeds our buffer space
before a newline is found. (Bug #10840)


client/mysql.cc:
  Call _cgets() as many times as necessary to get the full line of input
2005-06-09 19:44:59 +02:00
unknown
f9a80b34c7 Fix calculation of buffer size for _cgets() on Windows. (Bug #10841)
client/mysql.cc:
  Fix calculation of buffer size for _cgets()
2005-06-08 00:43:57 +02:00
unknown
f80fa96d1c Fix memory leak
client/mysql.cc:
  Remove usage of c_ptr_safe() as this causes a linkage problem when compiling MySQL without inline functions
sql/sql_base.cc:
  Don't use c_ptr_safe() on this string as this causes a realloc and the String object (allocated by sql_yacc.yy) is never freed
2005-05-16 20:16:46 +03:00
unknown
29fcd4b318 Merge mysql.com:/home/jimw/my/mysql-4.1-9186
into mysql.com:/home/jimw/my/mysql-4.1-clean


client/mysql.cc:
  Auto merged
2005-05-07 01:05:19 -07:00
unknown
09ca059e4a 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


client/mysql.cc:
  Add #ifdef to only print readline version if we are on a platform that supports readline
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-05-05 17:48:50 +02:00
unknown
f65f279944 BUG#2596 MySQL Client Segmentation Fault on Solaris 9
- Print readline or libedit version


client/mysql.cc:
  Print the version of readline or libedit library used.
2005-04-25 12:05:13 +02:00
unknown
948d88da93 Upgrade to libedit-2.9
BitKeeper/deleted/.del-readline.h~ac6080227e4b72fc:
  Delete: cmd-line-utils/libedit/readline/readline.h
2005-04-21 12:06:46 +02:00
unknown
7dc31480de Change mysql prompt while inside a multiline comment. (Bug #9186)
client/mysql.cc:
  Change prompt to "/*> " when inside a multiline comment.
2005-03-15 17:33:06 -08:00
unknown
5ed4fd6ba9 Fix 'tee' command in mysql client. (Bug #8499)
client/mysql.cc:
  A va_list can't be reused without being copied or reset, so
  don't try to reuse it in tee_fprintf().
2005-03-15 16:37:05 -08:00
unknown
52d19cbd7c fixed conversion errors (Windows IA64 build) 2005-03-07 09:47:24 +01:00
unknown
a8194cd6d2 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1.b4802


BitKeeper/etc/logging_ok:
  auto-union
client/mysql.cc:
  Auto merged
2005-02-25 15:47:36 +04:00
unknown
cb8d9c3ad4 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)




client/mysql.cc:
  Fix wront usage of charset (found during review of pushed code)
include/m_string.h:
  Backported my_strtod() from 5.0
mysql-test/mysql-test-run.sh:
  Run also mysql_client_test with --debug
mysql-test/r/ps_1general.result:
  Safety fix (if mysql_client_test.test fails)
mysql-test/r/type_float.result:
  More test
mysql-test/t/mysql_client_test.test:
  Comments for what to do if this test fails
mysql-test/t/ps_1general.test:
  Safety fix (if mysql_client_test.test fails)
mysql-test/t/type_float.test:
  More test to better test new strtod() function
  Test also bug #7740 (wrong comparsion between integer and float-in-integer-range)
sql/field.cc:
  Backport my_strntod() from 5.0
sql/item.cc:
  Backport my_strntod() from 5.0
sql/item.h:
  Backport my_strntod() from 5.0
sql/item_func.h:
  Backport my_strntod() from 5.0
sql/item_strfunc.cc:
  Backport my_strntod() from 5.0
sql/item_sum.cc:
  Backport my_strntod() from 5.0
sql/item_sum.h:
  Backport my_strntod() from 5.0
sql/procedure.h:
  Backport my_strntod() from 5.0
strings/ctype-simple.c:
  Backport my_strntod() from 5.0
strings/ctype-ucs2.c:
  Backport my_strntod() from 5.0
strings/strtod.c:
  Backport my_strntod() from 5.0
  Change conversion to delay division as long as possible.
  This gives us more exact integer-> float conversion for numbers of type '123.45E+02'
2005-02-22 12:51:23 +02:00
unknown
e8f888a525 mysql.cc:
bug#7571:
  Server & Client characterset are shown under different decriptions
  Switch them into the correct order.


client/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
unknown
935585a336 After review fixes
client/mysql.cc:
  check for "error" added
sql/sql_db.cc:
  typo fixed
2005-02-02 15:52:19 +04:00
unknown
84405cbaa8 Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1.b4802


client/mysql.cc:
  Auto merged
include/mysql_com.h:
  Auto merged
sql/sql_db.cc:
  Auto merged
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-02-02 15:06:36 +04:00
unknown
8bdb500105 fixes/cleanups according to Coverity report 2005-01-24 15:48:25 +01:00
unknown
5847d10712 Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1
into bob.(none):/home/reggie/bk/mysql-4.1


BitKeeper/etc/logging_ok:
  auto-union
client/mysql.cc:
  Auto merged
2005-01-17 14:08:36 -06:00
unknown
31457a6258 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


client/mysql.cc:
  Added code to display mysql.host as prompt when using shared memory
BitKeeper/etc/logging_ok:
  Logging to logging@openlogging.org accepted
2005-01-15 23:19:34 -06:00
unknown
60c1541524 protect against malicious server trying to crash command-line client :) 2005-01-14 22:46:04 +01:00
unknown
427bdc28ee Merge bk@192.168.21.1:/usr/home/bk/mysql-4.1
into deer.(none):/home/hf/work/mysql-4.1.5920


client/mysql.cc:
  Auto merged
2005-01-11 19:58:52 +04:00
unknown
4c8d52aa80 few harmless warnings from automated code-checking tools fixed
client/mysql.cc:
  few harmless warnings from automated code-checking tools fixed
  cleanup
2005-01-08 21:25:31 +01:00
unknown
d3be3cbcfd fix for bug #5920 (embedded-server mysql doesn't handle --defaults-file)
client/mysql.cc:
  bug #5920 (embedded-server mysql doesn't handle --defaults-file)
  defaults files handled
include/my_sys.h:
  bug #5920 (embedded-server mysql doesn't handle --defaults-file)
  get_defaults_file interface added
libmysqld/libmysqld.c:
  just small fix, not related to the bug.
mysys/default.c:
  bug #5920 (embedded-server mysql doesn't handle --defaults-file)
  get_defaults_files implementation
2005-01-03 19:21:54 +04:00
unknown
b824756c00 mysql.cc:
Fix up mysql help messages.


client/mysql.cc:
  Fix up mysql help messages.
2004-12-18 14:30:00 -06:00
unknown
99d2d10097 mysql.cc:
Tweak some help text.


client/mysql.cc:
  Tweak some help text.
2004-11-19 14:53:40 -06:00
unknown
bc6652db9b Fix compiler warnings (detected by Intel's C++ compiler)
Fixed checking of privilege handling in CREATE ... SELECT (Bug #6094)


client/mysql.cc:
  Fix compiler warnings
client/mysqltest.c:
  Fix wrong counting of lines
  Remove compiler warnings
heap/hp_hash.c:
  Fix compiler warnings
innobase/dict/dict0load.c:
  Fix compiler warnings
innobase/include/mem0mem.h:
  Fix compiler warnings
libmysql/client_settings.h:
  Fix compiler warnings
myisam/ft_nlq_search.c:
  Add comments about compiler warnings
myisam/rt_index.c:
  Add comments about compiler warnings
myisam/rt_mbr.c:
  Add comments about compiler warnings
mysql-test/r/ps.result:
  Test case for bug#6094
mysql-test/t/ps.test:
  Test case for bug#6094
mysys/hash.c:
  Fix compiler warnings
mysys/my_handler.c:
  Add comments about compiler warnings
mysys/my_thr_init.c:
  Add comments about compiler warnings
ndb/include/mgmapi/mgmapi.h:
  Fix compiler warnings
regex/main.c:
  Fix compiler warnings
sql/item.h:
  Fix compiler warnings
sql/item_func.h:
  Add comments about compiler warnings
sql/spatial.h:
  Add comments about compiler warnings
sql/sql_lex.h:
  Fix compiler warning
sql/sql_list.h:
  Fix compiler warning
sql/sql_parse.cc:
  Move testing of access rights of tables in CREATE ... SELECT to create_table_precheck() to fix privilege checking in CREATE ... SELECT
  (Bug #6094)
sql/sql_prepare.cc:
  Remove not needed empty line
sql/sql_string.h:
  Fix compiler warnings
strings/ctype-mb.c:
  Fix compiler warnings
2004-10-22 18:44:51 +03:00
unknown
70fe41d2ec A fix (bug #4802 prompt in mysql client shows wrong database after dropping default db).
client/mysql.cc:
  A fix (bug #4802 prompt in mysql client shows wrong database after dropping default db).
  Introduced new get_current_db() function which is called from the com_use()
  and the com_go() if we get SERVER_STATUS_DB_DROPPED.
include/mysql_com.h:
  A fix (bug #4802 prompt in mysql client shows wrong database after dropping default db).
  SERVER_STATUS_DB_DROPPED flag added.
    Note: it is set to 256 to don't conflict with 5.0 ver.
sql/sql_db.cc:
  A fix (bug #4802 prompt in mysql client shows wrong database after dropping default db).
  SERVER_STATUS_DB_DROPPED flag is set/unset.
2004-10-21 17:02:24 +05:00
unknown
64155e3cbb Added option --sigint-ignore to mysql.cc 2004-10-07 22:47:11 +03:00