<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>3454</bug_id>
          
          <creation_ts>2004-01-09 23:42:55 +0300</creation_ts>
          <short_desc>Initscript fails to find proper charset</short_desc>
          <delta_ts>2005-08-29 14:49:40 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>MySQL-server</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Dmitry Vukolov">dav</reporter>
          <assigned_to name="Kachalov Anton">mouse</assigned_to>
          <cc>ldv</cc>
    
    <cc>mike</cc>
    
    <cc>nickel</cc>
    
    <cc>rider</cc>
    
    <cc>shaba</cc>
    
    <cc>svgol</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>11125</commentid>
    <comment_count>0</comment_count>
    <who name="Dmitry Vukolov">dav</who>
    <bug_when>2004-01-09 23:42:55 +0300</bug_when>
    <thetext>LC_COLLATE value showed by the locale command is not necessarily quoted. And if
it&apos;s not mysqld initscript always sets charset to latin1.

$ rpm -q MySQL-server
MySQL-server-4.0.17-alt1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11126</commentid>
    <comment_count>1</comment_count>
      <attachid>327</attachid>
    <who name="Dmitry Vukolov">dav</who>
    <bug_when>2004-01-09 23:44:33 +0300</bug_when>
    <thetext>Created attachment 327
initscript-charset.patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11134</commentid>
    <comment_count>2</comment_count>
    <who name="Kachalov Anton">mouse</who>
    <bug_when>2004-01-10 16:54:51 +0300</bug_when>
    <thetext>if you setup locale from /etc/sysconfig/i18n or by LC_ALL var, LC_COLLATE var
would be always quoted. But if you run LC_COLLATE=ru_RU.KOI8-R service mysqld
start, charset detection would failed - it&apos;s incorrect.
How do you run mysqld? How to reproduce this bug?
Latin1 sets up always in follow cases: if didn&apos;t set CHSET var in mysqld
initscript or autodetection didn&apos;t find proper charset.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11135</commentid>
    <comment_count>3</comment_count>
    <who name="Dmitry Vukolov">dav</who>
    <bug_when>2004-01-10 20:57:14 +0300</bug_when>
    <thetext>$ service mysqld start
Adjusting environment for mysqld:                                       [ DONE ]
Unable to find proper charset from system locale, setting &apos;latin1&apos;.
Please edit mysqld init script and set proper charset.
Starting safe_mysqld service:                                           [ DONE ]

$ cat /etc/sysconfig/i18n
SYSFONT=UniCyr_8x16
LC_CTYPE=ru_RU.KOI8-R
LC_MONETARY=ru_RU.KOI8-R
LANGUAGE=ru_RU.KOI8-R
LC_TIME=ru_RU.KOI8-R
LC_NUMERIC=ru_RU.KOI8-R
LC_COLLATE=ru_RU.KOI8-R
LC_MESSAGES=ru_RU.KOI8-R
LANG=ru_RU.KOI8-R
SYSFONTACM=koi8-r

$ locale
LANG=ru_RU.KOI8-R
LC_CTYPE=ru_RU.KOI8-R
LC_NUMERIC=ru_RU.KOI8-R
LC_TIME=ru_RU.KOI8-R
LC_COLLATE=ru_RU.KOI8-R
LC_MONETARY=ru_RU.KOI8-R
LC_MESSAGES=ru_RU.KOI8-R
LC_PAPER=&quot;ru_RU.KOI8-R&quot;
LC_NAME=&quot;ru_RU.KOI8-R&quot;
LC_ADDRESS=&quot;ru_RU.KOI8-R&quot;
LC_TELEPHONE=&quot;ru_RU.KOI8-R&quot;
LC_MEASUREMENT=&quot;ru_RU.KOI8-R&quot;
LC_IDENTIFICATION=&quot;ru_RU.KOI8-R&quot;
LC_ALL=</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11187</commentid>
    <comment_count>4</comment_count>
    <who name="Kachalov Anton">mouse</who>
    <bug_when>2004-01-12 16:18:31 +0300</bug_when>
    <thetext>It won&apos;t to reproduce.
