Commit graph

1741 commits

Author SHA1 Message Date
msvensson@neptunus.(none)
743948404a Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug21215
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0
2006-08-03 11:48:08 +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
jimw@rama.(none)
9d67aacead Merge rama.(none):/home/jimw/my/mysql-5.0-19147
into  rama.(none):/home/jimw/my/mysql-5.0-16502
2006-08-02 19:52:11 -07:00
jimw@rama.(none)
95b3b2ea8d Merge bk-internal:/home/bk/mysql-5.0-maint
into  rama.(none):/home/jimw/my/mysql-5.0-16502
2006-08-02 19:48:12 -07:00
cmiller@zippy.cornsilk.net
dd5eeaf676 Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into  zippy.cornsilk.net:/home/cmiller/work/mysql/m41-maint--07OBQ
2006-08-02 14:57:12 -04:00
kostja@bodhi.local
1b145118b9 Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
2006-08-02 21:54:10 +04:00
evgen@moonbone.local
83896aa8f6 Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into  moonbone.local:/work/tmp_merge-5.0-opt-mysql
2006-08-02 18:11:59 +04:00
evgen@moonbone.local
7f0a080660 Merge moonbone.local:/work/tmp_merge-4.1-opt-mysql
into  moonbone.local:/work/tmp_merge-5.0-opt-mysql
2006-08-02 16:46:55 +04:00
kostja@bodhi.local
4bfc67fc3c Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
2006-08-02 14:13:01 +04:00
holyfoot/hf@mysql.com/deer.(none)
6ebfbf561a Merge bk@192.168.21.1:mysql-5.0-kt
into  mysql.com:/home/hf/work/mysql-5.0.19452
2006-08-02 14:17:16 +05:00
grog@eucla.lemis.com
90c9c72605 BUG#13926: --order-by-primary fails if PKEY contains quote character.
Quote PKEY.
2006-08-02 11:26:08 +09:30
grog@eucla.lemis.com
8597ebaed0 mysqldump.c:
Tidy up style: no space before = or +=.
2006-08-02 10:48:47 +09:30
msvensson@neptunus.(none)
31be565d2e Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-08-01 20:24:30 +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)
5f78c492ec Merge 192.168.0.20:mysql/bug21217/my50-bug21217
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-31 14:42:06 +02:00
msvensson@neptunus.(none)
dce84a7e05 Merge 192.168.0.20:mysql/bug21217/my41-bug21217
into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
2006-07-31 14:41:29 +02: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@shellback.(none)
5a710e8613 Merge shellback.(none):/home/msvensson/mysql/bug21217/my41-bug21217
into  shellback.(none):/home/msvensson/mysql/bug21217/my50-bug21217
2006-07-30 19:33:48 +02:00
msvensson@shellback.(none)
eaae3b2d2b BUG#21217 "mysqltest" client is inconsistent when to log a line number
- Init start_lineno to 0
2006-07-30 19:30:20 +02:00
msvensson@neptunus.(none)
155bf26d61 Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug21042
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-27 12:31:50 +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
msvensson@neptunus.(none)
2bb5f5662f Bug#19890 mysqltest: "query" command is broken
- Allow "query" to be used as a prefix for focing a command to be sent to server
 - Add testcases
2006-07-26 14:02:24 +02:00
jimw@rama.(none)
8489a8db07 Bug #16502: mysqlcheck gets confused with views
Make mysqlcheck skip over views when processing all of the tables in a
  database.
2006-07-24 13:31:20 -07:00
msvensson@neptunus.(none)
e6b324097b Merge neptunus.(none):/home/msvensson/mysql/my50-m-bug19745
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-07-24 16:36:13 +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)
c84cdbf40b Bug#21215 mysqldump creating incomplete backups without warning
- Add call to 'safe_exit' function when db query fails.
2006-07-24 13:10:24 +02:00
kostja@bodhi.local
2ce1a07c89 A fix and a test case for Bug#15752 "Lost connection to MySQL server
when calling a SP from C API"

