[MDEV-4617] PLUGINS - Show internal Locales in I_S Created: 2013-06-05  Updated: 2013-06-25  Due: 2013-07-06  Resolved: 2013-06-25

Status: Closed
Project: MariaDB Server
Component/s: None
Fix Version/s: 10.0.4

Type: Task Priority: Minor
Reporter: roberto spadim Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None

Attachments: Text File CMakeLists.txt     Text File locale_info.cc    

 Description   

Hi guys, today i don't know what locales are supported by mysql/mariadb
i attached a patch that show locales in server (mariadb 10.0.2)

thanks guys!

EXAMPLE:

SELECT ID, NAME, DESCRIPTION, MAX_MONTH_NAME_LENGTH, MAX_DAY_NAME_LENGTH, DECIMAL_POINT, THOUSAND_SEP FROM information_schema.LOCALES  ORDER BY NAME ASC;

ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOUSAND_SEP
6 ar_AE Arabic - United Arab Emirates 6 8 . ,
7 ar_BH Arabic - Bahrain 6 8 . ,
58 ar_DZ Arabic - Algeria 6 8 . ,
59 ar_EG Arabic - Egypt 6 8 . ,
60 ar_IN Arabic - Iran 6 8 . ,
61 ar_IQ Arabic - Iraq 6 8 . ,
8 ar_JO Arabic - Jordan 12 8 . ,
62 ar_KW Arabic - Kuwait 6 8 . ,
63 ar_LB Arabic - Lebanon 12 8 . ,
64 ar_LY Arabic - Libya 6 8 . ,
65 ar_MA Arabic - Morocco 6 8 . ,
66 ar_OM Arabic - Oman 6 8 . ,
67 ar_QA Arabic - Qatar 6 8 . ,
9 ar_SA Arabic - Saudi Arabia 12 8 .
68 ar_SD Arabic - Sudan 6 8 . ,
10 ar_SY Arabic - Syria 12 8 . ,
69 ar_TN Arabic - Tunisia 6 8 . ,
70 ar_YE Arabic - Yemen 6 8 . ,
11 be_BY Belarusian - Belarus 10 10 , .
12 bg_BG Bulgarian - Bulgaria 9 10 ,
13 ca_ES Catalan - Catalan 8 9 ,
14 cs_CZ Czech - Czech Republic 8 7 ,  
15 da_DK Danish - Denmark 9 7 , .
16 de_AT German - Austria 9 10 ,
71 de_BE German - Belgium 9 10 , .
72 de_CH German - Switzerland 9 10 . '
4 de_DE German - Germany 9 10 , .
73 de_LU German - Luxembourg 9 10 , .
109 el_GR Greek - Greece 11 9 , .
74 en_AU English - Australia 9 9 . ,
75 en_CA English - Canada 9 9 . ,
1 en_GB English - United Kingdom 9 9 . ,
76 en_IN English - India 9 9 . ,
77 en_NZ English - New Zealand 9 9 . ,
78 en_PH English - Philippines 9 9 . ,
0 en_US English - United States 9 9 . ,
79 en_ZA English - South Africa 9 9 . ,
80 en_ZW English - Zimbabwe 9 9 . ,
81 es_AR Spanish - Argentina 10 9 , .
82 es_BO Spanish - Bolivia 10 9 ,
83 es_CL Spanish - Chile 10 9 ,
84 es_CO Spanish - Columbia 10 9 ,
85 es_CR Spanish - Costa Rica 10 9 .
86 es_DO Spanish - Dominican Republic 10 9 .
87 es_EC Spanish - Ecuador 10 9 ,
17 es_ES Spanish - Spain 10 9 ,
88 es_GT Spanish - Guatemala 10 9 .
89 es_HN Spanish - Honduras 10 9 .
90 es_MX Spanish - Mexico 10 9 .
91 es_NI Spanish - Nicaragua 10 9 .
92 es_PA Spanish - Panama 10 9 .
93 es_PE Spanish - Peru 10 9 .
94 es_PR Spanish - Puerto Rico 10 9 .
95 es_PY Spanish - Paraguay 10 9 ,
96 es_SV Spanish - El Salvador 10 9 .
97 es_US Spanish - United States 10 9 . ,
98 es_UY Spanish - Uruguay 10 9 ,
99 es_VE Spanish - Venezuela 10 9 ,
18 et_EE Estonian - Estonia 9 9 ,  
19 eu_ES Basque - Basque 9 10 ,
20 fi_FI Finnish - Finland 9 11 ,  
21 fo_FO Faroese - Faroe Islands 9 12 , .
100 fr_BE French - Belgium 9 8 , .
101 fr_CA French - Canada 9 8 ,  
102 fr_CH French - Switzerland 9 8 ,
5 fr_FR French - France 9 8 ,
103 fr_LU French - Luxembourg 9 8 ,
22 gl_ES Galician - Galician 8 8 ,
23 gu_IN Gujarati - India 10 8 . ,
24 he_IL Hebrew - Israel 7 5 . ,
25 hi_IN Hindi - India 7 9 . ,
26 hr_HR Croatian - Croatia 8 11 ,
27 hu_HU Hungarian - Hungary 10 9 , .
28 id_ID Indonesian - Indonesia 9 6 , .
29 is_IS Icelandic - Iceland 9 12 , .
30 it_CH Italian - Switzerland 9 9 , '
104 it_IT Italian - Italy 9 9 ,
2 ja_JP Japanese - Japan 3 3 . ,
31 ko_KR Korean - Korea 3 3 . ,
32 lt_LT Lithuanian - Lithuania 9 14 , .
33 lv_LV Latvian - Latvia 10 11 ,  
34 mk_MK Macedonian - FYROM 9 10 ,  
35 mn_MN Mongolia - Mongolian 18 6 , .
36 ms_MY Malay - Malaysia 9 6 . ,
37 nb_NO Norwegian(Bokml) - Norway 9 7 , .
105 nl_BE Dutch - Belgium 9 9 , .
38 nl_NL Dutch - The Netherlands 9 9 ,
106 no_NO Norwegian - Norway 9 7 , .
39 pl_PL Polish - Poland 11 12 ,
40 pt_BR Portugese - Brazil 9 7 ,
41 pt_PT Portugese - Portugal 9 7 ,
42 ro_RO Romanian - Romania 10 8 , .
43 ru_RU Russian - Russia 8 11 ,  
44 ru_UA Russian - Ukraine 8 11 , .
45 sk_SK Slovak - Slovakia 9 8 ,  
46 sl_SI Slovenian - Slovenia 9 10 ,  
47 sq_AL Albanian - Albania 7 10 , .
48 sr_RS Serbian - Serbia 9 10 .
107 sv_FI Swedish - Finland 9 7 ,  
3 sv_SE Swedish - Sweden 9 7 ,  
49 ta_IN Tamil - India 10 8 . ,
50 te_IN Telugu - India 10 9 . ,
51 th_TH Thai - Thailand 10 8 . ,
52 tr_TR Turkish - Turkey 7 9 , .
53 uk_UA Ukrainian - Ukraine 8 9 , .
54 ur_PK Urdu - Pakistan 6 6 . ,
55 vi_VN Vietnamese - Vietnam 16 11 , .
56 zh_CN Chinese - Peoples Republic of China 3 3 . ,
108 zh_HK Chinese - Hong Kong SAR 3 3 . ,
57 zh_TW Chinese - Taiwan 3 2 . ,


 Comments   
