🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.comp.database.mysql
Article #96

Re: how to change the default charset with GBK or other language of mysql ??

#96
From: Ka
Date: Sun, 27 Jul 2003 18:17
301 lines
16129 bytes
I erase the option --with-charset=gbk
and then compile the package, all is okay this time, so
how to change the default charset to non-latin??

may it come true that I just pass the test with jumping the
test progress so as to cause some crash ??

following is the pass log:

Starting MySQL daemon
Loading Standard Test Databases
Starting Tests

 TEST                         USER   SYSTEM  ELAPSED        RESULT
------------------------------------------------------------------------
alias                         0.09     0.03     0.13       [ pass ]
alter_table                   0.01     0.02     0.06       [ pass ]
analyse                       0.01     0.03     0.04       [ pass ]
auto_increment                0.02     0.02     0.06       [ pass ]
backup                        0.02     0.02     0.05       [ pass ]
bdb-alter-table-1             0.02     0.02     0.66       [ pass ]
bdb-alter-table-2             0.01     0.02     0.06       [ pass ]
bdb-crash                     0.02     0.02     0.48       [ pass ]
bdb-deadlock                  0.01     0.02     0.59       [ pass ]
bdb                           0.03     0.02    18.70       [ pass ]
bench_count_distinct          0.02     0.02     0.06       [ pass ]
bigint                        0.01     0.01     0.04       [ pass ]
binary                        0.01     0.02     0.05       [ pass ]
case                          0.02     0.02     0.04       [ pass ]
check                         0.11     0.18     1.97       [ pass ]
comments                      0.01     0.02     0.04       [ pass ]
compare                       0.01     0.03     0.04       [ pass ]
count_distinct                0.01     0.02     0.05       [ pass ]
create                        0.01     0.01     0.17       [ pass ]
delayed                       0.01     0.02     3.04       [ pass ]
delete                        0.01     0.02     0.04       [ pass ]
dirty-close                   0.02     0.02     0.04       [ pass ]
distinct                      0.02     0.02     0.09       [ pass ]
drop                          0.01     0.02     0.04       [ pass ]
empty_table                   0.02     0.02     0.04       [ pass ]
err000001                     0.01     0.02     0.04       [ pass ]
explain                       0.01     0.02     0.04       [ pass ]
flush_table                   0.02     0.01     0.03       [ pass ]
flush                         0.03     0.02     0.08       [ pass ]
foreign_key                   0.02     0.01     0.04       [ pass ]
fulltext_cache                0.02     0.02     0.04       [ pass ]
fulltext_left_join            0.01     0.02     0.04       [ pass ]
fulltext_multi                0.02     0.01     0.04       [ pass ]
fulltext_order_by             0.01     0.02     0.04       [ pass ]
fulltext                      0.02     0.01     0.05       [ pass ]
fulltext_update               0.02     0.01     0.04       [ pass ]
func_concat                   0.02     0.01     0.04       [ pass ]
func_crypt                    0.01     0.02     0.04       [ pass ]
func_date_add                 0.02     0.02     0.04       [ pass ]
func_equal                    0.01     0.02     0.04       [ pass ]
func_group                    0.03     0.01     0.07       [ pass ]
func_if                       0.02     0.01     0.04       [ pass ]
func_in                       0.01     0.02     0.04       [ pass ]
func_isnull                   0.01     0.02     0.04       [ pass ]
func_like                     0.02     0.02     0.04       [ pass ]
func_math                     0.02     0.02     0.04       [ pass ]
func_misc                     0.01     0.02     0.04       [ pass ]
func_op                       0.01     0.02     0.04       [ pass ]
func_regexp                   0.02     0.01     0.04       [ pass ]
func_set                      0.01     0.02     0.04       [ pass ]
func_str                      0.02     0.01     0.17       [ pass ]
func_system                   0.03     0.00     0.03       [ pass ]
func_test                     0.02     0.01     0.04       [ pass ]
func_timestamp                0.01     0.02     0.04       [ pass ]
func_time                     0.02     0.01     0.06       [ pass ]
gcc296                        0.01     0.03     0.04       [ pass ]
gemini                        ....     ....     ....       [ skipped ]
group_by                      0.02     0.02     0.11       [ pass ]
having                        0.02     0.02     0.04       [ pass ]
heap                          0.01     0.03     0.06       [ pass ]
innodb                        0.02     0.04     2.37       [ pass ]
ins000001                     0.02     0.01     0.04       [ pass ]
insert_select                 0.02     0.01     0.04       [ pass ]
insert                        0.01     0.02     0.04       [ pass ]
isam                          0.00     0.03     1.11       [ pass ]
isolation                     ....     ....     ....       [ skipped ]
join_crash                    0.02     0.02     0.05       [ pass ]
join_outer                    0.01     0.03     0.12       [ pass ]
join                          0.01     0.02     0.13       [ pass ]
key_diff                      0.01     0.01     0.04       [ pass ]
key_primary                   0.02     0.01     0.04       [ pass ]
key                           0.02     0.01     0.06       [ pass ]
keywords                      0.01     0.02     0.04       [ pass ]
kill                          0.01     0.01     5.04       [ pass ]
limit                         0.01     0.02     0.04       [ pass ]
lock                          0.01     0.02     8.05       [ pass ]
merge                         0.01     0.02     0.09       [ pass ]
myisam                        0.02     0.01     2.21       [ pass ]
null_key                      0.01     0.03     0.07       [ pass ]
null                          0.01     0.03     0.04       [ pass ]
odbc                          0.02     0.02     0.04       [ pass ]
order_by                      0.01     0.03     0.08       [ pass ]
outfile                       0.01     0.02     0.04       [ pass ]
overflow                      0.01     0.03     0.03       [ pass ]
raid                          ....     ....     ....       [ skipped ]
range                         0.02     0.01     0.11       [ pass ]
rename                        0.01     0.02     0.05       [ pass ]
replace                       0.02     0.01     0.04       [ pass ]
rollback                      0.01     0.02     0.04       [ pass ]
rpl000001                     0.01     0.02     4.14       [ pass ]
rpl000002                     0.02     0.01     0.09       [ pass ]
rpl000003                     0.03     0.01     0.08       [ pass ]
rpl000004                     0.01     0.02     0.05       [ pass ]
rpl000005                     0.01     0.02     0.08       [ pass ]
rpl000006                     0.03     0.01     0.05       [ pass ]
rpl000007                     0.02     0.02     0.08       [ pass ]
rpl000008                     0.01     0.02     0.08       [ pass ]
rpl000009                     0.01     0.02     0.08       [ pass ]
rpl000010                     0.01     0.02     0.04       [ pass ]
rpl000011                     0.02     0.02     0.05       [ pass ]
rpl000012                     0.01     0.02     0.22       [ pass ]
rpl000013                     0.02     0.02     0.09       [ pass ]
rpl000014                     0.02     0.02     2.06       [ pass ]
rpl000015                     0.03     0.01     0.08       [ pass ]
rpl000017                     0.01     0.02     0.04       [ pass ]
rpl000018                     0.02     0.01     0.08       [ pass ]
rpl_alter                     0.02     0.02     0.15       [ pass ]
rpl_empty_master_crash        0.02     0.02     0.04       [ pass ]
rpl_get_lock                  0.04     0.07     0.37       [ pass ]
rpl_insert_id                 0.02     0.03     0.09       [ pass ]
rpl_mystery22                 0.02     0.01     1.05       [ pass ]
rpl_rotate_logs               0.02     0.03     0.16       [ pass ]
rpl_skip_error                0.02     0.01     0.08       [ pass ]
rpl_sporadic_master           0.02     0.02     0.05       [ pass ]
sel000001                     0.01     0.02     0.04       [ pass ]
sel000002                     0.02     0.01     0.04       [ pass ]
sel000003                     0.01     0.02     0.04       [ pass ]
sel000031                     0.02     0.02     0.04       [ pass ]
sel000032                     0.02     0.01     0.04       [ pass ]
sel000033                     0.02     0.02     0.04       [ pass ]
sel000100                     0.02     0.01     0.04       [ pass ]
select_safe                   0.01     0.01     0.04       [ pass ]
select                        0.06     0.06    11.02       [ pass ]
show_check                    0.02     0.02     0.08       [ pass ]
status                        0.02     0.01     0.54       [ pass ]
tablelock                     0.02     0.01     0.05       [ pass ]
temp_table                    0.02     0.01     0.08       [ pass ]
truncate                      0.01     0.02     0.04       [ pass ]
type_blob                     0.03     0.02     0.12       [ pass ]
type_date                     0.02     0.01     0.06       [ pass ]
type_datetime                 0.01     0.02     0.06       [ pass ]
type_decimal                  0.02     0.02     0.12       [ pass ]
type_enum                     0.02     0.04     0.35       [ pass ]
type_float                    0.01     0.03     0.06       [ pass ]
type_ranges                   0.01     0.03     0.12       [ pass ]
type_set                      0.01     0.02     0.04       [ pass ]
type_timestamp                0.01     0.02     0.05       [ pass ]
type_time                     0.01     0.02     0.04       [ pass ]
type_uint                     0.01     0.01     0.04       [ pass ]
type_year                     0.01     0.01     0.04       [ pass ]
update                        0.01     0.02     0.06       [ pass ]
user_var                      0.01     0.02     0.04       [ pass ]
varbinary                     0.01     0.01     0.04       [ pass ]
variables                     0.02     0.01     0.05       [ pass ]
warnings                      0.01     0.02     0.04       [ pass ]
------------------------------------------------------------------------