The bug was caused by lack of checks for misuse in mysql_real_query. 
A stored procedure always returns at least one result, which is the 
status of execution of the procedure itself.
This result, or so-called OK packet, is similar to a result
returned by INSERT/UPDATE/CREATE operations: it contains the overall
status of execution, the number of affected rows and the number of
warnings. The client test program attached to the bug did not read this 
result and ivnoked the next query. In turn, libmysql had no check for 
such scenario and mysql_real_query was simply trying to send that query 
without reading the pending response, thus messing up the communication
protocol.

The fix is to return an error from mysql_real_query when it's called
prior to retrieval of all pending results.
2006-07-24 14:56:53 +04:00
msvensson@neptunus.(none)
9f78d779e3 Don't close connection to mysql before 'safe_exit', that is done in 'safe_exit' if it decides to exit. 2006-07-24 12:48:02 +02:00
msvensson@neptunus.(none)
c2e2ebb1a7 Remove double printout of mysqldump in error message 2006-07-24 12:43:35 +02:00
msvensson@neptunus.(none)
0ab8948c99 Replace sock -> mysql 2006-07-24 12:00:44 +02:00
msvensson@neptunus.(none)
b450438c8b Change tFlag and dFlag into human readable format
tFlag => opt_no_create_info
 dFlag => opt_no_data
2006-07-24 11:56:01 +02:00
msvensson@neptunus.(none)
6c12e990b2 Add function verbose_msg 2006-07-24 11:51:52 +02:00
msvensson@neptunus.(none)
3aa99c062f Bug#10877 mysqldump should use consistent last line
- Add printout in write_footer to tell that mysqldump has completed.
   Ex: -- Dump completed 2006-07-24  8:55:05
2006-07-24 10:56:33 +02:00
jimw@rama.(none)
dc0f4a21e6 Bug #19147: mysqlshow INFORMATION_SCHEMA does not work
When a wildcard database name is given the mysqlshow, but that wildcard
  matches one database *exactly* (it contains the wildcard character), we
  list the contents of that database instead of just listing the database
  name as matching the wildcard. Probably the most common instance of users
  encountering this behavior would be with "mysqlshow information_schema".
2006-07-21 20:29:25 -07:00
holyfoot/hf@mysql.com/deer.(none)
1f064174a4 bug #20950 (mysql_upgrade looks for 'mysqlcheck' not for 'mysqlcheck.exe'
on Windows.

