List:Internals« Previous MessageNext Message »
From:Sergei Golubchik Date:November 30 2012 4:26pm
Subject:Re: How can I get LocaleID / LANGID for current thread (thd) / query?
View as plain text  
Hi, Shaukat!

On Nov 30, Shaukat Mahmood Ahmad wrote:
> Thanks Sergei for your very helpful and valuable reply, It will be
> great if you can you explain following points,
>   * Is thd->variables.lc_messages->number aligned with microsoft
> defined locale Ids ()

No. Or may be. Not necessarily.
Check the file sql_locale.cc in the source tree. It defines locales and
numbers.  You'll see whether these numbers were chosen to match LocaleID
or not.  But I doubt that they were.

> (http://msdn.microsoft.com/en-us/library/ms912047(v=winembedded.10).aspx).
>   * Can  thd->variables.lc_messages be personalized for current
> connect to mysql.

Yes. thd->variables is the storage for session variables, those that you
see in SHOW SESSION VARIABLES and set with SET SESSION variable_name.

So if it's in thd->variables, you almost always can set it with SET
SESSION.
 
Regards,
Sergei
Thread
How can I get LocaleID / LANGID for current thread (thd) / query?Shaukat Mahmood Ahmad29 Nov
  • Re: How can I get LocaleID / LANGID for current thread (thd) / query?Abhishek Varshney29 Nov
  • Re: How can I get LocaleID / LANGID for current thread (thd) / query?Sergei Golubchik30 Nov
    • Re: How can I get LocaleID / LANGID for current thread (thd) / query?Shaukat Mahmood Ahmad30 Nov
      • Re: How can I get LocaleID / LANGID for current thread (thd) / query?Sergei Golubchik30 Nov
Re: How can I get LocaleID / LANGID for current thread (thd) / query?Shaukat Mahmood Ahmad30 Nov