Comment by Sergei Golubchik [ 2013-06-05 ]

thanks, but could you please convert it into a plugin?

Comment by roberto spadim [ 2013-06-06 ]

hi sergey, sorry i didn't read about plugin
yes i can, any due date to me? i'm a bit busy here, maybe on weekend i can rewrite it as a plugin

Comment by Sergei Golubchik [ 2013-06-06 ]

no due date, take you time

Comment by roberto spadim [ 2013-06-06 ]

nice, i will buy some beers and send the plugin hehehe

Comment by roberto spadim [ 2013-06-09 ]

Hi segey, i rewrite it to plugin, could you check if it's all ok?
i tryed show tables and locale is there
but select * from locale, and show table status don't work (segment fault)
any way to know where is the bug?

Comment by roberto spadim [ 2013-06-09 ]

that's the error of log file:

130608 19:15:27 [ERROR] mysqld got signal 11 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.

To report this bug, see http://kb.askmonty.org/en/reporting-bugs

We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

Server version: 10.0.2-MariaDB-log
key_buffer_size=8388608
read_buffer_size=1048576
max_used_connections=1
max_threads=22
thread_count=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 53584 K bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0x3f74878
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7fbb4f1ffe68 thread_stack 0x48000
mysys/stacktrace.c:247(my_print_stacktrace)[0xabb19b]
sql/signal_handler.cc:153(handle_fatal_signal)[0x6b33b8]
:0()[0x7fbb4eeb51a0]
strings/ctype-utf8.c:2768(my_strcasecmp_utf8)[0xae601a]
sql/sql_show.cc:7384(find_schema_table(THD*, char const*))[0x5ef881]
sql/sql_parse.cc:6480(st_select_lex::add_table_to_list(THD*, Table_ident*, st_mysql_lex_string*, unsigned long, thr_lock_type, enum_mdl_type, List<Index_hint>, st_mysql_lex_string))[0x58f450]
sql/sql_yacc.yy:10072(MYSQLparse(void*))[0x681104]
sql/sql_parse.cc:8116(parse_sql(THD*, Parser_state*, Object_creation_ctx*))[0x5991d6]
sql/sql_parse.cc:6107(mysql_parse)[0x599419]
sql/sql_parse.cc:1276(dispatch_command(enum_server_command, THD*, char*, unsigned int))[0x59aa3c]
sql/sql_connect.cc:1267(do_handle_one_connection(THD*))[0x640d89]
sql/sql_connect.cc:1183(handle_one_connection)[0x640e52]
:0()[0x7fbb4eeade0f]
:0()[0x7fbb4da3431d]

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7fbb1c004c60): is an invalid pointer
Connection ID (thread ID): 1
Status: NOT_KILLED

Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=off,table_elimination=on,extended_keys=off,exists_to_in=off

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

Comment by roberto spadim [ 2013-06-09 ]

sorry my mistake, it's all right =)

Comment by roberto spadim [ 2013-06-09 ]

could put it in 10.0.3?

Comment by roberto spadim [ 2013-06-12 ]

now in 10.0.4?! =)

Comment by roberto spadim [ 2013-06-13 ]

compiler warnings removed
now working with 10.0.3, i will put in production use and make some tests

Comment by roberto spadim [ 2013-06-13 ]

i'm testing in mariadb 10.0.3 with production use and it's nice to test and be closed too

Generated at Thu Feb 08 06:57:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.