Code added to look for different names on Windows
2006-07-21 17:02:04 +05:00
msvensson@neptunus.(none)
dbb5a408ea Bug#15690 mysqlimport tries to set options the server doesn't understand
- "set @@character_set_database" should be ignored by servers prior to 4.1.1
2006-07-20 17:30:44 +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
tnurnberg@salvation.intern.azundris.com
199bb148fd Merge salvation.intern.azundris.com:/home/tnurnberg/mysql-5.0-release
into  salvation.intern.azundris.com:/home/tnurnberg/work/mysql-5.0-merge
2006-07-19 14:12:30 +02:00
iggy@rolltop.ignatz42.dyndns.org
ad12809f35 Bug# 20221- Dumping of multiple databases containing view(s) yields maleformed dumps. 2006-07-17 18:07:08 -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
9beb95f0ed Merge igreenhoe@bk-internal.mysql.com:/home/bk/mysql-5.0
into  anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/merge-4.1_2_5.0
2006-07-14 06:52:25 -07:00
tnurnberg@mysql.com/salvation.intern.azundris.com
00ec3973f7 Bug#21014: Segmentation fault of mysqldump on view
mysqldump did not select the correct database before trying to dump
views from it. this resulted in an empty result set, which in turn
startled mysql-dump into a core-dump.  this only happened for views,
not for tables, and was only visible with multiple databases that
weren't by sheer luck in the order mysqldump required, anyway. this
fixes by selecting the correct database before dumping views; it also
catches the empty set-condition if it should occur for other reasons.
2006-07-14 12:50:00 +02:00
igreenhoe/greenman@anubis.greendragongames.com
abb75129f8 4.1 -> 5.0 merge 2006-07-13 16:35:25 -07:00
tnurnberg@mysql.com/salvation.intern.azundris.com
7350cb8b5e Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0
into  mysql.com:/home/tnurnberg/work/mysql-5.0-21014
2006-07-14 01:26:19 +02:00
tnurnberg@mysql.com/salvation.intern.azundris.com
4316f715d3 Bug#21014: Segmentation fault of mysqldump on view
mysqldump did not select the correct database before trying to dump
views from it. this resulted in an empty result set, which in turn
startled mysql-dump into a core-dump.  this only happened for views,
not for tables, and was only visible with multiple databases that
weren't by sheer luck in the order mysqldump required, anyway. this
fixes by selecting the correct database before dumping views; it also
catches the empty set-condition if it should occur for other reasons.
2006-07-14 01:25:13 +02:00
igreenhoe/greenman@anubis.greendragongames.com
8e3d69d986 Merge igreenhoe@bk-internal.mysql.com:/home/bk/mysql-4.1-maint
into  anubis.greendragongames.com:/home/greenman/workspace-mysql/mysql/pending/bug-4.1-15977
2006-07-13 00:33:49 -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
holyfoot@deer.(none)
bfdc0cdcff bug #19452 (mysql_upgrade reads [client] section but doesn't handle [host] option 2006-07-03 14:22:39 +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
tnurnberg@mysql.com
d5ff4f6882 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/tnurnberg/mysql-5.0-maint-18462
2006-06-26 16:15:41 +02:00
igreenhoe@mysql.com
85d130c58b Fix for bug #15977 (switch ordering of DISABLE KEYS/LOCK TABLE in mysqldump) 2006-06-21 00:12:23 -07:00
cmiller@zippy.(none)
deca07bdcc Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0-maint
2006-06-20 17:17:04 -04:00
cmiller@bk-internal.mysql.com
b0ebd2fce0 Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into  bk-internal.mysql.com:/data0/bk/mysql-5.0-maint
2006-06-19 14:38:57 +02:00
lars@mysql.com
5937422a53 Merge mysql.com:/users/lthalmann/bkroot/mysql-5.0-rpl
into  mysql.com:/users/lthalmann/bk/MERGE/mysql-5.0-merge
2006-06-19 12:09:24 +02:00
tnurnberg@mysql.com
2b613e4ce7 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/mysql-5.0-maint-17371
2006-06-12 02:46:26 +02:00
igor@rurik.mysql.com
950a000503 Fixed some problems for Windows build 2006-06-06 09:59:45 -07: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
tnurnberg@mysql.com
a717c68739 Merge bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into  mysql.com:/home/mysql-5.0-maint-18462
2006-06-01 07:11:00 +02:00
msvensson@shellback.(none)
c542aa8701 Merge shellback.(none):/home/msvensson/mysql/bug19575/my50-bug19575
into  shellback.(none):/home/msvensson/mysql/mysql-5.0
2006-05-31 16:32:08 +02:00
msvensson@shellback.(none)
fe0e91d501 Bug#20022 mysql-test-run can't be run with secure connections turned on for all testcases
- Part 1, fixes rpl- and federated-tests where connection is made to 127.0.0.1
2006-05-31 16:28:03 +02:00
msvensson@shellback.(none)
20217ba36f Bug#19575 MySQL-shared-5.0.21-0.glibc23 causes segfault in SSL_library_init
- Include prefix files that renames all public functions in yaSSLs
   OpenSSL API to ya<function_name>. They will otherwise conflict
   with OpenSSL functions if loaded by an application that uses OpenSSL
   as well as libmysqlclient with yaSSL support.