I&apos;ll apply this patch as workaround. Wait for alt2.
And what is your system name/version?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11198</commentid>
    <comment_count>5</comment_count>
    <who name="Dmitry Vukolov">dav</who>
    <bug_when>2004-01-13 09:18:44 +0300</bug_when>
    <thetext>Originally it was Master 2.0 long ago. Now it&apos;s partly old Sisyphus, partly
current Sisyphus.

$ rpm -q glibc-locales sh
glibc-locales-2.2.6-alt0.11
sh-2.05b-alt6</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11199</commentid>
    <comment_count>6</comment_count>
    <who name="Dmitry Vukolov">dav</who>
    <bug_when>2004-01-13 09:34:28 +0300</bug_when>
    <thetext>BTW, look what I&apos;ve found:

$ locale | fgrep LC_COLLATE
LC_COLLATE=ru_RU.KOI8-R
$ unset LC_COLLATE
$ . /etc/sysconfig/i18n
$ locale | fgrep LC_COLLATE
LC_COLLATE=&quot;ru_RU.KOI8-R&quot;

Weird, isn&apos;t it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11831</commentid>
    <comment_count>7</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2004-02-17 19:06:10 +0300</bug_when>
    <thetext>Proposed change from Alexey Morozov 
 
default_charset=&quot;$(. /etc/sysconfig/i18n &amp;&amp; locale | 
sed -ne &apos;s/^LC_COLLATE=&quot;\?[^&quot;.]\+\.\([^&quot;]\+\)&quot;\?$/\1/p&apos;)&quot; 
 </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11833</commentid>
    <comment_count>8</comment_count>
    <who name="Dmitry V. Levin">ldv</who>
    <bug_when>2004-02-17 19:08:47 +0300</bug_when>
    <thetext>*** Bug 3709 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>11840</commentid>
    <comment_count>9</comment_count>
    <who name="Kachalov Anton">mouse</who>
    <bug_when>2004-02-18 17:00:06 +0300</bug_when>
    <thetext>fixed in 4.0.18-alt1</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>327</attachid>
            <date>2004-01-09 23:44:33 +0300</date>
            <delta_ts>2004-01-09 23:44:33 +0300</delta_ts>
            <desc>initscript-charset.patch</desc>
            <filename>MySQL-server-4.0.17-alt1-init-charset.patch</filename>
            <type>text/plain</type>
            <size>474</size>
            <attacher name="Dmitry Vukolov">dav</attacher>
            
              <data encoding="base64">LS0tIG15c3FsZH4JMjAwMy0xMS0yOCAxOToyNDowOSArMDMwMAorKysgbXlzcWxkCTIwMDQtMDEt
MDkgMjM6MzI6NDQgKzAzMDAKQEAgLTMwLDcgKzMwLDcgQEAKIAkJWyAtZiAiL3Vzci9zaGFyZS9t
eXNxbC9jaGFyc2V0cy8kQ0hTRVQuY29uZiIgXSAmJiByZXR1cm4KIAkJZWNobyAiVW5hYmxlIHRv
IGZpbmQgY2hhcnNldDogJENIU0VUIgogCWZpCi0JZGVmYXVsdF9jaGFyc2V0PSIkKC4gL2V0Yy9z
eXNjb25maWcvaTE4biAmJiBsb2NhbGUgfHNlZCAtbmUgJ3MvXkxDX0NPTExBVEU9IlteIi5dXCtc
LlwoW14iXVwrXCkiJC9cMS9wJykiCisJZGVmYXVsdF9jaGFyc2V0PSIkKC4gL2V0Yy9zeXNjb25m
aWcvaTE4biAmJiBsb2NhbGUgfHNlZCAtbmUgJ3MvXkxDX0NPTExBVEU9IipbXiIuXVwrXC5cKFte
Il1cK1wpIiokL1wxL3AnKSIKIAljYXNlICIkZGVmYXVsdF9jaGFyc2V0IiBpbgogCQlDUDEyNTEp
CiAJCQlDSFNFVD1jcDEyNTEK
</data>

          </attachment>
      

    </bug>

</bugzilla>