mariadb/client
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
..
.cvsignore Import changeset 2000-07-31 21:29:14 +02:00
client_priv.h Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-08-25 12:08:26 +03:00
completion_hash.cc few harmless warnings from automated code-checking tools fixed 2005-01-08 21:25:31 +01:00
completion_hash.h upgrade readline to version 4.3 2002-11-19 18:26:53 +04:00
get_password.c Merge with 4.0.14 2003-08-11 22:44:43 +03:00
Makefile.am Makefile.am, configure.in: 2005-09-24 15:51:45 +02:00
my_readline.h mysql.cc: 2004-05-05 22:47:09 +02:00
mysql.cc Bug#17939: Wrong table format when using UTF8 strings 2006-04-17 12:33:45 +05:00
mysqladmin.cc Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-12-04 15:34:47 +02:00
mysqlbinlog.cc Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-12-04 15:34:47 +02:00
mysqlcheck.c Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-12-04 15:34:47 +02:00
mysqldump.c Fix mysqldump crash when encountering a VIEW (when used against a 2006-02-01 12:28:39 -08:00
mysqlimport.c Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-12-04 15:34:47 +02:00
mysqlmanager-pwgen.c Merge with 4.0 2004-09-01 04:12:09 +03:00
mysqlmanagerc.c Added global my_getopt_error_reporter function pointer which is 2004-08-31 21:27:58 +05:00
mysqlshow.c Merge a193-229-222-105.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2005-12-04 15:34:47 +02:00
mysqltest.c mysqltest.c: 2006-03-03 13:57:49 -06:00
readline.cc fixed conversion errors (Windows IA64 build) 2005-03-07 09:47:24 +01:00
sql_string.cc a compiler must see '#pragma implementation' *before* 2005-06-05 19:38:52 +02:00
sql_string.h Add ifdefs to control when "#pragma implementation" should be used 2005-05-26 12:09:14 +02:00