2006-05-31 16:19:06 +02:00
tnurnberg@mysql.com
8c24373668 Bug#18462: mysqldump does not dump view structures correctly
(The above problem only occurs with -T -- create a separate file for
each table / view.) This ChangeSet results in correct output of view-
information while omitting the information for the view's stand-in
table. The rationale is that with -T, the user is likely interested
in transferring part of a database, not the db in its entirety (that
would be difficult as replay order is obscure, the files being named
for the table/view they contain rather than getting a sequence number).
2006-05-31 13:36:28 +02:00
tnurnberg@mysql.com
c7ae355d89 Bug#17371: Unable to dump a schema with invalid views
'show create' works even on views that are short of a base-table (this
throw a warning though, like you would expect). Unfortunately, this is
not what mysqldump uses; it creates stand-in tables and hence requests
'show fields' on the view which fails with missing base-tables.  The
--force option prevents the dump from stopping at this point; furthermore
this patch dumps a comment showing create for the offending view for
better diagnostics. This solution was confirmed by submitter as solving
their/clients' problem. Problem might become non-issue once mysqldump no
longer creates stand-in tables.
2006-05-30 14:49:05 +02:00
ramil@mysql.com
4df24774c1 Merge mysql.com:/usr/home/ram/work/mysql-4.1
into  mysql.com:/usr/home/ram/work/mysql-5.0
2006-05-30 13:16:11 +05:00
ramil@mysql.com
8436973fda after merge fix. 2006-05-29 12:32:08 +05:00
ramil@mysql.com
6b2ab800c9 manual merge 2006-05-29 11:17:38 +05:00
grog@mysql.com
1f86b3f100 BUG#17201: Improve handling of views. 2006-05-25 17:30:28 +09:30
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
ramil@production.mysql.com
31eadde21a Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into  production.mysql.com:/usersnfs/rkalimullin/4.1.b18351
2006-05-24 10:08:26 +02:00
ramil@mysql.com
13baf7575f Fix for bug #18536: mysqldump does not maintain table orders as per --tables option 2006-05-19 16:21:32 +05:00
knielsen@mysql.com
b6ee2d2340 Merge mysql.com:/usr/local/mysql/mysql-5.0-vgfix
into  mysql.com:/usr/local/mysql/tmp-5.0
2006-05-15 19:57:12 +02:00
knielsen@mysql.com
fc16aff742 Fix two Valgrind memory leak warnings. 2006-05-15 18:07:18 +02: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
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
msvensson@neptunus.(none)
27c64c715f Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into  neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
2006-05-09 08:26:25 +02:00
ramil@mysql.com
b698a07b1f Fix for bug #18351: mysqlbinlog does not set default charset? 2006-05-04 15:34:20 +05:00
msvensson@neptunus.(none)
7c8c14c435 Move "max-connect-retries" option to get alpabetichal order 2006-05-03 15:53:59 +02:00
msvensson@neptunus.(none)
5563a2f32f Add support for specifyihng the number of reconnec retries oin the command line 2006-05-03 14:04:54 +02:00
holyfoot@mysql.com
aaf2c26e01 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/hf/work/mysql-5.0.clean
2006-05-02 09:01:13 +05:00
holyfoot@deer.(none)
aab0e9c24e Win build fix 2006-05-02 08:59:49 +05:00
jimw@mysql.com
c571f6ff57 Merge bk-internal:/home/bk/mysql-5.0
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-05-01 10:59:14 -07:00
holyfoot@deer.(none)
9b832153f9 Fix for Win build 2006-05-01 22:16:08 +05:00
jimw@mysql.com
9ab852bb35 Merge mysql.com:/home/jimw/my/mysql-5.0-18312
into  mysql.com:/home/jimw/my/mysql-5.0-clean
2006-05-01 09:11:57 -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
holyfoot@mysql.com
059e2f7005 Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/hf/work/mysql-5.0.upgd
2006-04-28 09:19:53 +05:00
holyfoot@deer.(none)
5a75f865c2 bug #18115 (mysql_upgrade on Windows)
pushed in 5.0
2006-04-28 09:07:25 +05: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
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
jimw@mysql.com
c28ea5b03b Bug #18312: mysqltest: --sleep=0 doesn't disable sleep
Allow --sleep=0 to be specified to mysqltest, so that sleep calls
  can be disabled.

  Original patch from Paul DuBois.
2006-04-21 10:48:53 -07: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
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