From: Sergei Golubchik Date: November 30 2012 4:26pm Subject: Re: How can I get LocaleID / LANGID for current thread (thd) / query? List-Archive: http://lists.mysql.com/internals/38644 Message-Id: <20121130162638.GA25556@meddwl.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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