Ending Tests
Shutting-down MySQL daemon



"Ka" <kaka@21cn.com> wrote in message news:bg12m1$2de0$1@mail.cn99.com...
> I install a mysql server in default installation with latin charset, but
> I want to use GBK(a chinese charset), so that I can store and
> search chinese words directly.
>
> so, I download, unpack and then rewrite the mysql.spec and then recompile
> the
> package mysql-3.23.56-1.80.src.rpm.
>
> first, this file contains some files:
> [root@a root]# rpm2cpio mysql-3.23.56-1.80.src.rpm |cpio -t
> filter-requires-mysql.sh
> my.cnf
> mysql-3.23.51-manfixes.patch
> mysql-3.23.56.tar.gz
> mysql-errno.patch
> mysql.init
> mysql.logrotate
> mysql.spec
>
> so, I rewrite the mysql.spec with
> ./configure \
>     --with-charset=gbk\
> ......
>
> and then cp all file into /usr/src/redhat/SOURCES/
> #rpmbuild -ba /usr/src/redhat/SOURCES/mysql.spec
>
> all compile is okay,
> but the binary test can not be passed, why ? does it fail in
charset=gbk???
> and following is the part of output :
>
>
>
> + make test
> cd mysql-test ; ./mysql-test-run
> Installing Test Databases
> Removing Stale Files
> Installing Master Databases
> 030727 19:29:53  ../sql/mysqld: Shutdown Complete
>
> Installing Slave Databases
> 030727 19:29:53  ../sql/mysqld: Shutdown Complete
>
> Starting MySQL daemon
> Loading Standard Test Databases
> Starting Tests
>
>  TEST                         USER   SYSTEM  ELAPSED        RESULT
> ------------------------------------------------------------------------
> alias                         0.10     0.09     0.46       [ pass ]
> alter_table                   0.03     0.03     0.18       [ pass ]
> analyse                       0.03     0.03     0.06       [ pass ]
> auto_increment                0.01     0.05     0.12       [ pass ]
> backup                        0.04     0.02     0.12       [ pass ]
> bdb-alter-table-1             0.03     0.02     3.08       [ pass ]
> bdb-alter-table-2             0.04     0.01     0.06       [ pass ]
> bdb-crash                     0.04     0.04     0.36       [ pass ]
> bdb-deadlock                  0.04     0.02     0.35       [ pass ]
> bdb                           0.02     0.07     9.83       [ pass ]
> bench_count_distinct          0.04     0.04     0.13       [ pass ]
> bigint                        0.03     0.03     0.10       [ pass ]
> binary                        ....     ....     ....       [ fail ]
>
>    >> Error at line 44: Result length mismatch <<Below are the diffs
between
> actual and expected results:
> -------------------------------------------------------
> *** r/binary.result     Thu Mar 13 21:46:29 2003
> --- r/binary.reject     Sun Jul 27 19:30:25 2003
> ***************
> *** 1,13 ****
>   name
> - ?
>   ?
>   ?
>   concat("*",name,"*")
> - *?*
>   *?*
>   *?*
>   min(name)     min(concat("*",name,"*"))       max(name)
> max(concat("*",name,"*"))
> ! ?     *?*     ?       *?*
>   name
>   ?
>   ?
> --- 1,13 ----
>   name
>   ?
> + ?
>   ?
>   concat("*",name,"*")
>   *?*
> + *?*
>   *?*
>   min(name)     min(concat("*",name,"*"))       max(name)
> max(concat("*",name,"*"))
> ! ?     *?*     ?       *?*
>   name
>   ?
>   ?
> ***************
> *** 19,26 ****
>   min(name)     min(concat("*",name,"*"))       max(name)
> max(concat("*",name,"*"))
>   ?     *?*     ?       *?*
>   name
> - ?
> - ?
>   name
>   ?
>   ?
> --- 19,24 ----
> -------------------------------------------------------
> Please follow the instructions outlined at
> http://www.mysql.com/doc/R/e/Reporting_mysqltest_bugs.html
> to find the reason to this problem and how to report this.
>
> Aborting. To continue, re-run with '--force'.
>
> Ending Tests
> Shutting-down MySQL daemon
>
> Master shutdown finished
> Slave shutdown finished
> make: *** [test] Error 1
> error: Bad exit status from /var/tmp/rpm-tmp.75496 (%build)
>
>
> RPM build errors:
>     Bad exit status from /var/tmp/rpm-tmp.75496 (%build)
>
>
Technical Details
Message-ID: <bg14vr$2fi4$1@mail.cn99.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!news.cn99.com!not-for-mail
References: <bg12m1$2de0$1@mail.cn99.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111240,386f4970c337af4b
X-Google-Attributes: gid111240,public
X-Google-Thread: 109779,386f4970c337af4b
X-Google-Attributes: gid109779,public
X-Google-Thread: 114450,386f4970c337af4b
X-Google-Attributes: gid114450,public
X-Google-Thread: fe2cf,386f4970c337af4b
X-Google-Attributes: gidfe2cf,public
X-Google-Thread: 10883c,386f4970c337af4b
X-Google-Attributes: gid10883c,public
X-Google-ArrivalTime: 2003-07-27 11:18:17 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!64.152.100.70.MISMATCH!sjc70.webusenet.com!news.webusenet.com!maily.cic.tsinghua.edu.cn!news.cn99.com!not-for-mail
From: "Ka" <kaka@21cn.com>
Newsgroups: cn.comp.database.mysql,free.it.comp.database.mysql,linux.redhat,linux.redhat.misc,mailing.database.mysql
Subject: Re: how to change the default charset with GBK or other language of mysql ??
Date: Mon, 28 Jul 2003 02:17:12 +0800
Organization: Bentium Ltd. (CN99)
Lines: 303
Message-ID: <bg14vr$2fi4$1@mail.cn99.com>
References: <bg12m1$2de0$1@mail.cn99.com>
NNTP-Posting-Host: 61.243.175.141
X-Trace: mail.cn99.com 1059329851 81476 61.243.175.141 (27 Jul 2003 18:17:31 GMT)
X-Complaints-To: usenet@news.cn99.com
NNTP-Posting-Date: Sun, 27 Jul 2003 18:17:31 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165