From af2f9b90fa7e90468eadfbb24256b0be87dd5184 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 4 May 2006 11:55:09 +0500 Subject: [PATCH 01/20] Bugs#17647: Trouble with "create database" Problem: if a user was granted privileges on database "d1", it also was able to act on "D1" (i.e. in upper case), even on Unix with case sensitive file system. Fix: Initialize grant hash to use binary comparison if lower_case_file_system is not set (on most unixes), and case insensitive comparison otherwise (Windows, MacOSX). sql/sql_acl.cc: Initialize hash to use binary comparison with case sensitive FS. mysql-test/include/have_case_sensitive_file_system.inc: New BitKeeper file ``mysql-test/include/have_case_sensitive_file_system.inc'' Backporting from 5.1 mysql-test/r/case_sensitive_file_system.require: New BitKeeper file ``mysql-test/r/case_sensitive_file_system.require'' Backporting from 5.1 mysql-test/r/lowercase_fs_off.result: Adding test case mysql-test/t/lowercase_fs_off.test: Adding test case --- .../have_case_sensitive_file_system.inc | 4 +++ .../r/case_sensitive_file_system.require | 2 ++ mysql-test/r/lowercase_fs_off.result | 11 ++++++++ mysql-test/t/lowercase_fs_off.test | 27 +++++++++++++++++++ sql/sql_acl.cc | 4 ++- 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 mysql-test/include/have_case_sensitive_file_system.inc create mode 100644 mysql-test/r/case_sensitive_file_system.require create mode 100644 mysql-test/r/lowercase_fs_off.result create mode 100644 mysql-test/t/lowercase_fs_off.test diff --git a/mysql-test/include/have_case_sensitive_file_system.inc b/mysql-test/include/have_case_sensitive_file_system.inc new file mode 100644 index 00000000000..730af975497 --- /dev/null +++ b/mysql-test/include/have_case_sensitive_file_system.inc @@ -0,0 +1,4 @@ +--require r/case_sensitive_file_system.require +--disable_query_log +show variables like "lower_case_file_system"; +--enable_query_log diff --git a/mysql-test/r/case_sensitive_file_system.require b/mysql-test/r/case_sensitive_file_system.require new file mode 100644 index 00000000000..d0bdc6bf4ce --- /dev/null +++ b/mysql-test/r/case_sensitive_file_system.require @@ -0,0 +1,2 @@ +Variable_name Value +lower_case_file_system OFF diff --git a/mysql-test/r/lowercase_fs_off.result b/mysql-test/r/lowercase_fs_off.result new file mode 100644 index 00000000000..f610b959a47 --- /dev/null +++ b/mysql-test/r/lowercase_fs_off.result @@ -0,0 +1,11 @@ +create database d1; +grant all on d1.* to 'sample'@'localhost' identified by 'password'; +flush privileges; +select database(); +database() +d1 +create database d2; +ERROR 42000: Access denied for user 'sample'@'localhost' to database 'd2' +create database D1; +ERROR 42000: Access denied for user 'sample'@'localhost' to database 'D1' +drop database if exists d1; diff --git a/mysql-test/t/lowercase_fs_off.test b/mysql-test/t/lowercase_fs_off.test new file mode 100644 index 00000000000..7f7b573e7ee --- /dev/null +++ b/mysql-test/t/lowercase_fs_off.test @@ -0,0 +1,27 @@ +# +# Specific tests for case sensitive file systems +# i.e. lower_case_filesystem=OFF +# +-- source include/have_case_sensitive_file_system.inc + +connect (master,localhost,root,,); +connection master; +create database d1; +grant all on d1.* to 'sample'@'localhost' identified by 'password'; +flush privileges; + +connect (sample,localhost,sample,password,d1); +connection sample; +select database(); +--error 1044 +create database d2; +--error 1044 +create database D1; +disconnect sample; + +connection master; +drop database if exists d1; +disconnect master; +connection default; + +# End of 4.1 tests diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 4626e5892a4..d1cd001e306 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -146,7 +146,9 @@ my_bool acl_init(bool dont_read_acl_tables) acl_cache= new hash_filo(ACL_CACHE_SIZE, 0, 0, (hash_get_key) acl_entry_get_key, - (hash_free_key) free, system_charset_info); + (hash_free_key) free, + lower_case_file_system ? + system_charset_info : &my_charset_bin); if (dont_read_acl_tables) { DBUG_RETURN(0); /* purecov: tested */ From e7e9cc25025250bd886ca75ff1f34ed05d8fe912 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jun 2006 14:00:26 +0200 Subject: [PATCH 02/20] ndb - bug#20197 also close scan which are in "delivered" state, as it's impossible to release locks afterwards backport from 5.1 ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: ndb - bug#20197 also close scan which are in "delivered" state, as it's impossible to release locks afterwards --- ndb/src/kernel/blocks/dbtc/DbtcMain.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp index 2bd61296554..a71942f5cc8 100644 --- a/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp +++ b/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp @@ -6978,6 +6978,18 @@ void Dbtc::checkScanActiveInFailedLqh(Signal* signal, found = true; } } + + ScanFragList deliv(c_scan_frag_pool, scanptr.p->m_delivered_scan_frags); + for(deliv.first(ptr); !ptr.isNull(); deliv.next(ptr)) + { + jam(); + if (refToNode(ptr.p->lqhBlockref) == failedNodeId) + { + jam(); + found = true; + break; + } + } } if(found){ jam(); From 505c2b3d5f0178aa9bdb9f97da707104489250a5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Jun 2006 12:03:28 +0200 Subject: [PATCH 03/20] ndb - bug#19164 set max value on ports ndb/src/mgmsrv/ConfigInfo.cpp: set max vlue on ports --- ndb/src/mgmsrv/ConfigInfo.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ndb/src/mgmsrv/ConfigInfo.cpp b/ndb/src/mgmsrv/ConfigInfo.cpp index 66a400a3e22..54c4863b969 100644 --- a/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/ndb/src/mgmsrv/ConfigInfo.cpp @@ -30,6 +30,7 @@ extern my_bool opt_core; #define MAX_LINE_LENGTH 255 #define KEY_INTERNAL 0 #define MAX_INT_RNIL 0xfffffeff +#define MAX_PORT_NO 65535 #define _STR_VALUE(x) #x #define STR_VALUE(x) _STR_VALUE(x) @@ -426,7 +427,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, UNDEFINED, "1", - STR_VALUE(MAX_INT_RNIL) }, + STR_VALUE(MAX_PORT_NO) }, { CFG_DB_NO_REPLICAS, @@ -1430,7 +1431,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, NDB_PORT, "0", - STR_VALUE(MAX_INT_RNIL) }, + STR_VALUE(MAX_PORT_NO) }, { KEY_INTERNAL, @@ -1442,7 +1443,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, UNDEFINED, "0", - STR_VALUE(MAX_INT_RNIL) }, + STR_VALUE(MAX_PORT_NO) }, { CFG_NODE_ARBIT_RANK, @@ -1573,7 +1574,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "0", - STR_VALUE(MAX_INT_RNIL) }, + STR_VALUE(MAX_PORT_NO) }, { CFG_TCP_SEND_BUFFER_SIZE, @@ -1679,7 +1680,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "0", - STR_VALUE(MAX_INT_RNIL) }, + STR_VALUE(MAX_PORT_NO) }, { CFG_SHM_SIGNUM, @@ -1879,7 +1880,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_INT, MANDATORY, "0", - STR_VALUE(MAX_INT_RNIL) }, + STR_VALUE(MAX_PORT_NO) }, { CFG_SCI_HOST1_ID_0, From 7072a63acd51b0b2870b9c14937ff03bd47f8e4a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 26 Jun 2006 12:16:39 +0200 Subject: [PATCH 04/20] ndb - bug#20683 part 1 - make sure return code is propagated from request tracker ndb/src/kernel/vm/RequestTracker.hpp: propagate return value ndb/src/kernel/vm/SafeCounter.hpp: make sure object is not initialized in case of seize() failure, to make sure destructor doesnt assert --- ndb/src/kernel/vm/RequestTracker.hpp | 4 ++-- ndb/src/kernel/vm/SafeCounter.hpp | 22 ++++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ndb/src/kernel/vm/RequestTracker.hpp b/ndb/src/kernel/vm/RequestTracker.hpp index 5fd1ae7255a..ac9ed85ae4b 100644 --- a/ndb/src/kernel/vm/RequestTracker.hpp +++ b/ndb/src/kernel/vm/RequestTracker.hpp @@ -26,12 +26,12 @@ public: void init() { m_confs.clear(); m_nRefs = 0; } template - void init(SafeCounterManager& mgr, + bool init(SafeCounterManager& mgr, NodeReceiverGroup rg, Uint16 GSN, Uint32 senderData) { init(); SafeCounter tmp(mgr, m_sc); - tmp.init(rg, GSN, senderData); + return tmp.init(rg, GSN, senderData); } bool ignoreRef(SafeCounterManager& mgr, Uint32 nodeId) diff --git a/ndb/src/kernel/vm/SafeCounter.hpp b/ndb/src/kernel/vm/SafeCounter.hpp index 1f3cc15c2d6..869a7ef671f 100644 --- a/ndb/src/kernel/vm/SafeCounter.hpp +++ b/ndb/src/kernel/vm/SafeCounter.hpp @@ -230,10 +230,13 @@ inline bool SafeCounter::init(NodeReceiverGroup rg, Uint16 GSN, Uint32 senderData){ - bool b = init(rg.m_block, GSN, senderData); - m_nodes = rg.m_nodes; - m_count = m_nodes.count(); - return b; + if (init(rg.m_block, GSN, senderData)) + { + m_nodes = rg.m_nodes; + m_count = m_nodes.count(); + return true; + } + return false; } template @@ -241,10 +244,13 @@ inline bool SafeCounter::init(NodeReceiverGroup rg, Uint32 senderData){ - bool b = init(rg.m_block, Ref::GSN, senderData); - m_nodes = rg.m_nodes; - m_count = m_nodes.count(); - return b; + if (init(rg.m_block, Ref::GSN, senderData)) + { + m_nodes = rg.m_nodes; + m_count = m_nodes.count(); + return true; + } + return false; } inline From 16ce188ded0305b4fe629546a0bd28592371ceeb Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Jun 2006 11:26:41 +0200 Subject: [PATCH 05/20] Bug#11824 - internal /tmp/*.{MYD,MYI} files remain, causing subsequent queries to fail Very complex select statements can create temporary tables that are too big to be represented as a MyISAM table. This was not checked at table creation time, but only at open time. The result was an attempt to delete the "impossible" table. But if the server is built --with-raid, MyISAM tries to open the table before deleting the files. It needs to find out if the table uses the raid support and how many raid chunks there are. This is done with an open "for repair", which will almost always succeed. But in this case we have an "impossible" table. The open failed. Hence the files were not deleted. Also the error message was a bit unspecific. I turned an open error in this situation into the assumption of having no raid support on the table. Thus the normal data file is tried to be deleted. This may however leave existing raid chunks behind. I also added a check in mi_create() to prevent the creation of an "impossible" table. A more decriptive error message is given in this case. No test case. The required select statement is way too large for the test suite. I added a test script to the bug report. myisam/mi_create.c: Bug#11824 - internal /tmp/*.{MYD,MYI} files remain, causing subsequent queries to fail Added a check to mi_create() that the table description header of the index file does not exceed 64KB. The header has only 16 bits to encode its length. myisam/mi_delete_table.c: Bug#11824 - internal /tmp/*.{MYD,MYI} files remain, causing subsequent queries to fail Interpret error in table open as not having a raid configuration on the tbale. Thus try to delete the normal data file, but leave behind raid chunks if they exist. --- myisam/mi_create.c | 17 +++++++++++++++++ myisam/mi_delete_table.c | 24 ++++++++++++++++++------ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/myisam/mi_create.c b/myisam/mi_create.c index 41c965c7c80..4183040500b 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -59,6 +59,8 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, my_off_t key_root[MI_MAX_POSSIBLE_KEY],key_del[MI_MAX_KEY_BLOCK_SIZE]; MI_CREATE_INFO tmp_create_info; DBUG_ENTER("mi_create"); + DBUG_PRINT("enter", ("keys: %u columns: %u uniques: %u flags: %u", + keys, columns, uniques, flags)); if (!ci) { @@ -447,6 +449,16 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, uniques * MI_UNIQUEDEF_SIZE + (key_segs + unique_key_parts)*HA_KEYSEG_SIZE+ columns*MI_COLUMNDEF_SIZE); + DBUG_PRINT("info", ("info_length: %u", info_length)); + /* There are only 16 bits for the total header length. */ + if (info_length > 65535) + { + my_printf_error(0, "MyISAM table '%s' has too many columns and/or " + "indexes and/or unique constraints.", + MYF(0), name + dirname_length(name)); + my_errno= HA_WRONG_CREATE_OPTION; + goto err; + } bmove(share.state.header.file_version,(byte*) myisam_file_magic,4); ci->old_options=options| (ci->old_options & HA_OPTION_TEMP_COMPRESS_RECORD ? @@ -594,6 +606,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, errpos=3; } + DBUG_PRINT("info", ("write state info and base info")); if (mi_state_info_write(file, &share.state, 2) || mi_base_info_write(file, &share.base)) goto err; @@ -607,6 +620,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, #endif /* Write key and keyseg definitions */ + DBUG_PRINT("info", ("write key and keyseg definitions")); for (i=0 ; i < share.base.keys - uniques; i++) { uint sp_segs=(keydefs[i].flag & HA_SPATIAL) ? 2*SPDIMS : 0; @@ -655,6 +669,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, } /* Save unique definition */ + DBUG_PRINT("info", ("write unique definitions")); for (i=0 ; i < share.state.header.uniques ; i++) { if (mi_uniquedef_write(file, &uniquedefs[i])) @@ -665,6 +680,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, goto err; } } + DBUG_PRINT("info", ("write field definitions")); for (i=0 ; i < share.base.fields ; i++) if (mi_recinfo_write(file, &recinfo[i])) goto err; @@ -679,6 +695,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, #endif /* Enlarge files */ + DBUG_PRINT("info", ("enlarge to keystart: %lu", (ulong) share.base.keystart)); if (my_chsize(file,(ulong) share.base.keystart,0,MYF(0))) goto err; diff --git a/myisam/mi_delete_table.c b/myisam/mi_delete_table.c index 6843881568d..2fba31cf8be 100644 --- a/myisam/mi_delete_table.c +++ b/myisam/mi_delete_table.c @@ -34,12 +34,24 @@ int mi_delete_table(const char *name) #ifdef USE_RAID { MI_INFO *info; - /* we use 'open_for_repair' to be able to delete a crashed table */ - if (!(info=mi_open(name, O_RDONLY, HA_OPEN_FOR_REPAIR))) - DBUG_RETURN(my_errno); - raid_type = info->s->base.raid_type; - raid_chunks = info->s->base.raid_chunks; - mi_close(info); + /* + When built with RAID support, we need to determine if this table + makes use of the raid feature. If yes, we need to remove all raid + chunks. This is done with my_raid_delete(). Unfortunately it is + necessary to open the table just to check this. We use + 'open_for_repair' to be able to open even a crashed table. If even + this open fails, we assume no raid configuration for this table + and try to remove the normal data file only. This may however + leave the raid chunks behind. + */ + if (!(info= mi_open(name, O_RDONLY, HA_OPEN_FOR_REPAIR))) + raid_type= 0; + else + { + raid_type= info->s->base.raid_type; + raid_chunks= info->s->base.raid_chunks; + mi_close(info); + } } #ifdef EXTRA_DEBUG check_table_is_closed(name,"delete"); From d8e9dd6110c98e11181d12b4c44da3cc5c09a08d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Jun 2006 18:17:53 +0200 Subject: [PATCH 06/20] Move "mysqldumpslow" from the client RPM to the server RPM (bug#20216). --- support-files/mysql.spec.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index d11fc5ef440..5796e776b83 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -469,6 +469,7 @@ fi %attr(755, root, root) %{_bindir}/mysql_convert_table_format %attr(755, root, root) %{_bindir}/mysqld_multi %attr(755, root, root) %{_bindir}/mysqld_safe +%attr(755, root, root) %{_bindir}/mysqldumpslow %attr(755, root, root) %{_bindir}/mysql_explain_log %attr(755, root, root) %{_bindir}/mysql_fix_extensions %attr(755, root, root) %{_bindir}/mysql_fix_privilege_tables @@ -506,7 +507,6 @@ fi %attr(755, root, root) %{_bindir}/mysqlbinlog %attr(755, root, root) %{_bindir}/mysqlcheck %attr(755, root, root) %{_bindir}/mysqldump -%attr(755, root, root) %{_bindir}/mysqldumpslow %attr(755, root, root) %{_bindir}/mysqlimport %attr(755, root, root) %{_bindir}/mysqlshow @@ -578,6 +578,10 @@ fi # itself - note that they must be ordered by date (important when # merging BK trees) %changelog +* Tue Jun 27 2006 Joerg Bruehe + +- move "mysqldumpslow" from the client RPM to the server RPM (bug#20216) + * Sat May 20 2006 Kent Boortz - Always compile for PIC, position independent code. From 0b235009e60929ef254e20b48ae1254196580372 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Jun 2006 14:27:37 +0200 Subject: [PATCH 07/20] Bug#17877 - Corrupted spatial index CHECK TABLE could complain about a fully intact spatial index. A wrong comparison operator was used for table checking. The result was that it checked for non-matching spatial keys. This succeeded if at least two different keys were present, but failed if only the matching key was present. I fixed the key comparison. myisam/mi_check.c: Bug#17877 - Corrupted spatial index Fixed the comparison operator for checking a spatial index. Using MBR_EQUAL | MBR_DATA to compare for equality and include the data pointer in the comparison. The latter finds the index entry that points to the current record. This is necessary for non-unique indexes. The old operator, SEARCH_SAME, is unknown to the rtree search functions and handled like MBR_DISJOINT. myisam/mi_key.c: Bug#17877 - Corrupted spatial index Added a missing DBUG_RETURN. myisam/rt_index.c: Bug#17877 - Corrupted spatial index Included the data pointer in the copy of the search key. This is necessary for searching the index entry that points to a specific record if the search_flag contains MBR_DATA. myisam/rt_mbr.c: Bug#17877 - Corrupted spatial index Extended the RT_CMP() macro with an assert for an unexpected comparison operator. mysql-test/r/gis-rtree.result: Bug#17877 - Corrupted spatial index The test result. mysql-test/t/gis-rtree.test: Bug#17877 - Corrupted spatial index The test case. --- myisam/mi_check.c | 5 ++-- myisam/mi_key.c | 2 +- myisam/rt_index.c | 8 ++++--- myisam/rt_mbr.c | 6 ++++- mysql-test/r/gis-rtree.result | 40 +++++++++++++++++++++++++++++++ mysql-test/t/gis-rtree.test | 44 +++++++++++++++++++++++++++++++++++ 6 files changed, 98 insertions(+), 7 deletions(-) diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 2395640d5bf..1e62e5e641d 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -1155,12 +1155,13 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) */ int search_result= (keyinfo->flag & HA_SPATIAL) ? rtree_find_first(info, key, info->lastkey, key_length, - SEARCH_SAME) : + MBR_EQUAL | MBR_DATA) : _mi_search(info,keyinfo,info->lastkey,key_length, SEARCH_SAME, info->s->state.key_root[key]); if (search_result) { - mi_check_print_error(param,"Record at: %10s Can't find key for index: %2d", + mi_check_print_error(param,"Record at: %10s " + "Can't find key for index: %2d", llstr(start_recpos,llbuff),key+1); if (error++ > MAXERR || !(param->testflag & T_VERBOSE)) goto err2; diff --git a/myisam/mi_key.c b/myisam/mi_key.c index cb85febd869..eaa854b1a37 100644 --- a/myisam/mi_key.c +++ b/myisam/mi_key.c @@ -54,7 +54,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, TODO: nulls processing */ #ifdef HAVE_SPATIAL - return sp_make_key(info,keynr,key,record,filepos); + DBUG_RETURN(sp_make_key(info,keynr,key,record,filepos)); #else DBUG_ASSERT(0); /* mi_open should check that this never happens*/ #endif diff --git a/myisam/rt_index.c b/myisam/rt_index.c index 97554dca4e6..1806476dc39 100644 --- a/myisam/rt_index.c +++ b/myisam/rt_index.c @@ -183,9 +183,11 @@ int rtree_find_first(MI_INFO *info, uint keynr, uchar *key, uint key_length, return -1; } - /* Save searched key */ - memcpy(info->first_mbr_key, key, keyinfo->keylength - - info->s->base.rec_reflength); + /* + Save searched key, include data pointer. + The data pointer is required if the search_flag contains MBR_DATA. + */ + memcpy(info->first_mbr_key, key, keyinfo->keylength); info->last_rkey_length = key_length; info->rtree_recursion_depth = -1; diff --git a/myisam/rt_mbr.c b/myisam/rt_mbr.c index c43daec2f7c..897862c1c9a 100644 --- a/myisam/rt_mbr.c +++ b/myisam/rt_mbr.c @@ -52,10 +52,14 @@ if (EQUAL_CMP(amin, amax, bmin, bmax)) \ return 1; \ } \ - else /* if (nextflag & MBR_DISJOINT) */ \ + else if (nextflag & MBR_DISJOINT) \ { \ if (DISJOINT_CMP(amin, amax, bmin, bmax)) \ return 1; \ + }\ + else /* if unknown comparison operator */ \ + { \ + DBUG_ASSERT(0); \ } #define RT_CMP_KORR(type, korr_func, len, nextflag) \ diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result index f479fc41ffb..3fcae8843c0 100644 --- a/mysql-test/r/gis-rtree.result +++ b/mysql-test/r/gis-rtree.result @@ -817,3 +817,43 @@ check table t1 extended; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +CREATE TABLE t1 ( +c1 geometry NOT NULL default '', +SPATIAL KEY i1 (c1(32)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +INSERT INTO t1 (c1) VALUES ( +PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, + -18.6055555000 -66.8158332999, + -18.7186111000 -66.8102777000, + -18.7211111000 -66.9269443999, + -18.6086111000 -66.9327777000))')); +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; +CREATE TABLE t1 ( +c1 geometry NOT NULL default '', +SPATIAL KEY i1 (c1(32)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +INSERT INTO t1 (c1) VALUES ( +PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, + -18.6055555000 -66.8158332999, + -18.7186111000 -66.8102777000, + -18.7211111000 -66.9269443999, + -18.6086111000 -66.9327777000))')); +INSERT INTO t1 (c1) VALUES ( +PolygonFromText('POLYGON((-65.7402776999 -96.6686111000, + -65.7372222000 -96.5516666000, + -65.8502777000 -96.5461111000, + -65.8527777000 -96.6627777000, + -65.7402776999 -96.6686111000))')); +INSERT INTO t1 (c1) VALUES ( +PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, + -18.6055555000 -66.8158332999, + -18.7186111000 -66.8102777000, + -18.7211111000 -66.9269443999, + -18.6086111000 -66.9327777000))')); +CHECK TABLE t1 EXTENDED; +Table Op Msg_type Msg_text +test.t1 check status OK +DROP TABLE t1; diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test index 682f67c61c4..eba53a8a9c5 100644 --- a/mysql-test/t/gis-rtree.test +++ b/mysql-test/t/gis-rtree.test @@ -188,4 +188,48 @@ check table t1 extended; drop table t1; +# +# Bug#17877 - Corrupted spatial index +# +CREATE TABLE t1 ( + c1 geometry NOT NULL default '', + SPATIAL KEY i1 (c1(32)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +INSERT INTO t1 (c1) VALUES ( + PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, + -18.6055555000 -66.8158332999, + -18.7186111000 -66.8102777000, + -18.7211111000 -66.9269443999, + -18.6086111000 -66.9327777000))')); +# This showed a missing key. +CHECK TABLE t1 EXTENDED; +DROP TABLE t1; +# +CREATE TABLE t1 ( + c1 geometry NOT NULL default '', + SPATIAL KEY i1 (c1(32)) +) ENGINE=MyISAM DEFAULT CHARSET=latin1; +INSERT INTO t1 (c1) VALUES ( + PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, + -18.6055555000 -66.8158332999, + -18.7186111000 -66.8102777000, + -18.7211111000 -66.9269443999, + -18.6086111000 -66.9327777000))')); +INSERT INTO t1 (c1) VALUES ( + PolygonFromText('POLYGON((-65.7402776999 -96.6686111000, + -65.7372222000 -96.5516666000, + -65.8502777000 -96.5461111000, + -65.8527777000 -96.6627777000, + -65.7402776999 -96.6686111000))')); +# This is the same as the first insert to get a non-unique key. +INSERT INTO t1 (c1) VALUES ( + PolygonFromText('POLYGON((-18.6086111000 -66.9327777000, + -18.6055555000 -66.8158332999, + -18.7186111000 -66.8102777000, + -18.7211111000 -66.9269443999, + -18.6086111000 -66.9327777000))')); +# This showed (and still shows) OK. +CHECK TABLE t1 EXTENDED; +DROP TABLE t1; + # End of 4.1 tests From 9ad8a373f186b6f8f1edcb15f5f4f2dd6e60df7a Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Jun 2006 16:07:39 +0200 Subject: [PATCH 08/20] Bug#19835 - Binary copy of corrupted tables crash the server when issuing a query A corrupt table with dynamic record format can crash the server when trying to select from it. I fixed the crash that resulted from the particular type of corruption that has been reported for this bug. No test case. To test it, one needs a table with a very special corruption. The bug report contains a file with such a table. myisam/mi_dynrec.c: Bug#19835 - Binary copy of corrupted tables crash the server when issuing a query Added a protection against corrupted records. A dynamic record header with invalid 'next' pointer could trigger the assert in _mi_get_block_info(). Now I avoid this by reporting a corruption error. --- myisam/mi_dynrec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index 43783ca2d36..1b691c955f1 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -1116,6 +1116,9 @@ int _mi_read_dynamic_record(MI_INFO *info, my_off_t filepos, byte *buf) info->rec_cache.pos_in_file <= block_info.next_filepos && flush_io_cache(&info->rec_cache)) goto err; + /* A corrupted table can have wrong pointers. (Bug# 19835) */ + if (block_info.next_filepos == HA_OFFSET_ERROR) + goto panic; info->rec_cache.seek_not_done=1; if ((b_type=_mi_get_block_info(&block_info,file, block_info.next_filepos)) From 7aa26e264582964b6e4df64980edbee8cde8cbd7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Jun 2006 18:55:30 +0200 Subject: [PATCH 09/20] Bug#14400 - Query joins wrong rows from table which is subject of "concurrent insert" It was possible that fetching a record by an exact key value (including the record pointer) could return a record with a different key value. This happened only if a concurrent insert added a record with the searched key value after the fetching statement locked the table for read. The search succeded on the key value, but the record was rejected as it was past the file length that was remembered at start of the fetching statement. With other words it was rejected as being a concurrently inserted record. The action to recover from this problem was to fetch the record that is pointed at by the next key of the index. This was repeated until a record below the file length was found. I do now avoid this loop if an exact match was searched. If this match is beyond the file length, it is now treated as "key not found". There cannot be another key with the same record pointer. myisam/mi_rkey.c: Bug#14400 - Query joins wrong rows from table which is subject of "concurrent insert" Added a check for exact key match before searching for the next key that was not concurrently inserted. If an exact key match finds a concurrently inserted row, this must be treated as "key not found". sql/sql_class.cc: Bug#14400 - Query joins wrong rows from table which is subject of "concurrent insert" Fixed some DBUG_ENTER strings. --- myisam/mi_rkey.c | 16 ++++++++++++++-- sql/sql_class.cc | 6 +++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/myisam/mi_rkey.c b/myisam/mi_rkey.c index 70122288d6c..41c2e173b70 100644 --- a/myisam/mi_rkey.c +++ b/myisam/mi_rkey.c @@ -66,6 +66,7 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len, if (fast_mi_readinfo(info)) goto err; + if (share->concurrent_insert) rw_rdlock(&share->key_root_lock[inx]); @@ -77,14 +78,24 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len, if (!_mi_search(info,keyinfo, key_buff, use_key_length, myisam_read_vec[search_flag], info->s->state.key_root[inx])) { - while (info->lastpos >= info->state->data_file_length) + /* + If we are searching for an exact key (including the data pointer) + and this was added by an concurrent insert, + then the result is "key not found". + */ + if ((search_flag == HA_READ_KEY_EXACT) && + (info->lastpos >= info->state->data_file_length)) + { + my_errno= HA_ERR_KEY_NOT_FOUND; + info->lastpos= HA_OFFSET_ERROR; + } + else while (info->lastpos >= info->state->data_file_length) { /* Skip rows that are inserted by other threads since we got a lock Note that this can only happen if we are not searching after an exact key, because the keys are sorted according to position */ - if (_mi_search_next(info, keyinfo, info->lastkey, info->lastkey_length, myisam_readnext_vec[search_flag], @@ -92,6 +103,7 @@ int mi_rkey(MI_INFO *info, byte *buf, int inx, const byte *key, uint key_len, break; } } + if (share->concurrent_insert) rw_unlock(&share->key_root_lock[inx]); diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 66d23ada163..f8cf8a7a58e 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -477,7 +477,7 @@ bool select_send::send_data(List &items) { List_iterator_fast li(items); String *packet= &thd->packet; - DBUG_ENTER("send_data"); + DBUG_ENTER("select_send::send_data"); #ifdef HAVE_INNOBASE_DB /* We may be passing the control from mysqld to the client: release the @@ -611,7 +611,7 @@ select_export::prepare(List &list) bool select_export::send_data(List &items) { - DBUG_ENTER("send_data"); + DBUG_ENTER("select_export::send_data"); char buff[MAX_FIELD_WIDTH],null_buff[2],space[MAX_FIELD_WIDTH]; bool space_inited=0; String tmp(buff,sizeof(buff)),*res; @@ -828,7 +828,7 @@ bool select_dump::send_data(List &items) String tmp(buff,sizeof(buff)),*res; tmp.length(0); Item *item; - DBUG_ENTER("send_data"); + DBUG_ENTER("select_dump::send_data"); if (thd->offset_limit) { // using limit offset,count From 6efd848ce7327449fb17f3885981179aa4a99f95 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Jun 2006 16:20:18 +0200 Subject: [PATCH 10/20] ndb - autotest Fix testNodeRestart -n DuringLCP and others (add stopTest() at end of test :-)) ndb/test/ndbapi/testNodeRestart.cpp: Fix testNodeRestart -n DuringLCP and others --- ndb/test/ndbapi/testNodeRestart.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ndb/test/ndbapi/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp index 68f101442c5..767ca23b324 100644 --- a/ndb/test/ndbapi/testNodeRestart.cpp +++ b/ndb/test/ndbapi/testNodeRestart.cpp @@ -294,6 +294,7 @@ int runRestarts(NDBT_Context* ctx, NDBT_Step* step){ } i++; } + ctx->stopTest(); return result; } From 633cbfb571f34659f600c8d32002d3e4fbeefa39 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Jun 2006 09:05:12 +0400 Subject: [PATCH 11/20] BUG#16168: Wrong results from range optimizer, "Use_count: Wrong count for key ..." warnings: - Added comments. - Make SEL_ARG::clone() set SEL_ARG::elements in the created copy. mysql-test/r/range.result: BUG#16168: Testcase mysql-test/t/range.test: BUG#16168: Testcase --- mysql-test/r/range.result | 22 +++++ mysql-test/t/range.test | 26 ++++++ sql/opt_range.cc | 183 +++++++++++++++++++++++++++++++++++++- 3 files changed, 227 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 07e96aee22b..b436519d967 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -627,3 +627,25 @@ SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 2' OR ARG1 != ' 1'); count(*) 4 drop table t1; +create table t1 (a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +DROP TABLE IF EXISTS t2; +CREATE TABLE t2 ( +pk1 int(11) NOT NULL, +pk2 int(11) NOT NULL, +pk3 int(11) NOT NULL, +pk4 int(11) NOT NULL, +filler char(82), +PRIMARY KEY (pk1,pk2,pk3,pk4) +) DEFAULT CHARSET=latin1; +insert into t2 select 1, A.a+10*B.a, 432, 44, 'fillerZ' from t1 A, t1 B; +INSERT INTO t2 VALUES (2621, 2635, 0, 0,'filler'), (2621, 2635, 1, 0,'filler'), +(2621, 2635, 10, 0,'filler'), (2621, 2635, 11, 0,'filler'), +(2621, 2635, 14, 0,'filler'), (2621, 2635, 1000015, 0,'filler'); +SELECT * FROM t2 +WHERE ((((pk4 =0) AND (pk1 =2621) AND (pk2 =2635))) +OR ((pk4 =1) AND (((pk1 IN ( 7, 2, 1 ))) OR (pk1 =522)) AND ((pk2 IN ( 0, 2635)))) +) AND (pk3 >=1000000); +pk1 pk2 pk3 pk4 filler +2621 2635 1000015 0 filler +drop table t1, t2; diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test index 944cf6ced18..9280911df2c 100644 --- a/mysql-test/t/range.test +++ b/mysql-test/t/range.test @@ -484,4 +484,30 @@ SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 1' OR ARG1 != ' 2'); SELECT count(*) FROM t1 WHERE CLIENT='000' AND (ARG1 != ' 2' OR ARG1 != ' 1'); drop table t1; +# BUG#16168: Wrong range optimizer results, "Use_count: Wrong count ..." +# warnings in server stderr. +create table t1 (a int); +insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +DROP TABLE IF EXISTS t2; +CREATE TABLE t2 ( + pk1 int(11) NOT NULL, + pk2 int(11) NOT NULL, + pk3 int(11) NOT NULL, + pk4 int(11) NOT NULL, + filler char(82), + PRIMARY KEY (pk1,pk2,pk3,pk4) +) DEFAULT CHARSET=latin1; + +insert into t2 select 1, A.a+10*B.a, 432, 44, 'fillerZ' from t1 A, t1 B; +INSERT INTO t2 VALUES (2621, 2635, 0, 0,'filler'), (2621, 2635, 1, 0,'filler'), + (2621, 2635, 10, 0,'filler'), (2621, 2635, 11, 0,'filler'), + (2621, 2635, 14, 0,'filler'), (2621, 2635, 1000015, 0,'filler'); + +SELECT * FROM t2 +WHERE ((((pk4 =0) AND (pk1 =2621) AND (pk2 =2635))) +OR ((pk4 =1) AND (((pk1 IN ( 7, 2, 1 ))) OR (pk1 =522)) AND ((pk2 IN ( 0, 2635)))) +) AND (pk3 >=1000000); +drop table t1, t2; + # End of 4.1 tests diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 67141aab6ce..648a933acdf 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -42,18 +42,119 @@ static int sel_cmp(Field *f,char *a,char *b,uint8 a_flag,uint8 b_flag); static char is_null_string[2]= {1,0}; + +/* + A construction block of the SEL_ARG-graph. + + The following description only covers graphs of SEL_ARG objects with + sel_arg->type==KEY_RANGE: + + One SEL_ARG object represents an "elementary interval" in form + + min_value <=? table.keypartX <=? max_value + + The interval is a non-empty interval of any kind: with[out] minimum/maximum + bound, [half]open/closed, single-point interval, etc. + + 1. SEL_ARG GRAPH STRUCTURE + + SEL_ARG objects are linked together in a graph. The meaning of the graph + is better demostrated by an example: + + tree->keys[i] + | + | $ $ + | part=1 $ part=2 $ part=3 + | $ $ + | +-------+ $ +-------+ $ +--------+ + | | kp1<1 |--$-->| kp2=5 |--$-->| kp3=10 | + | +-------+ $ +-------+ $ +--------+ + | | $ $ | + | | $ $ +--------+ + | | $ $ | kp3=12 | + | | $ $ +--------+ + | +-------+ $ $ + \->| kp1=2 |--$--------------$-+ + +-------+ $ $ | +--------+ + | $ $ ==>| kp3=11 | + +-------+ $ $ | +--------+ + | kp1=3 |--$--------------$-+ | + +-------+ $ $ +--------+ + | $ $ | kp3=14 | + ... $ $ +--------+ + + The entire graph is partitioned into "interval lists". + + An interval list is a sequence of ordered disjoint intervals over the same + key part. SEL_ARG are linked via "next" and "prev" pointers. Additionally, + all intervals in the list form an RB-tree, linked via left/right/parent + pointers. The RB-tree root SEL_ARG object will be further called "root of the + interval list". + + In the example pic, there are 4 interval lists: + "kp<1 OR kp1=2 OR kp1=3", "kp2=5", "kp3=10 OR kp3=12", "kp3=11 OR kp3=13". + The vertical lines represent SEL_ARG::next/prev pointers. + + In an interval list, each member X may have SEL_ARG::next_key_part pointer + pointing to the root of another interval list Y. The pointed interval list + must cover a key part with greater number (i.e. Y->part > X->part). + + In the example pic, the next_key_part pointers are represented by + horisontal lines. + + 2. SEL_ARG GRAPH SEMANTICS + + It represents a condition in a special form (we don't have a name for it ATM) + The SEL_ARG::next/prev is "OR", and next_key_part is "AND". + + For example, the picture represents the condition in form: + (kp1 < 1 AND kp2=5 AND (kp3=10 OR kp3=12)) OR + (kp1=2 AND (kp3=11 OR kp3=14)) OR + (kp1=3 AND (kp3=11 OR kp3=14)) + + + 3. SEL_ARG GRAPH USE + + Use get_mm_tree() to construct SEL_ARG graph from WHERE condition. + Then walk the SEL_ARG graph and get a list of dijsoint ordered key + intervals (i.e. intervals in form + + (constA1, .., const1_K) < (keypart1,.., keypartK) < (constB1, .., constB_K) + + Those intervals can be used to access the index. The uses are in: + - check_quick_select() - Walk the SEL_ARG graph and find an estimate of + how many table records are contained within all + intervals. + - get_quick_select() - Walk the SEL_ARG, materialize the key intervals, + and create QUICK_RANGE_SELECT object that will + read records within these intervals. +*/ + class SEL_ARG :public Sql_alloc { public: uint8 min_flag,max_flag,maybe_flag; uint8 part; // Which key part uint8 maybe_null; - uint16 elements; // Elements in tree - ulong use_count; // use of this sub_tree + /* + Number of children of this element in the RB-tree, plus 1 for this + element itself. + */ + uint16 elements; + /* + Valid only for elements which are RB-tree roots: Number of times this + RB-tree is referred to (it is referred by SEL_ARG::next_key_part or by + SEL_TREE::keys[i] or by a temporary SEL_ARG* variable) + */ + ulong use_count; + Field *field; char *min_value,*max_value; // Pointer to range - SEL_ARG *left,*right,*next,*prev,*parent,*next_key_part; + SEL_ARG *left,*right; /* R-B tree children */ + SEL_ARG *next,*prev; /* Links for bi-directional interval list */ + SEL_ARG *parent; /* R-B tree parent */ + SEL_ARG *next_key_part; enum leaf_color { BLACK,RED } color; enum Type { IMPOSSIBLE, MAYBE, MAYBE_KEY, KEY_RANGE } type; @@ -498,6 +599,7 @@ SEL_ARG *SEL_ARG::clone(SEL_ARG *new_parent,SEL_ARG **next_arg) } increment_use_count(1); tmp->color= color; + tmp->elements= this->elements; return tmp; } @@ -1525,8 +1627,21 @@ and_all_keys(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) +/* + Produce a SEL_ARG graph that represents "key1 AND key2" + + SYNOPSIS + key_and() + key1 First argument, root of its RB-tree + key2 Second argument, root of its RB-tree + + RETURN + RB-tree root of the resulting SEL_ARG graph. + NULL if the result of AND operation is an empty interval {0}. +*/ + static SEL_ARG * -key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) +key_and(SEL_ARG *key1, SEL_ARG *key2, uint clone_flag) { if (!key1) return key2; @@ -1589,6 +1704,7 @@ key_and(SEL_ARG *key1,SEL_ARG *key2,uint clone_flag) if ((key1->min_flag | key2->min_flag) & GEOM_FLAG) { + /* TODO: why not leave one of the trees? */ key1->free_tree(); key2->free_tree(); return 0; // Can't optimize this @@ -2303,6 +2419,51 @@ int test_rb_tree(SEL_ARG *element,SEL_ARG *parent) return -1; // Error, no more warnings } + +/* + Count how many times SEL_ARG graph "root" refers to its part "key" + + SYNOPSIS + count_key_part_usage() + root An RB-Root node in a SEL_ARG graph. + key Another RB-Root node in that SEL_ARG graph. + + DESCRIPTION + The passed "root" node may refer to "key" node via root->next_key_part, + root->next->n + + This function counts how many times the node "key" is referred (via + SEL_ARG::next_key_part) by + - intervals of RB-tree pointed by "root", + - intervals of RB-trees that are pointed by SEL_ARG::next_key_part from + intervals of RB-tree pointed by "root", + - and so on. + + Here is an example (horizontal links represent next_key_part pointers, + vertical links - next/prev prev pointers): + + +----+ $ + |root|-----------------+ + +----+ $ | + | $ | + | $ | + +----+ +---+ $ | +---+ Here the return value + | |- ... -| |---$-+--+->|key| will be 4. + +----+ +---+ $ | | +---+ + | $ | | + ... $ | | + | $ | | + +----+ +---+ $ | | + | |---| |---------+ | + +----+ +---+ $ | + | | $ | + ... +---+ $ | + | |------------+ + +---+ $ + RETURN + Number of links to "key" from nodes reachable from "root". +*/ + static ulong count_key_part_usage(SEL_ARG *root, SEL_ARG *key) { ulong count= 0; @@ -2320,6 +2481,20 @@ static ulong count_key_part_usage(SEL_ARG *root, SEL_ARG *key) } +/* + Check if SEL_ARG::use_count value is correct + + SYNOPSIS + SEL_ARG::test_use_count() + root The root node of the SEL_ARG graph (an RB-tree root node that + has the least value of sel_arg->part in the entire graph, and + thus is the "origin" of the graph) + + DESCRIPTION + Check if SEL_ARG::use_count value is correct. See the definition of + use_count for what is "correct". +*/ + void SEL_ARG::test_use_count(SEL_ARG *root) { uint e_count=0; From 652a02f6e179365b055d4d0a4adc05f65a0dcb67 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Jun 2006 09:41:41 +0200 Subject: [PATCH 12/20] ndb - bug#20774 crash if system restart with more than 4096 fragments solution: continueb enable expand check loop ndb/src/kernel/blocks/dblqh/Dblqh.hpp: continueb enable expand check loop ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: continueb enable expand check loop --- ndb/src/kernel/blocks/dblqh/Dblqh.hpp | 1 + ndb/src/kernel/blocks/dblqh/DblqhMain.cpp | 54 +++++++++++++++++------ 2 files changed, 42 insertions(+), 13 deletions(-) diff --git a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp index 13ae5aa1bbf..7cca121d909 100644 --- a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp +++ b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp @@ -232,6 +232,7 @@ #define ZSCAN_MARKERS 18 #define ZOPERATION_EVENT_REP 19 #define ZPREP_DROP_TABLE 20 +#define ZENABLE_EXPAND_CHECK 21 /* ------------------------------------------------------------------------- */ /* NODE STATE DURING SYSTEM RESTART, VARIABLES CNODES_SR_STATE */ diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index 3540fc79dff..42e38b41b4b 100644 --- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -434,6 +434,33 @@ void Dblqh::execCONTINUEB(Signal* signal) checkDropTab(signal); return; break; + case ZENABLE_EXPAND_CHECK: + { + jam(); + fragptr.i = signal->theData[1]; + if (fragptr.i != RNIL) + { + jam(); + ptrCheckGuard(fragptr, cfragrecFileSize, fragrecord); + signal->theData[0] = fragptr.p->tabRef; + signal->theData[1] = fragptr.p->fragId; + sendSignal(DBACC_REF, GSN_EXPANDCHECK2, signal, 2, JBB); + + signal->theData[0] = ZENABLE_EXPAND_CHECK; + signal->theData[1] = fragptr.p->nextFrag; + sendSignal(DBLQH_REF, GSN_CONTINUEB, signal, 2, JBB); + return; + } + else + { + jam(); + StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); + conf->startingNodeId = getOwnNodeId(); + sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, + StartRecConf::SignalLength, JBB); + return; + } + } default: ndbrequire(false); break; @@ -15503,20 +15530,21 @@ void Dblqh::srFourthComp(Signal* signal) } else if ((cstartType == NodeState::ST_NODE_RESTART) || (cstartType == NodeState::ST_SYSTEM_RESTART)) { jam(); - StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); - conf->startingNodeId = getOwnNodeId(); - sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, - StartRecConf::SignalLength, JBB); - if(cstartType == NodeState::ST_SYSTEM_RESTART){ - fragptr.i = c_redo_log_complete_frags; - while(fragptr.i != RNIL){ - ptrCheckGuard(fragptr, cfragrecFileSize, fragrecord); - signal->theData[0] = fragptr.p->tabRef; - signal->theData[1] = fragptr.p->fragId; - sendSignal(DBACC_REF, GSN_EXPANDCHECK2, signal, 2, JBB); - fragptr.i = fragptr.p->nextFrag; - } + if(cstartType == NodeState::ST_SYSTEM_RESTART) + { + jam(); + signal->theData[0] = ZENABLE_EXPAND_CHECK; + signal->theData[1] = c_redo_log_complete_frags; + sendSignal(DBLQH_REF, GSN_CONTINUEB, signal, 2, JBB); + } + else + { + jam(); + StartRecConf * conf = (StartRecConf*)signal->getDataPtrSend(); + conf->startingNodeId = getOwnNodeId(); + sendSignal(cmasterDihBlockref, GSN_START_RECCONF, signal, + StartRecConf::SignalLength, JBB); } } else { ndbrequire(false); From f260771d131f00b22dd21f3837dd2c8262d25f3b Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Jul 2006 13:51:35 +0200 Subject: [PATCH 13/20] pekka - checkout:get (4.1) BitKeeper/etc/config: checkout:get --- BitKeeper/etc/config | 1 + 1 file changed, 1 insertion(+) diff --git a/BitKeeper/etc/config b/BitKeeper/etc/config index 5fa877c5e3a..4b5bb12f420 100644 --- a/BitKeeper/etc/config +++ b/BitKeeper/etc/config @@ -73,5 +73,6 @@ hours: [jonas:]checkout:get [tomas:]checkout:get [guilhem:]checkout:get +[pekka:]checkout:get checkout:edit eoln:unix From 184ff212b6994a0f9eba62727999fd3036c39c83 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Jul 2006 17:40:40 +0500 Subject: [PATCH 14/20] WL#2928 Date Translation NRE (implemented by by Josh Chamas) libmysqld/Makefile.am: Adding new source file mysql-test/r/date_formats.result: Adding test case mysql-test/t/date_formats.test: Adding test case sql/Makefile.am: Adding new source file BitKeeper/etc/ignore: Added libmysqld/sql_locale.cc to the ignore list sql/item_timefunc.cc: Using current locale data, instead of hard coded English names. sql/mysql_priv.h: Adding new type MY_LOCALE, and declaring new global variables. sql/set_var.cc: Adding "lc_time_names" system variable. sql/set_var.h: Adding "lc_time_names" system variable. sql/sql_cache.cc: Adding lc_time_names as a query cache flag. sql/sql_class.cc: Setting default locale to en_US sql/sql_class.h: Adding locale variable into system_variables. sql/sql_locale.cc: Adding new file with locale data for various languages --- .bzrignore | 1 + libmysqld/Makefile.am | 2 +- mysql-test/r/date_formats.result | 16 + mysql-test/t/date_formats.test | 14 + sql/Makefile.am | 2 +- sql/item_timefunc.cc | 66 +- sql/mysql_priv.h | 18 + sql/set_var.cc | 43 + sql/set_var.h | 21 + sql/sql_cache.cc | 2 + sql/sql_class.cc | 1 + sql/sql_class.h | 3 + sql/sql_locale.cc | 1607 ++++++++++++++++++++++++++++++ 13 files changed, 1766 insertions(+), 30 deletions(-) create mode 100644 sql/sql_locale.cc diff --git a/.bzrignore b/.bzrignore index 414a40ef1eb..6dd06504096 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1058,3 +1058,4 @@ vio/test-sslclient vio/test-sslserver vio/viotest-ssl libmysql/libmysql.ver +libmysqld/sql_locale.cc diff --git a/libmysqld/Makefile.am b/libmysqld/Makefile.am index d6f68047296..e121e4b8d6e 100644 --- a/libmysqld/Makefile.am +++ b/libmysqld/Makefile.am @@ -50,7 +50,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ key.cc lock.cc log.cc log_event.cc sql_state.c \ protocol.cc net_serv.cc opt_range.cc \ opt_sum.cc procedure.cc records.cc sql_acl.cc \ - sql_load.cc discover.cc \ + sql_load.cc discover.cc sql_locale.cc \ sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \ sql_crypt.cc sql_db.cc sql_delete.cc sql_error.cc sql_insert.cc \ sql_lex.cc sql_list.cc sql_manager.cc sql_map.cc sql_parse.cc \ diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 24abdfcf148..00335d2b1b0 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -456,6 +456,22 @@ f1 f2 Warnings: Warning 1292 Truncated incorrect date value: '2003-04-05 g' Warning 1292 Truncated incorrect datetime value: '2003-04-05 10:11:12.101010234567' +set names latin1; +select date_format('2004-01-01','%W (%a), %e %M (%b) %Y'); +date_format('2004-01-01','%W (%a), %e %M (%b) %Y') +Thursday (Thu), 1 January (Jan) 2004 +set lc_time_names=ru_RU; +set names koi8r; +select date_format('2004-01-01','%W (%a), %e %M (%b) %Y'); +date_format('2004-01-01','%W (%a), %e %M (%b) %Y') + (), 1 () 2004 +set lc_time_names=de_DE; +set names latin1; +select date_format('2004-01-01','%W (%a), %e %M (%b) %Y'); +date_format('2004-01-01','%W (%a), %e %M (%b) %Y') +Donnerstag (Do), 1 Januar (Jan) 2004 +set names latin1; +set lc_time_names=en_US; create table t1 (f1 datetime); insert into t1 (f1) values ("2005-01-01"); insert into t1 (f1) values ("2005-02-01"); diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index f3d507e69e6..362f4614464 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -260,6 +260,20 @@ select str_to_date("2003-04-05 g", "%Y-%m-%d") as f1, str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2; --enable_ps_protocol +# +# Test of locale dependent date format (WL#2928 Date Translation NRE) +# +set names latin1; +select date_format('2004-01-01','%W (%a), %e %M (%b) %Y'); +set lc_time_names=ru_RU; +set names koi8r; +select date_format('2004-01-01','%W (%a), %e %M (%b) %Y'); +set lc_time_names=de_DE; +set names latin1; +select date_format('2004-01-01','%W (%a), %e %M (%b) %Y'); +set names latin1; +set lc_time_names=en_US; + # # Bug #14016 # diff --git a/sql/Makefile.am b/sql/Makefile.am index 218cf5dbca5..9e512c362a9 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -73,7 +73,7 @@ mysqld_SOURCES = sql_lex.cc sql_handler.cc \ mysqld.cc password.c hash_filo.cc hostname.cc \ set_var.cc sql_parse.cc sql_yacc.yy \ sql_base.cc table.cc sql_select.cc sql_insert.cc \ - sql_prepare.cc sql_error.cc \ + sql_prepare.cc sql_error.cc sql_locale.cc \ sql_update.cc sql_delete.cc uniques.cc sql_do.cc \ procedure.cc item_uniq.cc sql_test.cc \ log.cc log_event.cc init.cc derror.cc sql_acl.cc \ diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 27876096bc5..2da0e8956c2 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -30,25 +30,6 @@ /* Day number for Dec 31st, 9999 */ #define MAX_DAY_NUMBER 3652424L -static const char *month_names[]= -{ - "January", "February", "March", "April", "May", "June", "July", "August", - "September", "October", "November", "December", NullS -}; - -TYPELIB month_names_typelib= -{ array_elements(month_names)-1,"", month_names, NULL }; - -static const char *day_names[]= -{ - "Monday", "Tuesday", "Wednesday", - "Thursday", "Friday", "Saturday" ,"Sunday", NullS -}; - -TYPELIB day_names_typelib= -{ array_elements(day_names)-1,"", day_names, NULL}; - - /* OPTIMIZATION TODO: - Replace the switch with a function that should be called for each @@ -222,8 +203,12 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, val= tmp; break; case 'M': + if ((l_time->month= check_word(my_locale_en_US.month_names, + val, val_end, &val)) <= 0) + goto err; + break; case 'b': - if ((l_time->month= check_word(&month_names_typelib, + if ((l_time->month= check_word(my_locale_en_US.ab_month_names, val, val_end, &val)) <= 0) goto err; break; @@ -298,8 +283,11 @@ static bool extract_date_time(DATE_TIME_FORMAT *format, /* Exotic things */ case 'W': + if ((weekday= check_word(my_locale_en_US.day_names, val, val_end, &val)) <= 0) + goto err; + break; case 'a': - if ((weekday= check_word(&day_names_typelib, val, val_end, &val)) <= 0) + if ((weekday= check_word(my_locale_en_US.ab_day_names, val, val_end, &val)) <= 0) goto err; break; case 'w': @@ -489,9 +477,15 @@ bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time, uint weekday; ulong length; const char *ptr, *end; + MY_LOCALE *locale; + THD *thd= current_thd; + char buf[128]; + String tmp(buf, thd->variables.character_set_results); + uint errors= 0; str->length(0); str->set_charset(&my_charset_bin); + locale = thd->variables.lc_time_names; if (l_time->neg) str->append("-", 1); @@ -507,26 +501,38 @@ bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time, case 'M': if (!l_time->month) return 1; - str->append(month_names[l_time->month-1]); + tmp.copy(locale->month_names->type_names[l_time->month-1], + strlen(locale->month_names->type_names[l_time->month-1]), + system_charset_info, tmp.charset(), &errors); + str->append(tmp.ptr(), tmp.length()); break; case 'b': if (!l_time->month) return 1; - str->append(month_names[l_time->month-1],3); + tmp.copy(locale->ab_month_names->type_names[l_time->month-1], + strlen(locale->ab_month_names->type_names[l_time->month-1]), + system_charset_info, tmp.charset(), &errors); + str->append(tmp.ptr(), tmp.length()); break; case 'W': if (type == MYSQL_TIMESTAMP_TIME) return 1; weekday= calc_weekday(calc_daynr(l_time->year,l_time->month, l_time->day),0); - str->append(day_names[weekday]); + tmp.copy(locale->day_names->type_names[weekday], + strlen(locale->day_names->type_names[weekday]), + system_charset_info, tmp.charset(), &errors); + str->append(tmp.ptr(), tmp.length()); break; case 'a': if (type == MYSQL_TIMESTAMP_TIME) return 1; weekday=calc_weekday(calc_daynr(l_time->year,l_time->month, l_time->day),0); - str->append(day_names[weekday],3); + tmp.copy(locale->ab_day_names->type_names[weekday], + strlen(locale->ab_day_names->type_names[weekday]), + system_charset_info, tmp.charset(), &errors); + str->append(tmp.ptr(), tmp.length()); break; case 'D': if (type == MYSQL_TIMESTAMP_TIME) @@ -908,6 +914,7 @@ String* Item_func_monthname::val_str(String* str) DBUG_ASSERT(fixed == 1); const char *month_name; uint month= (uint) val_int(); + THD *thd= current_thd; if (null_value || !month) { @@ -915,7 +922,7 @@ String* Item_func_monthname::val_str(String* str) return (String*) 0; } null_value=0; - month_name= month_names[month-1]; + month_name= thd->variables.lc_time_names->month_names->type_names[month-1]; str->set(month_name, strlen(month_name), system_charset_info); return str; } @@ -1039,11 +1046,12 @@ String* Item_func_dayname::val_str(String* str) DBUG_ASSERT(fixed == 1); uint weekday=(uint) val_int(); // Always Item_func_daynr() const char *name; + THD *thd= current_thd; if (null_value) return (String*) 0; - name= day_names[weekday]; + name= thd->variables.lc_time_names->day_names->type_names[weekday]; str->set(name, strlen(name), system_charset_info); return str; } @@ -1572,7 +1580,7 @@ uint Item_func_date_format::format_length(const String *format) switch(*++ptr) { case 'M': /* month, textual */ case 'W': /* day (of the week), textual */ - size += 9; + size += 64; /* large for UTF8 locale data */ break; case 'D': /* day (of the month), numeric plus english suffix */ case 'Y': /* year, numeric, 4 digits */ @@ -1582,6 +1590,8 @@ uint Item_func_date_format::format_length(const String *format) break; case 'a': /* locale's abbreviated weekday name (Sun..Sat) */ case 'b': /* locale's abbreviated month name (Jan.Dec) */ + size += 32; /* large for UTF8 locale data */ + break; case 'j': /* day of year (001..366) */ size += 3; break; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 4bbbb629d20..d231942bb7a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -68,6 +68,23 @@ char* query_table_status(THD *thd,const char *db,const char *table_name); extern CHARSET_INFO *system_charset_info, *files_charset_info ; extern CHARSET_INFO *national_charset_info, *table_alias_charset; + +typedef struct my_locale_st +{ + const char *name; + const char *description; + const bool is_ascii; + TYPELIB *month_names; + TYPELIB *ab_month_names; + TYPELIB *day_names; + TYPELIB *ab_day_names; +} MY_LOCALE; + +extern MY_LOCALE my_locale_en_US; +extern MY_LOCALE *my_locales[]; + +MY_LOCALE *my_locale_by_name(const char *name); + /*************************************************************************** Configuration parameters ****************************************************************************/ @@ -407,6 +424,7 @@ struct Query_cache_query_flags ulong sql_mode; ulong max_sort_length; ulong group_concat_max_len; + MY_LOCALE *lc_time_names; }; #define QUERY_CACHE_FLAGS_SIZE sizeof(Query_cache_query_flags) #include "sql_cache.h" diff --git a/sql/set_var.cc b/sql/set_var.cc index bf68a102537..c9cada7158a 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -58,6 +58,7 @@ #include #include #include + #ifdef HAVE_BERKELEY_DB #include "ha_berkeley.h" #endif @@ -468,6 +469,9 @@ static sys_var_thd_ha_rows sys_select_limit("sql_select_limit", static sys_var_timestamp sys_timestamp("timestamp"); static sys_var_last_insert_id sys_last_insert_id("last_insert_id"); static sys_var_last_insert_id sys_identity("identity"); + +static sys_var_thd_lc_time_names sys_lc_time_names("lc_time_names"); + static sys_var_insert_id sys_insert_id("insert_id"); static sys_var_readonly sys_error_count("error_count", OPT_SESSION, @@ -558,6 +562,7 @@ sys_var *sys_variables[]= &sys_key_cache_division_limit, &sys_key_cache_age_threshold, &sys_last_insert_id, + &sys_lc_time_names, &sys_license, &sys_local_infile, &sys_log_binlog, @@ -780,6 +785,7 @@ struct show_var_st init_vars[]= { SHOW_SYS}, {"language", language, SHOW_CHAR}, {"large_files_support", (char*) &opt_large_files, SHOW_BOOL}, + {sys_lc_time_names.name, (char*) &sys_lc_time_names, SHOW_SYS}, {sys_license.name, (char*) &sys_license, SHOW_SYS}, {sys_local_infile.name, (char*) &sys_local_infile, SHOW_SYS}, #ifdef HAVE_MLOCKALL @@ -2562,6 +2568,43 @@ void sys_var_thd_time_zone::set_default(THD *thd, enum_var_type type) pthread_mutex_unlock(&LOCK_global_system_variables); } +bool sys_var_thd_lc_time_names::check(THD *thd, set_var *var) +{ + char *locale_str =var->value->str_value.c_ptr(); + MY_LOCALE *locale_match= my_locale_by_name(locale_str); + + if(locale_match == NULL) + { + my_printf_error(ER_UNKNOWN_ERROR, "Unknown locale: '%s'", MYF(0), locale_str); + return 1; + } + else + { + var->save_result.locale_value= locale_match; + return 0; + } +} + + +bool sys_var_thd_lc_time_names::update(THD *thd, set_var *var) +{ + thd->variables.lc_time_names= var->save_result.locale_value; + return 0; +} + + +byte *sys_var_thd_lc_time_names::value_ptr(THD *thd, enum_var_type type, + LEX_STRING *base) +{ + return (byte *)(thd->variables.lc_time_names->name); +} + + +void sys_var_thd_lc_time_names::set_default(THD *thd, enum_var_type type) +{ + thd->variables.lc_time_names = &my_locale_en_US; +} + /* Functions to update thd->options bits */ diff --git a/sql/set_var.h b/sql/set_var.h index c6319a79cf6..1ae3a18111f 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -28,6 +28,8 @@ class sys_var; class set_var; typedef struct system_variables SV; +typedef struct my_locale_st MY_LOCALE; + extern TYPELIB bool_typelib, delay_key_write_typelib, sql_mode_typelib; typedef int (*sys_check_func)(THD *, set_var *); @@ -757,6 +759,24 @@ public: virtual void set_default(THD *thd, enum_var_type type); }; +class sys_var_thd_lc_time_names :public sys_var_thd +{ +public: + sys_var_thd_lc_time_names(const char *name_arg): + sys_var_thd(name_arg) + {} + bool check(THD *thd, set_var *var); + SHOW_TYPE type() { return SHOW_CHAR; } + bool check_update_type(Item_result type) + { + return type != STRING_RESULT; /* Only accept strings */ + } + bool check_default(enum_var_type type) { return 0; } + bool update(THD *thd, set_var *var); + byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); + virtual void set_default(THD *thd, enum_var_type type); +}; + /**************************************************************************** Classes for parsing of the SET command ****************************************************************************/ @@ -791,6 +811,7 @@ public: ulonglong ulonglong_value; DATE_TIME_FORMAT *date_time_format; Time_zone *time_zone; + MY_LOCALE *locale_value; } save_result; LEX_STRING base; /* for structs */ diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 457478e90db..fc03e03dee7 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -813,6 +813,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) flags.sql_mode= thd->variables.sql_mode; flags.max_sort_length= thd->variables.max_sort_length; flags.group_concat_max_len= thd->variables.group_concat_max_len; + flags.lc_time_names= thd->variables.lc_time_names; STRUCT_LOCK(&structure_guard_mutex); if (query_cache_size == 0) @@ -1015,6 +1016,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) flags.sql_mode= thd->variables.sql_mode; flags.max_sort_length= thd->variables.max_sort_length; flags.group_concat_max_len= thd->variables.group_concat_max_len; + flags.lc_time_names= thd->variables.lc_time_names; memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)), &flags, QUERY_CACHE_FLAGS_SIZE); query_block = (Query_cache_block *) hash_search(&queries, (byte*) sql, diff --git a/sql/sql_class.cc b/sql/sql_class.cc index acca4aaa4e0..ace886c2b98 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -297,6 +297,7 @@ void THD::init(void) bzero((char*) warn_count, sizeof(warn_count)); total_warn_count= 0; update_charset(); + variables.lc_time_names = &my_locale_en_US; } diff --git a/sql/sql_class.h b/sql/sql_class.h index d482a524934..f1cf9c7b3e2 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -423,6 +423,9 @@ struct system_variables CHARSET_INFO *collation_database; CHARSET_INFO *collation_connection; + /* Locale Support */ + MY_LOCALE *lc_time_names; + Time_zone *time_zone; /* DATE, DATETIME and TIME formats */ diff --git a/sql/sql_locale.cc b/sql/sql_locale.cc new file mode 100644 index 00000000000..283304587a6 --- /dev/null +++ b/sql/sql_locale.cc @@ -0,0 +1,1607 @@ +/* Copyright (C) 2005 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* + The beginnings of locale(7) support. + Sponsored for subset of LC_TIME support, WorkLog entry 2928, -- Josh Chamas + + !! This file is built from my_locale.pl !! +*/ + +#include "mysql_priv.h" + + +MY_LOCALE *my_locale_by_name(const char *name) +{ + MY_LOCALE **locale; + for( locale= my_locales; *locale != NULL; locale++) + { + if(!strcmp((*locale)->name, name)) + return *locale; + } + return NULL; +} + +/***** LOCALE BEGIN ar_AE: Arabic - United Arab Emirates *****/ +static const char *my_locale_month_names_ar_AE[13] = + {"يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر", NullS }; +static const char *my_locale_ab_month_names_ar_AE[13] = + {"ينا","فبر","مار","أبر","ماي","يون","يول","أغس","سبت","أكت","نوف","ديس", NullS }; +static const char *my_locale_day_names_ar_AE[8] = + {"الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت ","الأحد", NullS }; +static const char *my_locale_ab_day_names_ar_AE[8] = + {"ن","ث","ر","خ","ج","س","ح", NullS }; +static TYPELIB my_locale_typelib_month_names_ar_AE = + { array_elements(my_locale_month_names_ar_AE)-1, "", my_locale_month_names_ar_AE, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ar_AE = + { array_elements(my_locale_ab_month_names_ar_AE)-1, "", my_locale_ab_month_names_ar_AE, NULL }; +static TYPELIB my_locale_typelib_day_names_ar_AE = + { array_elements(my_locale_day_names_ar_AE)-1, "", my_locale_day_names_ar_AE, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ar_AE = + { array_elements(my_locale_ab_day_names_ar_AE)-1, "", my_locale_ab_day_names_ar_AE, NULL }; +MY_LOCALE my_locale_ar_AE= + { "ar_AE", "Arabic - United Arab Emirates", "false", &my_locale_typelib_month_names_ar_AE, &my_locale_typelib_ab_month_names_ar_AE, &my_locale_typelib_day_names_ar_AE, &my_locale_typelib_ab_day_names_ar_AE }; +/***** LOCALE END ar_AE *****/ + +/***** LOCALE BEGIN ar_BH: Arabic - Bahrain *****/ +static const char *my_locale_month_names_ar_BH[13] = + {"يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر", NullS }; +static const char *my_locale_ab_month_names_ar_BH[13] = + {"ينا","فبر","مار","أبر","ماي","يون","يول","أغس","سبت","أكت","نوف","ديس", NullS }; +static const char *my_locale_day_names_ar_BH[8] = + {"الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد", NullS }; +static const char *my_locale_ab_day_names_ar_BH[8] = + {"ن","ث","ر","خ","ج","س","ح", NullS }; +static TYPELIB my_locale_typelib_month_names_ar_BH = + { array_elements(my_locale_month_names_ar_BH)-1, "", my_locale_month_names_ar_BH, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ar_BH = + { array_elements(my_locale_ab_month_names_ar_BH)-1, "", my_locale_ab_month_names_ar_BH, NULL }; +static TYPELIB my_locale_typelib_day_names_ar_BH = + { array_elements(my_locale_day_names_ar_BH)-1, "", my_locale_day_names_ar_BH, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ar_BH = + { array_elements(my_locale_ab_day_names_ar_BH)-1, "", my_locale_ab_day_names_ar_BH, NULL }; +MY_LOCALE my_locale_ar_BH= + { "ar_BH", "Arabic - Bahrain", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_BH *****/ + +/***** LOCALE BEGIN ar_JO: Arabic - Jordan *****/ +static const char *my_locale_month_names_ar_JO[13] = + {"كانون الثاني","شباط","آذار","نيسان","نوار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول", NullS }; +static const char *my_locale_ab_month_names_ar_JO[13] = + {"كانون الثاني","شباط","آذار","نيسان","نوار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول", NullS }; +static const char *my_locale_day_names_ar_JO[8] = + {"الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد", NullS }; +static const char *my_locale_ab_day_names_ar_JO[8] = + {"الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد", NullS }; +static TYPELIB my_locale_typelib_month_names_ar_JO = + { array_elements(my_locale_month_names_ar_JO)-1, "", my_locale_month_names_ar_JO, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ar_JO = + { array_elements(my_locale_ab_month_names_ar_JO)-1, "", my_locale_ab_month_names_ar_JO, NULL }; +static TYPELIB my_locale_typelib_day_names_ar_JO = + { array_elements(my_locale_day_names_ar_JO)-1, "", my_locale_day_names_ar_JO, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ar_JO = + { array_elements(my_locale_ab_day_names_ar_JO)-1, "", my_locale_ab_day_names_ar_JO, NULL }; +MY_LOCALE my_locale_ar_JO= + { "ar_JO", "Arabic - Jordan", "false", &my_locale_typelib_month_names_ar_JO, &my_locale_typelib_ab_month_names_ar_JO, &my_locale_typelib_day_names_ar_JO, &my_locale_typelib_ab_day_names_ar_JO }; +/***** LOCALE END ar_JO *****/ + +/***** LOCALE BEGIN ar_SA: Arabic - Saudi Arabia *****/ +static const char *my_locale_month_names_ar_SA[13] = + {"كانون الثاني","شباط","آذار","نيسـان","أيار","حزيران","تـمـوز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول", NullS }; +static const char *my_locale_ab_month_names_ar_SA[13] = + {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec", NullS }; +static const char *my_locale_day_names_ar_SA[8] = + {"الإثنين","الثلاثاء","الأربعاء","الخميس","الجمعـة","السبت","الأحد", NullS }; +static const char *my_locale_ab_day_names_ar_SA[8] = + {"Mon","Tue","Wed","Thu","Fri","Sat","Sun", NullS }; +static TYPELIB my_locale_typelib_month_names_ar_SA = + { array_elements(my_locale_month_names_ar_SA)-1, "", my_locale_month_names_ar_SA, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ar_SA = + { array_elements(my_locale_ab_month_names_ar_SA)-1, "", my_locale_ab_month_names_ar_SA, NULL }; +static TYPELIB my_locale_typelib_day_names_ar_SA = + { array_elements(my_locale_day_names_ar_SA)-1, "", my_locale_day_names_ar_SA, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ar_SA = + { array_elements(my_locale_ab_day_names_ar_SA)-1, "", my_locale_ab_day_names_ar_SA, NULL }; +MY_LOCALE my_locale_ar_SA= + { "ar_SA", "Arabic - Saudi Arabia", "false", &my_locale_typelib_month_names_ar_SA, &my_locale_typelib_ab_month_names_ar_SA, &my_locale_typelib_day_names_ar_SA, &my_locale_typelib_ab_day_names_ar_SA }; +/***** LOCALE END ar_SA *****/ + +/***** LOCALE BEGIN ar_SY: Arabic - Syria *****/ +static const char *my_locale_month_names_ar_SY[13] = + {"كانون الثاني","شباط","آذار","نيسان","نواران","حزير","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول", NullS }; +static const char *my_locale_ab_month_names_ar_SY[13] = + {"كانون الثاني","شباط","آذار","نيسان","نوار","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول", NullS }; +static const char *my_locale_day_names_ar_SY[8] = + {"الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد", NullS }; +static const char *my_locale_ab_day_names_ar_SY[8] = + {"الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد", NullS }; +static TYPELIB my_locale_typelib_month_names_ar_SY = + { array_elements(my_locale_month_names_ar_SY)-1, "", my_locale_month_names_ar_SY, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ar_SY = + { array_elements(my_locale_ab_month_names_ar_SY)-1, "", my_locale_ab_month_names_ar_SY, NULL }; +static TYPELIB my_locale_typelib_day_names_ar_SY = + { array_elements(my_locale_day_names_ar_SY)-1, "", my_locale_day_names_ar_SY, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ar_SY = + { array_elements(my_locale_ab_day_names_ar_SY)-1, "", my_locale_ab_day_names_ar_SY, NULL }; +MY_LOCALE my_locale_ar_SY= + { "ar_SY", "Arabic - Syria", "false", &my_locale_typelib_month_names_ar_SY, &my_locale_typelib_ab_month_names_ar_SY, &my_locale_typelib_day_names_ar_SY, &my_locale_typelib_ab_day_names_ar_SY }; +/***** LOCALE END ar_SY *****/ + +/***** LOCALE BEGIN be_BY: Belarusian - Belarus *****/ +static const char *my_locale_month_names_be_BY[13] = + {"Студзень","Люты","Сакавік","Красавік","Травень","Чэрвень","Ліпень","Жнівень","Верасень","Кастрычнік","Лістапад","Снежань", NullS }; +static const char *my_locale_ab_month_names_be_BY[13] = + {"Стд","Лют","Сак","Крс","Тра","Чэр","Ліп","Жнв","Врс","Кст","Ліс","Снж", NullS }; +static const char *my_locale_day_names_be_BY[8] = + {"Панядзелак","Аўторак","Серада","Чацвер","Пятніца","Субота","Нядзеля", NullS }; +static const char *my_locale_ab_day_names_be_BY[8] = + {"Пан","Аўт","Срд","Чцв","Пят","Суб","Няд", NullS }; +static TYPELIB my_locale_typelib_month_names_be_BY = + { array_elements(my_locale_month_names_be_BY)-1, "", my_locale_month_names_be_BY, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_be_BY = + { array_elements(my_locale_ab_month_names_be_BY)-1, "", my_locale_ab_month_names_be_BY, NULL }; +static TYPELIB my_locale_typelib_day_names_be_BY = + { array_elements(my_locale_day_names_be_BY)-1, "", my_locale_day_names_be_BY, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_be_BY = + { array_elements(my_locale_ab_day_names_be_BY)-1, "", my_locale_ab_day_names_be_BY, NULL }; +MY_LOCALE my_locale_be_BY= + { "be_BY", "Belarusian - Belarus", "false", &my_locale_typelib_month_names_be_BY, &my_locale_typelib_ab_month_names_be_BY, &my_locale_typelib_day_names_be_BY, &my_locale_typelib_ab_day_names_be_BY }; +/***** LOCALE END be_BY *****/ + +/***** LOCALE BEGIN bg_BG: Bulgarian - Bulgaria *****/ +static const char *my_locale_month_names_bg_BG[13] = + {"януари","февруари","март","април","май","юни","юли","август","септември","октомври","ноември","декември", NullS }; +static const char *my_locale_ab_month_names_bg_BG[13] = + {"яну","фев","мар","апр","май","юни","юли","авг","сеп","окт","ное","дек", NullS }; +static const char *my_locale_day_names_bg_BG[8] = + {"понеделник","вторник","сряда","четвъртък","петък","събота","неделя", NullS }; +static const char *my_locale_ab_day_names_bg_BG[8] = + {"пн","вт","ср","чт","пт","сб","нд", NullS }; +static TYPELIB my_locale_typelib_month_names_bg_BG = + { array_elements(my_locale_month_names_bg_BG)-1, "", my_locale_month_names_bg_BG, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_bg_BG = + { array_elements(my_locale_ab_month_names_bg_BG)-1, "", my_locale_ab_month_names_bg_BG, NULL }; +static TYPELIB my_locale_typelib_day_names_bg_BG = + { array_elements(my_locale_day_names_bg_BG)-1, "", my_locale_day_names_bg_BG, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_bg_BG = + { array_elements(my_locale_ab_day_names_bg_BG)-1, "", my_locale_ab_day_names_bg_BG, NULL }; +MY_LOCALE my_locale_bg_BG= + { "bg_BG", "Bulgarian - Bulgaria", "false", &my_locale_typelib_month_names_bg_BG, &my_locale_typelib_ab_month_names_bg_BG, &my_locale_typelib_day_names_bg_BG, &my_locale_typelib_ab_day_names_bg_BG }; +/***** LOCALE END bg_BG *****/ + +/***** LOCALE BEGIN ca_ES: Catalan - Catalan *****/ +static const char *my_locale_month_names_ca_ES[13] = + {"gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre", NullS }; +static const char *my_locale_ab_month_names_ca_ES[13] = + {"gen","feb","mar","abr","mai","jun","jul","ago","set","oct","nov","des", NullS }; +static const char *my_locale_day_names_ca_ES[8] = + {"dilluns","dimarts","dimecres","dijous","divendres","dissabte","diumenge", NullS }; +static const char *my_locale_ab_day_names_ca_ES[8] = + {"dl","dt","dc","dj","dv","ds","dg", NullS }; +static TYPELIB my_locale_typelib_month_names_ca_ES = + { array_elements(my_locale_month_names_ca_ES)-1, "", my_locale_month_names_ca_ES, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ca_ES = + { array_elements(my_locale_ab_month_names_ca_ES)-1, "", my_locale_ab_month_names_ca_ES, NULL }; +static TYPELIB my_locale_typelib_day_names_ca_ES = + { array_elements(my_locale_day_names_ca_ES)-1, "", my_locale_day_names_ca_ES, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ca_ES = + { array_elements(my_locale_ab_day_names_ca_ES)-1, "", my_locale_ab_day_names_ca_ES, NULL }; +MY_LOCALE my_locale_ca_ES= + { "ca_ES", "Catalan - Catalan", "false", &my_locale_typelib_month_names_ca_ES, &my_locale_typelib_ab_month_names_ca_ES, &my_locale_typelib_day_names_ca_ES, &my_locale_typelib_ab_day_names_ca_ES }; +/***** LOCALE END ca_ES *****/ + +/***** LOCALE BEGIN cs_CZ: Czech - Czech Republic *****/ +static const char *my_locale_month_names_cs_CZ[13] = + {"leden","únor","březen","duben","květen","červen","červenec","srpen","září","říjen","listopad","prosinec", NullS }; +static const char *my_locale_ab_month_names_cs_CZ[13] = + {"led","úno","bře","dub","kvě","čen","čec","srp","zář","říj","lis","pro", NullS }; +static const char *my_locale_day_names_cs_CZ[8] = + {"Pondělí","Úterý","Středa","Čtvrtek","Pátek","Sobota","Neděle", NullS }; +static const char *my_locale_ab_day_names_cs_CZ[8] = + {"Po","Út","St","Čt","Pá","So","Ne", NullS }; +static TYPELIB my_locale_typelib_month_names_cs_CZ = + { array_elements(my_locale_month_names_cs_CZ)-1, "", my_locale_month_names_cs_CZ, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_cs_CZ = + { array_elements(my_locale_ab_month_names_cs_CZ)-1, "", my_locale_ab_month_names_cs_CZ, NULL }; +static TYPELIB my_locale_typelib_day_names_cs_CZ = + { array_elements(my_locale_day_names_cs_CZ)-1, "", my_locale_day_names_cs_CZ, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_cs_CZ = + { array_elements(my_locale_ab_day_names_cs_CZ)-1, "", my_locale_ab_day_names_cs_CZ, NULL }; +MY_LOCALE my_locale_cs_CZ= + { "cs_CZ", "Czech - Czech Republic", "false", &my_locale_typelib_month_names_cs_CZ, &my_locale_typelib_ab_month_names_cs_CZ, &my_locale_typelib_day_names_cs_CZ, &my_locale_typelib_ab_day_names_cs_CZ }; +/***** LOCALE END cs_CZ *****/ + +/***** LOCALE BEGIN da_DK: Danish - Denmark *****/ +static const char *my_locale_month_names_da_DK[13] = + {"januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december", NullS }; +static const char *my_locale_ab_month_names_da_DK[13] = + {"jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec", NullS }; +static const char *my_locale_day_names_da_DK[8] = + {"mandag","tirsdag","onsdag","torsdag","fredag","lørdag","søndag", NullS }; +static const char *my_locale_ab_day_names_da_DK[8] = + {"man","tir","ons","tor","fre","lør","søn", NullS }; +static TYPELIB my_locale_typelib_month_names_da_DK = + { array_elements(my_locale_month_names_da_DK)-1, "", my_locale_month_names_da_DK, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_da_DK = + { array_elements(my_locale_ab_month_names_da_DK)-1, "", my_locale_ab_month_names_da_DK, NULL }; +static TYPELIB my_locale_typelib_day_names_da_DK = + { array_elements(my_locale_day_names_da_DK)-1, "", my_locale_day_names_da_DK, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_da_DK = + { array_elements(my_locale_ab_day_names_da_DK)-1, "", my_locale_ab_day_names_da_DK, NULL }; +MY_LOCALE my_locale_da_DK= + { "da_DK", "Danish - Denmark", "false", &my_locale_typelib_month_names_da_DK, &my_locale_typelib_ab_month_names_da_DK, &my_locale_typelib_day_names_da_DK, &my_locale_typelib_ab_day_names_da_DK }; +/***** LOCALE END da_DK *****/ + +/***** LOCALE BEGIN de_AT: German - Austria *****/ +static const char *my_locale_month_names_de_AT[13] = + {"Jänner","Feber","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember", NullS }; +static const char *my_locale_ab_month_names_de_AT[13] = + {"Jän","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez", NullS }; +static const char *my_locale_day_names_de_AT[8] = + {"Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag", NullS }; +static const char *my_locale_ab_day_names_de_AT[8] = + {"Mon","Die","Mit","Don","Fre","Sam","Son", NullS }; +static TYPELIB my_locale_typelib_month_names_de_AT = + { array_elements(my_locale_month_names_de_AT)-1, "", my_locale_month_names_de_AT, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_de_AT = + { array_elements(my_locale_ab_month_names_de_AT)-1, "", my_locale_ab_month_names_de_AT, NULL }; +static TYPELIB my_locale_typelib_day_names_de_AT = + { array_elements(my_locale_day_names_de_AT)-1, "", my_locale_day_names_de_AT, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_de_AT = + { array_elements(my_locale_ab_day_names_de_AT)-1, "", my_locale_ab_day_names_de_AT, NULL }; +MY_LOCALE my_locale_de_AT= + { "de_AT", "German - Austria", "false", &my_locale_typelib_month_names_de_AT, &my_locale_typelib_ab_month_names_de_AT, &my_locale_typelib_day_names_de_AT, &my_locale_typelib_ab_day_names_de_AT }; +/***** LOCALE END de_AT *****/ + +/***** LOCALE BEGIN de_DE: German - Germany *****/ +static const char *my_locale_month_names_de_DE[13] = + {"Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember", NullS }; +static const char *my_locale_ab_month_names_de_DE[13] = + {"Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez", NullS }; +static const char *my_locale_day_names_de_DE[8] = + {"Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag", NullS }; +static const char *my_locale_ab_day_names_de_DE[8] = + {"Mo","Di","Mi","Do","Fr","Sa","So", NullS }; +static TYPELIB my_locale_typelib_month_names_de_DE = + { array_elements(my_locale_month_names_de_DE)-1, "", my_locale_month_names_de_DE, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_de_DE = + { array_elements(my_locale_ab_month_names_de_DE)-1, "", my_locale_ab_month_names_de_DE, NULL }; +static TYPELIB my_locale_typelib_day_names_de_DE = + { array_elements(my_locale_day_names_de_DE)-1, "", my_locale_day_names_de_DE, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_de_DE = + { array_elements(my_locale_ab_day_names_de_DE)-1, "", my_locale_ab_day_names_de_DE, NULL }; +MY_LOCALE my_locale_de_DE= + { "de_DE", "German - Germany", "false", &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE }; +/***** LOCALE END de_DE *****/ + +/***** LOCALE BEGIN en_US: English - United States *****/ +static const char *my_locale_month_names_en_US[13] = + {"January","February","March","April","May","June","July","August","September","October","November","December", NullS }; +static const char *my_locale_ab_month_names_en_US[13] = + {"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec", NullS }; +static const char *my_locale_day_names_en_US[8] = + {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday", NullS }; +static const char *my_locale_ab_day_names_en_US[8] = + {"Mon","Tue","Wed","Thu","Fri","Sat","Sun", NullS }; +static TYPELIB my_locale_typelib_month_names_en_US = + { array_elements(my_locale_month_names_en_US)-1, "", my_locale_month_names_en_US, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_en_US = + { array_elements(my_locale_ab_month_names_en_US)-1, "", my_locale_ab_month_names_en_US, NULL }; +static TYPELIB my_locale_typelib_day_names_en_US = + { array_elements(my_locale_day_names_en_US)-1, "", my_locale_day_names_en_US, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_en_US = + { array_elements(my_locale_ab_day_names_en_US)-1, "", my_locale_ab_day_names_en_US, NULL }; +MY_LOCALE my_locale_en_US= + { "en_US", "English - United States", "true", &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US }; +/***** LOCALE END en_US *****/ + +/***** LOCALE BEGIN es_ES: Spanish - Spain *****/ +static const char *my_locale_month_names_es_ES[13] = + {"enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre", NullS }; +static const char *my_locale_ab_month_names_es_ES[13] = + {"ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic", NullS }; +static const char *my_locale_day_names_es_ES[8] = + {"lunes","martes","miércoles","jueves","viernes","sábado","domingo", NullS }; +static const char *my_locale_ab_day_names_es_ES[8] = + {"lun","mar","mié","jue","vie","sáb","dom", NullS }; +static TYPELIB my_locale_typelib_month_names_es_ES = + { array_elements(my_locale_month_names_es_ES)-1, "", my_locale_month_names_es_ES, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_es_ES = + { array_elements(my_locale_ab_month_names_es_ES)-1, "", my_locale_ab_month_names_es_ES, NULL }; +static TYPELIB my_locale_typelib_day_names_es_ES = + { array_elements(my_locale_day_names_es_ES)-1, "", my_locale_day_names_es_ES, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_es_ES = + { array_elements(my_locale_ab_day_names_es_ES)-1, "", my_locale_ab_day_names_es_ES, NULL }; +MY_LOCALE my_locale_es_ES= + { "es_ES", "Spanish - Spain", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_ES *****/ + +/***** LOCALE BEGIN et_EE: Estonian - Estonia *****/ +static const char *my_locale_month_names_et_EE[13] = + {"jaanuar","veebruar","märts","aprill","mai","juuni","juuli","august","september","oktoober","november","detsember", NullS }; +static const char *my_locale_ab_month_names_et_EE[13] = + {"jaan ","veebr","märts","apr ","mai ","juuni","juuli","aug ","sept ","okt ","nov ","dets ", NullS }; +static const char *my_locale_day_names_et_EE[8] = + {"esmaspäev","teisipäev","kolmapäev","neljapäev","reede","laupäev","pühapäev", NullS }; +static const char *my_locale_ab_day_names_et_EE[8] = + {"E","T","K","N","R","L","P", NullS }; +static TYPELIB my_locale_typelib_month_names_et_EE = + { array_elements(my_locale_month_names_et_EE)-1, "", my_locale_month_names_et_EE, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_et_EE = + { array_elements(my_locale_ab_month_names_et_EE)-1, "", my_locale_ab_month_names_et_EE, NULL }; +static TYPELIB my_locale_typelib_day_names_et_EE = + { array_elements(my_locale_day_names_et_EE)-1, "", my_locale_day_names_et_EE, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_et_EE = + { array_elements(my_locale_ab_day_names_et_EE)-1, "", my_locale_ab_day_names_et_EE, NULL }; +MY_LOCALE my_locale_et_EE= + { "et_EE", "Estonian - Estonia", "false", &my_locale_typelib_month_names_et_EE, &my_locale_typelib_ab_month_names_et_EE, &my_locale_typelib_day_names_et_EE, &my_locale_typelib_ab_day_names_et_EE }; +/***** LOCALE END et_EE *****/ + +/***** LOCALE BEGIN eu_ES: Basque - Basque *****/ +static const char *my_locale_month_names_eu_ES[13] = + {"urtarrila","otsaila","martxoa","apirila","maiatza","ekaina","uztaila","abuztua","iraila","urria","azaroa","abendua", NullS }; +static const char *my_locale_ab_month_names_eu_ES[13] = + {"urt","ots","mar","api","mai","eka","uzt","abu","ira","urr","aza","abe", NullS }; +static const char *my_locale_day_names_eu_ES[8] = + {"astelehena","asteartea","asteazkena","osteguna","ostirala","larunbata","igandea", NullS }; +static const char *my_locale_ab_day_names_eu_ES[8] = + {"al.","ar.","az.","og.","or.","lr.","ig.", NullS }; +static TYPELIB my_locale_typelib_month_names_eu_ES = + { array_elements(my_locale_month_names_eu_ES)-1, "", my_locale_month_names_eu_ES, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_eu_ES = + { array_elements(my_locale_ab_month_names_eu_ES)-1, "", my_locale_ab_month_names_eu_ES, NULL }; +static TYPELIB my_locale_typelib_day_names_eu_ES = + { array_elements(my_locale_day_names_eu_ES)-1, "", my_locale_day_names_eu_ES, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_eu_ES = + { array_elements(my_locale_ab_day_names_eu_ES)-1, "", my_locale_ab_day_names_eu_ES, NULL }; +MY_LOCALE my_locale_eu_ES= + { "eu_ES", "Basque - Basque", "true", &my_locale_typelib_month_names_eu_ES, &my_locale_typelib_ab_month_names_eu_ES, &my_locale_typelib_day_names_eu_ES, &my_locale_typelib_ab_day_names_eu_ES }; +/***** LOCALE END eu_ES *****/ + +/***** LOCALE BEGIN fi_FI: Finnish - Finland *****/ +static const char *my_locale_month_names_fi_FI[13] = + {"tammikuu","helmikuu","maaliskuu","huhtikuu","toukokuu","kesäkuu","heinäkuu","elokuu","syyskuu","lokakuu","marraskuu","joulukuu", NullS }; +static const char *my_locale_ab_month_names_fi_FI[13] = + {"tammi ","helmi ","maalis","huhti ","touko ","kesä  ","heinä ","elo   ","syys  ","loka  ","marras","joulu ", NullS }; +static const char *my_locale_day_names_fi_FI[8] = + {"maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai","sunnuntai", NullS }; +static const char *my_locale_ab_day_names_fi_FI[8] = + {"ma","ti","ke","to","pe","la","su", NullS }; +static TYPELIB my_locale_typelib_month_names_fi_FI = + { array_elements(my_locale_month_names_fi_FI)-1, "", my_locale_month_names_fi_FI, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_fi_FI = + { array_elements(my_locale_ab_month_names_fi_FI)-1, "", my_locale_ab_month_names_fi_FI, NULL }; +static TYPELIB my_locale_typelib_day_names_fi_FI = + { array_elements(my_locale_day_names_fi_FI)-1, "", my_locale_day_names_fi_FI, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_fi_FI = + { array_elements(my_locale_ab_day_names_fi_FI)-1, "", my_locale_ab_day_names_fi_FI, NULL }; +MY_LOCALE my_locale_fi_FI= + { "fi_FI", "Finnish - Finland", "false", &my_locale_typelib_month_names_fi_FI, &my_locale_typelib_ab_month_names_fi_FI, &my_locale_typelib_day_names_fi_FI, &my_locale_typelib_ab_day_names_fi_FI }; +/***** LOCALE END fi_FI *****/ + +/***** LOCALE BEGIN fo_FO: Faroese - Faroe Islands *****/ +static const char *my_locale_month_names_fo_FO[13] = + {"januar","februar","mars","apríl","mai","juni","juli","august","september","oktober","november","desember", NullS }; +static const char *my_locale_ab_month_names_fo_FO[13] = + {"jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des", NullS }; +static const char *my_locale_day_names_fo_FO[8] = + {"mánadagur","týsdagur","mikudagur","hósdagur","fríggjadagur","leygardagur","sunnudagur", NullS }; +static const char *my_locale_ab_day_names_fo_FO[8] = + {"mán","týs","mik","hós","frí","ley","sun", NullS }; +static TYPELIB my_locale_typelib_month_names_fo_FO = + { array_elements(my_locale_month_names_fo_FO)-1, "", my_locale_month_names_fo_FO, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_fo_FO = + { array_elements(my_locale_ab_month_names_fo_FO)-1, "", my_locale_ab_month_names_fo_FO, NULL }; +static TYPELIB my_locale_typelib_day_names_fo_FO = + { array_elements(my_locale_day_names_fo_FO)-1, "", my_locale_day_names_fo_FO, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_fo_FO = + { array_elements(my_locale_ab_day_names_fo_FO)-1, "", my_locale_ab_day_names_fo_FO, NULL }; +MY_LOCALE my_locale_fo_FO= + { "fo_FO", "Faroese - Faroe Islands", "false", &my_locale_typelib_month_names_fo_FO, &my_locale_typelib_ab_month_names_fo_FO, &my_locale_typelib_day_names_fo_FO, &my_locale_typelib_ab_day_names_fo_FO }; +/***** LOCALE END fo_FO *****/ + +/***** LOCALE BEGIN fr_FR: French - France *****/ +static const char *my_locale_month_names_fr_FR[13] = + {"janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre", NullS }; +static const char *my_locale_ab_month_names_fr_FR[13] = + {"jan","fév","mar","avr","mai","jun","jui","aoû","sep","oct","nov","déc", NullS }; +static const char *my_locale_day_names_fr_FR[8] = + {"lundi","mardi","mercredi","jeudi","vendredi","samedi","dimanche", NullS }; +static const char *my_locale_ab_day_names_fr_FR[8] = + {"lun","mar","mer","jeu","ven","sam","dim", NullS }; +static TYPELIB my_locale_typelib_month_names_fr_FR = + { array_elements(my_locale_month_names_fr_FR)-1, "", my_locale_month_names_fr_FR, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_fr_FR = + { array_elements(my_locale_ab_month_names_fr_FR)-1, "", my_locale_ab_month_names_fr_FR, NULL }; +static TYPELIB my_locale_typelib_day_names_fr_FR = + { array_elements(my_locale_day_names_fr_FR)-1, "", my_locale_day_names_fr_FR, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_fr_FR = + { array_elements(my_locale_ab_day_names_fr_FR)-1, "", my_locale_ab_day_names_fr_FR, NULL }; +MY_LOCALE my_locale_fr_FR= + { "fr_FR", "French - France", "false", &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR }; +/***** LOCALE END fr_FR *****/ + +/***** LOCALE BEGIN gl_ES: Galician - Galician *****/ +static const char *my_locale_month_names_gl_ES[13] = + {"Xaneiro","Febreiro","Marzo","Abril","Maio","Xuño","Xullo","Agosto","Setembro","Outubro","Novembro","Decembro", NullS }; +static const char *my_locale_ab_month_names_gl_ES[13] = + {"Xan","Feb","Mar","Abr","Mai","Xuñ","Xul","Ago","Set","Out","Nov","Dec", NullS }; +static const char *my_locale_day_names_gl_ES[8] = + {"Luns","Martes","Mércores","Xoves","Venres","Sábado","Domingo", NullS }; +static const char *my_locale_ab_day_names_gl_ES[8] = + {"Lun","Mar","Mér","Xov","Ven","Sáb","Dom", NullS }; +static TYPELIB my_locale_typelib_month_names_gl_ES = + { array_elements(my_locale_month_names_gl_ES)-1, "", my_locale_month_names_gl_ES, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_gl_ES = + { array_elements(my_locale_ab_month_names_gl_ES)-1, "", my_locale_ab_month_names_gl_ES, NULL }; +static TYPELIB my_locale_typelib_day_names_gl_ES = + { array_elements(my_locale_day_names_gl_ES)-1, "", my_locale_day_names_gl_ES, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_gl_ES = + { array_elements(my_locale_ab_day_names_gl_ES)-1, "", my_locale_ab_day_names_gl_ES, NULL }; +MY_LOCALE my_locale_gl_ES= + { "gl_ES", "Galician - Galician", "false", &my_locale_typelib_month_names_gl_ES, &my_locale_typelib_ab_month_names_gl_ES, &my_locale_typelib_day_names_gl_ES, &my_locale_typelib_ab_day_names_gl_ES }; +/***** LOCALE END gl_ES *****/ + +/***** LOCALE BEGIN gu_IN: Gujarati - India *****/ +static const char *my_locale_month_names_gu_IN[13] = + {"જાન્યુઆરી","ફેબ્રુઆરી","માર્ચ","એપ્રિલ","મે","જુન","જુલાઇ","ઓગસ્ટ","સેપ્ટેમ્બર","ઓક્ટોબર","નવેમ્બર","ડિસેમ્બર", NullS }; +static const char *my_locale_ab_month_names_gu_IN[13] = + {"જાન","ફેબ","માર","એપ્ર","મે","જુન","જુલ","ઓગ","સેપ્ટ","ઓક્ટ","નોવ","ડિસ", NullS }; +static const char *my_locale_day_names_gu_IN[8] = + {"સોમવાર","મન્ગળવાર","બુધવાર","ગુરુવાર","શુક્રવાર","શનિવાર","રવિવાર", NullS }; +static const char *my_locale_ab_day_names_gu_IN[8] = + {"સોમ","મન્ગળ","બુધ","ગુરુ","શુક્ર","શનિ","રવિ", NullS }; +static TYPELIB my_locale_typelib_month_names_gu_IN = + { array_elements(my_locale_month_names_gu_IN)-1, "", my_locale_month_names_gu_IN, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_gu_IN = + { array_elements(my_locale_ab_month_names_gu_IN)-1, "", my_locale_ab_month_names_gu_IN, NULL }; +static TYPELIB my_locale_typelib_day_names_gu_IN = + { array_elements(my_locale_day_names_gu_IN)-1, "", my_locale_day_names_gu_IN, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_gu_IN = + { array_elements(my_locale_ab_day_names_gu_IN)-1, "", my_locale_ab_day_names_gu_IN, NULL }; +MY_LOCALE my_locale_gu_IN= + { "gu_IN", "Gujarati - India", "false", &my_locale_typelib_month_names_gu_IN, &my_locale_typelib_ab_month_names_gu_IN, &my_locale_typelib_day_names_gu_IN, &my_locale_typelib_ab_day_names_gu_IN }; +/***** LOCALE END gu_IN *****/ + +/***** LOCALE BEGIN he_IL: Hebrew - Israel *****/ +static const char *my_locale_month_names_he_IL[13] = + {"ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר", NullS }; +static const char *my_locale_ab_month_names_he_IL[13] = + {"ינו","פבר","מרץ","אפר","מאי","יונ","יול","אוג","ספט","אוק","נוב","דצמ", NullS }; +static const char *my_locale_day_names_he_IL[8] = + {"שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון", NullS }; +static const char *my_locale_ab_day_names_he_IL[8] = + {"ב'","ג'","ד'","ה'","ו'","ש'","א'", NullS }; +static TYPELIB my_locale_typelib_month_names_he_IL = + { array_elements(my_locale_month_names_he_IL)-1, "", my_locale_month_names_he_IL, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_he_IL = + { array_elements(my_locale_ab_month_names_he_IL)-1, "", my_locale_ab_month_names_he_IL, NULL }; +static TYPELIB my_locale_typelib_day_names_he_IL = + { array_elements(my_locale_day_names_he_IL)-1, "", my_locale_day_names_he_IL, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_he_IL = + { array_elements(my_locale_ab_day_names_he_IL)-1, "", my_locale_ab_day_names_he_IL, NULL }; +MY_LOCALE my_locale_he_IL= + { "he_IL", "Hebrew - Israel", "false", &my_locale_typelib_month_names_he_IL, &my_locale_typelib_ab_month_names_he_IL, &my_locale_typelib_day_names_he_IL, &my_locale_typelib_ab_day_names_he_IL }; +/***** LOCALE END he_IL *****/ + +/***** LOCALE BEGIN hi_IN: Hindi - India *****/ +static const char *my_locale_month_names_hi_IN[13] = + {"जनवरी","फ़रवरी","मार्च","अप्रेल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर", NullS }; +static const char *my_locale_ab_month_names_hi_IN[13] = + {"जनवरी","फ़रवरी","मार्च","अप्रेल","मई","जून","जुलाई","अगस्त","सितम्बर","अक्टूबर","नवम्बर","दिसम्बर", NullS }; +static const char *my_locale_day_names_hi_IN[8] = + {"सोमवार ","मंगलवार ","बुधवार ","गुरुवार ","शुक्रवार ","शनिवार ","रविवार ", NullS }; +static const char *my_locale_ab_day_names_hi_IN[8] = + {"सोम ","मंगल ","बुध ","गुरु ","शुक्र ","शनि ","रवि ", NullS }; +static TYPELIB my_locale_typelib_month_names_hi_IN = + { array_elements(my_locale_month_names_hi_IN)-1, "", my_locale_month_names_hi_IN, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_hi_IN = + { array_elements(my_locale_ab_month_names_hi_IN)-1, "", my_locale_ab_month_names_hi_IN, NULL }; +static TYPELIB my_locale_typelib_day_names_hi_IN = + { array_elements(my_locale_day_names_hi_IN)-1, "", my_locale_day_names_hi_IN, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_hi_IN = + { array_elements(my_locale_ab_day_names_hi_IN)-1, "", my_locale_ab_day_names_hi_IN, NULL }; +MY_LOCALE my_locale_hi_IN= + { "hi_IN", "Hindi - India", "false", &my_locale_typelib_month_names_hi_IN, &my_locale_typelib_ab_month_names_hi_IN, &my_locale_typelib_day_names_hi_IN, &my_locale_typelib_ab_day_names_hi_IN }; +/***** LOCALE END hi_IN *****/ + +/***** LOCALE BEGIN hr_HR: Croatian - Croatia *****/ +static const char *my_locale_month_names_hr_HR[13] = + {"Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac", NullS }; +static const char *my_locale_ab_month_names_hr_HR[13] = + {"Sij","Vel","Ožu","Tra","Svi","Lip","Srp","Kol","Ruj","Lis","Stu","Pro", NullS }; +static const char *my_locale_day_names_hr_HR[8] = + {"Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota","Nedjelja", NullS }; +static const char *my_locale_ab_day_names_hr_HR[8] = + {"Pon","Uto","Sri","Čet","Pet","Sub","Ned", NullS }; +static TYPELIB my_locale_typelib_month_names_hr_HR = + { array_elements(my_locale_month_names_hr_HR)-1, "", my_locale_month_names_hr_HR, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_hr_HR = + { array_elements(my_locale_ab_month_names_hr_HR)-1, "", my_locale_ab_month_names_hr_HR, NULL }; +static TYPELIB my_locale_typelib_day_names_hr_HR = + { array_elements(my_locale_day_names_hr_HR)-1, "", my_locale_day_names_hr_HR, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_hr_HR = + { array_elements(my_locale_ab_day_names_hr_HR)-1, "", my_locale_ab_day_names_hr_HR, NULL }; +MY_LOCALE my_locale_hr_HR= + { "hr_HR", "Croatian - Croatia", "false", &my_locale_typelib_month_names_hr_HR, &my_locale_typelib_ab_month_names_hr_HR, &my_locale_typelib_day_names_hr_HR, &my_locale_typelib_ab_day_names_hr_HR }; +/***** LOCALE END hr_HR *****/ + +/***** LOCALE BEGIN hu_HU: Hungarian - Hungary *****/ +static const char *my_locale_month_names_hu_HU[13] = + {"január","február","március","április","május","június","július","augusztus","szeptember","október","november","december", NullS }; +static const char *my_locale_ab_month_names_hu_HU[13] = + {"jan","feb","már","ápr","máj","jún","júl","aug","sze","okt","nov","dec", NullS }; +static const char *my_locale_day_names_hu_HU[8] = + {"hétfő","kedd","szerda","csütörtök","péntek","szombat","vasárnap", NullS }; +static const char *my_locale_ab_day_names_hu_HU[8] = + {"h","k","sze","cs","p","szo","v", NullS }; +static TYPELIB my_locale_typelib_month_names_hu_HU = + { array_elements(my_locale_month_names_hu_HU)-1, "", my_locale_month_names_hu_HU, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_hu_HU = + { array_elements(my_locale_ab_month_names_hu_HU)-1, "", my_locale_ab_month_names_hu_HU, NULL }; +static TYPELIB my_locale_typelib_day_names_hu_HU = + { array_elements(my_locale_day_names_hu_HU)-1, "", my_locale_day_names_hu_HU, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_hu_HU = + { array_elements(my_locale_ab_day_names_hu_HU)-1, "", my_locale_ab_day_names_hu_HU, NULL }; +MY_LOCALE my_locale_hu_HU= + { "hu_HU", "Hungarian - Hungary", "false", &my_locale_typelib_month_names_hu_HU, &my_locale_typelib_ab_month_names_hu_HU, &my_locale_typelib_day_names_hu_HU, &my_locale_typelib_ab_day_names_hu_HU }; +/***** LOCALE END hu_HU *****/ + +/***** LOCALE BEGIN id_ID: Indonesian - Indonesia *****/ +static const char *my_locale_month_names_id_ID[13] = + {"Januari","Pebruari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember", NullS }; +static const char *my_locale_ab_month_names_id_ID[13] = + {"Jan","Peb","Mar","Apr","Mei","Jun","Jul","Agu","Sep","Okt","Nov","Des", NullS }; +static const char *my_locale_day_names_id_ID[8] = + {"Senin","Selasa","Rabu","Kamis","Jumat","Sabtu","Minggu", NullS }; +static const char *my_locale_ab_day_names_id_ID[8] = + {"Sen","Sel","Rab","Kam","Jum","Sab","Min", NullS }; +static TYPELIB my_locale_typelib_month_names_id_ID = + { array_elements(my_locale_month_names_id_ID)-1, "", my_locale_month_names_id_ID, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_id_ID = + { array_elements(my_locale_ab_month_names_id_ID)-1, "", my_locale_ab_month_names_id_ID, NULL }; +static TYPELIB my_locale_typelib_day_names_id_ID = + { array_elements(my_locale_day_names_id_ID)-1, "", my_locale_day_names_id_ID, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_id_ID = + { array_elements(my_locale_ab_day_names_id_ID)-1, "", my_locale_ab_day_names_id_ID, NULL }; +MY_LOCALE my_locale_id_ID= + { "id_ID", "Indonesian - Indonesia", "true", &my_locale_typelib_month_names_id_ID, &my_locale_typelib_ab_month_names_id_ID, &my_locale_typelib_day_names_id_ID, &my_locale_typelib_ab_day_names_id_ID }; +/***** LOCALE END id_ID *****/ + +/***** LOCALE BEGIN is_IS: Icelandic - Iceland *****/ +static const char *my_locale_month_names_is_IS[13] = + {"janúar","febrúar","mars","apríl","maí","júní","júlí","ágúst","september","október","nóvember","desember", NullS }; +static const char *my_locale_ab_month_names_is_IS[13] = + {"jan","feb","mar","apr","maí","jún","júl","ágú","sep","okt","nóv","des", NullS }; +static const char *my_locale_day_names_is_IS[8] = + {"mánudagur","þriðjudagur","miðvikudagur","fimmtudagur","föstudagur","laugardagur","sunnudagur", NullS }; +static const char *my_locale_ab_day_names_is_IS[8] = + {"mán","þri","mið","fim","fös","lau","sun", NullS }; +static TYPELIB my_locale_typelib_month_names_is_IS = + { array_elements(my_locale_month_names_is_IS)-1, "", my_locale_month_names_is_IS, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_is_IS = + { array_elements(my_locale_ab_month_names_is_IS)-1, "", my_locale_ab_month_names_is_IS, NULL }; +static TYPELIB my_locale_typelib_day_names_is_IS = + { array_elements(my_locale_day_names_is_IS)-1, "", my_locale_day_names_is_IS, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_is_IS = + { array_elements(my_locale_ab_day_names_is_IS)-1, "", my_locale_ab_day_names_is_IS, NULL }; +MY_LOCALE my_locale_is_IS= + { "is_IS", "Icelandic - Iceland", "false", &my_locale_typelib_month_names_is_IS, &my_locale_typelib_ab_month_names_is_IS, &my_locale_typelib_day_names_is_IS, &my_locale_typelib_ab_day_names_is_IS }; +/***** LOCALE END is_IS *****/ + +/***** LOCALE BEGIN it_CH: Italian - Switzerland *****/ +static const char *my_locale_month_names_it_CH[13] = + {"gennaio","febbraio","marzo","aprile","maggio","giugno","luglio","agosto","settembre","ottobre","novembre","dicembre", NullS }; +static const char *my_locale_ab_month_names_it_CH[13] = + {"gen","feb","mar","apr","mag","giu","lug","ago","set","ott","nov","dic", NullS }; +static const char *my_locale_day_names_it_CH[8] = + {"lunedì","martedì","mercoledì","giovedì","venerdì","sabato","domenica", NullS }; +static const char *my_locale_ab_day_names_it_CH[8] = + {"lun","mar","mer","gio","ven","sab","dom", NullS }; +static TYPELIB my_locale_typelib_month_names_it_CH = + { array_elements(my_locale_month_names_it_CH)-1, "", my_locale_month_names_it_CH, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_it_CH = + { array_elements(my_locale_ab_month_names_it_CH)-1, "", my_locale_ab_month_names_it_CH, NULL }; +static TYPELIB my_locale_typelib_day_names_it_CH = + { array_elements(my_locale_day_names_it_CH)-1, "", my_locale_day_names_it_CH, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_it_CH = + { array_elements(my_locale_ab_day_names_it_CH)-1, "", my_locale_ab_day_names_it_CH, NULL }; +MY_LOCALE my_locale_it_CH= + { "it_CH", "Italian - Switzerland", "false", &my_locale_typelib_month_names_it_CH, &my_locale_typelib_ab_month_names_it_CH, &my_locale_typelib_day_names_it_CH, &my_locale_typelib_ab_day_names_it_CH }; +/***** LOCALE END it_CH *****/ + +/***** LOCALE BEGIN ja_JP: Japanese - Japan *****/ +static const char *my_locale_month_names_ja_JP[13] = + {"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月", NullS }; +static const char *my_locale_ab_month_names_ja_JP[13] = + {" 1月"," 2月"," 3月"," 4月"," 5月"," 6月"," 7月"," 8月"," 9月","10月","11月","12月", NullS }; +static const char *my_locale_day_names_ja_JP[8] = + {"月曜日","火曜日","水曜日","木曜日","金曜日","土曜日","日曜日", NullS }; +static const char *my_locale_ab_day_names_ja_JP[8] = + {"月","火","水","木","金","土","日", NullS }; +static TYPELIB my_locale_typelib_month_names_ja_JP = + { array_elements(my_locale_month_names_ja_JP)-1, "", my_locale_month_names_ja_JP, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ja_JP = + { array_elements(my_locale_ab_month_names_ja_JP)-1, "", my_locale_ab_month_names_ja_JP, NULL }; +static TYPELIB my_locale_typelib_day_names_ja_JP = + { array_elements(my_locale_day_names_ja_JP)-1, "", my_locale_day_names_ja_JP, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ja_JP = + { array_elements(my_locale_ab_day_names_ja_JP)-1, "", my_locale_ab_day_names_ja_JP, NULL }; +MY_LOCALE my_locale_ja_JP= + { "ja_JP", "Japanese - Japan", "false", &my_locale_typelib_month_names_ja_JP, &my_locale_typelib_ab_month_names_ja_JP, &my_locale_typelib_day_names_ja_JP, &my_locale_typelib_ab_day_names_ja_JP }; +/***** LOCALE END ja_JP *****/ + +/***** LOCALE BEGIN ko_KR: Korean - Korea *****/ +static const char *my_locale_month_names_ko_KR[13] = + {"일월","이월","삼월","사월","오월","유월","칠월","팔월","구월","시월","십일월","십이월", NullS }; +static const char *my_locale_ab_month_names_ko_KR[13] = + {" 1월"," 2월"," 3월"," 4월"," 5월"," 6월"," 7월"," 8월"," 9월","10월","11월","12월", NullS }; +static const char *my_locale_day_names_ko_KR[8] = + {"월요일","화요일","수요일","목요일","금요일","토요일","일요일", NullS }; +static const char *my_locale_ab_day_names_ko_KR[8] = + {"월","화","수","목","금","토","일", NullS }; +static TYPELIB my_locale_typelib_month_names_ko_KR = + { array_elements(my_locale_month_names_ko_KR)-1, "", my_locale_month_names_ko_KR, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ko_KR = + { array_elements(my_locale_ab_month_names_ko_KR)-1, "", my_locale_ab_month_names_ko_KR, NULL }; +static TYPELIB my_locale_typelib_day_names_ko_KR = + { array_elements(my_locale_day_names_ko_KR)-1, "", my_locale_day_names_ko_KR, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ko_KR = + { array_elements(my_locale_ab_day_names_ko_KR)-1, "", my_locale_ab_day_names_ko_KR, NULL }; +MY_LOCALE my_locale_ko_KR= + { "ko_KR", "Korean - Korea", "false", &my_locale_typelib_month_names_ko_KR, &my_locale_typelib_ab_month_names_ko_KR, &my_locale_typelib_day_names_ko_KR, &my_locale_typelib_ab_day_names_ko_KR }; +/***** LOCALE END ko_KR *****/ + +/***** LOCALE BEGIN lt_LT: Lithuanian - Lithuania *****/ +static const char *my_locale_month_names_lt_LT[13] = + {"sausio","vasario","kovo","balandžio","gegužės","birželio","liepos","rugpjūčio","rugsėjo","spalio","lapkričio","gruodžio", NullS }; +static const char *my_locale_ab_month_names_lt_LT[13] = + {"Sau","Vas","Kov","Bal","Geg","Bir","Lie","Rgp","Rgs","Spa","Lap","Grd", NullS }; +static const char *my_locale_day_names_lt_LT[8] = + {"Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis","Sekmadienis", NullS }; +static const char *my_locale_ab_day_names_lt_LT[8] = + {"Pr","An","Tr","Kt","Pn","Št","Sk", NullS }; +static TYPELIB my_locale_typelib_month_names_lt_LT = + { array_elements(my_locale_month_names_lt_LT)-1, "", my_locale_month_names_lt_LT, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_lt_LT = + { array_elements(my_locale_ab_month_names_lt_LT)-1, "", my_locale_ab_month_names_lt_LT, NULL }; +static TYPELIB my_locale_typelib_day_names_lt_LT = + { array_elements(my_locale_day_names_lt_LT)-1, "", my_locale_day_names_lt_LT, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_lt_LT = + { array_elements(my_locale_ab_day_names_lt_LT)-1, "", my_locale_ab_day_names_lt_LT, NULL }; +MY_LOCALE my_locale_lt_LT= + { "lt_LT", "Lithuanian - Lithuania", "false", &my_locale_typelib_month_names_lt_LT, &my_locale_typelib_ab_month_names_lt_LT, &my_locale_typelib_day_names_lt_LT, &my_locale_typelib_ab_day_names_lt_LT }; +/***** LOCALE END lt_LT *****/ + +/***** LOCALE BEGIN lv_LV: Latvian - Latvia *****/ +static const char *my_locale_month_names_lv_LV[13] = + {"janvāris","februāris","marts","aprīlis","maijs","jūnijs","jūlijs","augusts","septembris","oktobris","novembris","decembris", NullS }; +static const char *my_locale_ab_month_names_lv_LV[13] = + {"jan","feb","mar","apr","mai","jūn","jūl","aug","sep","okt","nov","dec", NullS }; +static const char *my_locale_day_names_lv_LV[8] = + {"pirmdiena","otrdiena","trešdiena","ceturtdiena","piektdiena","sestdiena","svētdiena", NullS }; +static const char *my_locale_ab_day_names_lv_LV[8] = + {"P ","O ","T ","C ","Pk","S ","Sv", NullS }; +static TYPELIB my_locale_typelib_month_names_lv_LV = + { array_elements(my_locale_month_names_lv_LV)-1, "", my_locale_month_names_lv_LV, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_lv_LV = + { array_elements(my_locale_ab_month_names_lv_LV)-1, "", my_locale_ab_month_names_lv_LV, NULL }; +static TYPELIB my_locale_typelib_day_names_lv_LV = + { array_elements(my_locale_day_names_lv_LV)-1, "", my_locale_day_names_lv_LV, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_lv_LV = + { array_elements(my_locale_ab_day_names_lv_LV)-1, "", my_locale_ab_day_names_lv_LV, NULL }; +MY_LOCALE my_locale_lv_LV= + { "lv_LV", "Latvian - Latvia", "false", &my_locale_typelib_month_names_lv_LV, &my_locale_typelib_ab_month_names_lv_LV, &my_locale_typelib_day_names_lv_LV, &my_locale_typelib_ab_day_names_lv_LV }; +/***** LOCALE END lv_LV *****/ + +/***** LOCALE BEGIN mk_MK: Macedonian - FYROM *****/ +static const char *my_locale_month_names_mk_MK[13] = + {"јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември", NullS }; +static const char *my_locale_ab_month_names_mk_MK[13] = + {"јан","фев","мар","апр","мај","јун","јул","авг","сеп","окт","ное","дек", NullS }; +static const char *my_locale_day_names_mk_MK[8] = + {"понеделник","вторник","среда","четврток","петок","сабота","недела", NullS }; +static const char *my_locale_ab_day_names_mk_MK[8] = + {"пон","вто","сре","чет","пет","саб","нед", NullS }; +static TYPELIB my_locale_typelib_month_names_mk_MK = + { array_elements(my_locale_month_names_mk_MK)-1, "", my_locale_month_names_mk_MK, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_mk_MK = + { array_elements(my_locale_ab_month_names_mk_MK)-1, "", my_locale_ab_month_names_mk_MK, NULL }; +static TYPELIB my_locale_typelib_day_names_mk_MK = + { array_elements(my_locale_day_names_mk_MK)-1, "", my_locale_day_names_mk_MK, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_mk_MK = + { array_elements(my_locale_ab_day_names_mk_MK)-1, "", my_locale_ab_day_names_mk_MK, NULL }; +MY_LOCALE my_locale_mk_MK= + { "mk_MK", "Macedonian - FYROM", "false", &my_locale_typelib_month_names_mk_MK, &my_locale_typelib_ab_month_names_mk_MK, &my_locale_typelib_day_names_mk_MK, &my_locale_typelib_ab_day_names_mk_MK }; +/***** LOCALE END mk_MK *****/ + +/***** LOCALE BEGIN mn_MN: Mongolia - Mongolian *****/ +static const char *my_locale_month_names_mn_MN[13] = + {"Нэгдүгээр сар","Хоёрдугаар сар","Гуравдугаар сар","Дөрөвдүгээр сар","Тавдугаар сар","Зургаадугар сар","Долоодугаар сар","Наймдугаар сар","Есдүгээр сар","Аравдугаар сар","Арваннэгдүгээр сар","Арванхоёрдгаар сар", NullS }; +static const char *my_locale_ab_month_names_mn_MN[13] = + {"1-р","2-р","3-р","4-р","5-р","6-р","7-р","8-р","9-р","10-р","11-р","12-р", NullS }; +static const char *my_locale_day_names_mn_MN[8] = + {"Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба","Ням", NullS }; +static const char *my_locale_ab_day_names_mn_MN[8] = + {"Да","Мя","Лх","Пү","Ба","Бя","Ня", NullS }; +static TYPELIB my_locale_typelib_month_names_mn_MN = + { array_elements(my_locale_month_names_mn_MN)-1, "", my_locale_month_names_mn_MN, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_mn_MN = + { array_elements(my_locale_ab_month_names_mn_MN)-1, "", my_locale_ab_month_names_mn_MN, NULL }; +static TYPELIB my_locale_typelib_day_names_mn_MN = + { array_elements(my_locale_day_names_mn_MN)-1, "", my_locale_day_names_mn_MN, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_mn_MN = + { array_elements(my_locale_ab_day_names_mn_MN)-1, "", my_locale_ab_day_names_mn_MN, NULL }; +MY_LOCALE my_locale_mn_MN= + { "mn_MN", "Mongolia - Mongolian", "false", &my_locale_typelib_month_names_mn_MN, &my_locale_typelib_ab_month_names_mn_MN, &my_locale_typelib_day_names_mn_MN, &my_locale_typelib_ab_day_names_mn_MN }; +/***** LOCALE END mn_MN *****/ + +/***** LOCALE BEGIN ms_MY: Malay - Malaysia *****/ +static const char *my_locale_month_names_ms_MY[13] = + {"Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember", NullS }; +static const char *my_locale_ab_month_names_ms_MY[13] = + {"Jan","Feb","Mac","Apr","Mei","Jun","Jul","Ogos","Sep","Okt","Nov","Dis", NullS }; +static const char *my_locale_day_names_ms_MY[8] = + {"Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu","Ahad", NullS }; +static const char *my_locale_ab_day_names_ms_MY[8] = + {"Isn","Sel","Rab","Kha","Jum","Sab","Ahd", NullS }; +static TYPELIB my_locale_typelib_month_names_ms_MY = + { array_elements(my_locale_month_names_ms_MY)-1, "", my_locale_month_names_ms_MY, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ms_MY = + { array_elements(my_locale_ab_month_names_ms_MY)-1, "", my_locale_ab_month_names_ms_MY, NULL }; +static TYPELIB my_locale_typelib_day_names_ms_MY = + { array_elements(my_locale_day_names_ms_MY)-1, "", my_locale_day_names_ms_MY, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ms_MY = + { array_elements(my_locale_ab_day_names_ms_MY)-1, "", my_locale_ab_day_names_ms_MY, NULL }; +MY_LOCALE my_locale_ms_MY= + { "ms_MY", "Malay - Malaysia", "true", &my_locale_typelib_month_names_ms_MY, &my_locale_typelib_ab_month_names_ms_MY, &my_locale_typelib_day_names_ms_MY, &my_locale_typelib_ab_day_names_ms_MY }; +/***** LOCALE END ms_MY *****/ + +/***** LOCALE BEGIN nb_NO: Norwegian(Bokml) - Norway *****/ +static const char *my_locale_month_names_nb_NO[13] = + {"januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember", NullS }; +static const char *my_locale_ab_month_names_nb_NO[13] = + {"jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","des", NullS }; +static const char *my_locale_day_names_nb_NO[8] = + {"mandag","tirsdag","onsdag","torsdag","fredag","lørdag","søndag", NullS }; +static const char *my_locale_ab_day_names_nb_NO[8] = + {"man","tir","ons","tor","fre","lør","søn", NullS }; +static TYPELIB my_locale_typelib_month_names_nb_NO = + { array_elements(my_locale_month_names_nb_NO)-1, "", my_locale_month_names_nb_NO, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_nb_NO = + { array_elements(my_locale_ab_month_names_nb_NO)-1, "", my_locale_ab_month_names_nb_NO, NULL }; +static TYPELIB my_locale_typelib_day_names_nb_NO = + { array_elements(my_locale_day_names_nb_NO)-1, "", my_locale_day_names_nb_NO, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_nb_NO = + { array_elements(my_locale_ab_day_names_nb_NO)-1, "", my_locale_ab_day_names_nb_NO, NULL }; +MY_LOCALE my_locale_nb_NO= + { "nb_NO", "Norwegian(Bokml) - Norway", "false", &my_locale_typelib_month_names_nb_NO, &my_locale_typelib_ab_month_names_nb_NO, &my_locale_typelib_day_names_nb_NO, &my_locale_typelib_ab_day_names_nb_NO }; +/***** LOCALE END nb_NO *****/ + +/***** LOCALE BEGIN nl_NL: Dutch - The Netherlands *****/ +static const char *my_locale_month_names_nl_NL[13] = + {"januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december", NullS }; +static const char *my_locale_ab_month_names_nl_NL[13] = + {"jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec", NullS }; +static const char *my_locale_day_names_nl_NL[8] = + {"maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag","zondag", NullS }; +static const char *my_locale_ab_day_names_nl_NL[8] = + {"ma","di","wo","do","vr","za","zo", NullS }; +static TYPELIB my_locale_typelib_month_names_nl_NL = + { array_elements(my_locale_month_names_nl_NL)-1, "", my_locale_month_names_nl_NL, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_nl_NL = + { array_elements(my_locale_ab_month_names_nl_NL)-1, "", my_locale_ab_month_names_nl_NL, NULL }; +static TYPELIB my_locale_typelib_day_names_nl_NL = + { array_elements(my_locale_day_names_nl_NL)-1, "", my_locale_day_names_nl_NL, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_nl_NL = + { array_elements(my_locale_ab_day_names_nl_NL)-1, "", my_locale_ab_day_names_nl_NL, NULL }; +MY_LOCALE my_locale_nl_NL= + { "nl_NL", "Dutch - The Netherlands", "true", &my_locale_typelib_month_names_nl_NL, &my_locale_typelib_ab_month_names_nl_NL, &my_locale_typelib_day_names_nl_NL, &my_locale_typelib_ab_day_names_nl_NL }; +/***** LOCALE END nl_NL *****/ + +/***** LOCALE BEGIN pl_PL: Polish - Poland *****/ +static const char *my_locale_month_names_pl_PL[13] = + {"styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień", NullS }; +static const char *my_locale_ab_month_names_pl_PL[13] = + {"sty","lut","mar","kwi","maj","cze","lip","sie","wrz","paź","lis","gru", NullS }; +static const char *my_locale_day_names_pl_PL[8] = + {"poniedziałek","wtorek","środa","czwartek","piątek","sobota","niedziela", NullS }; +static const char *my_locale_ab_day_names_pl_PL[8] = + {"pon","wto","śro","czw","pią","sob","nie", NullS }; +static TYPELIB my_locale_typelib_month_names_pl_PL = + { array_elements(my_locale_month_names_pl_PL)-1, "", my_locale_month_names_pl_PL, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_pl_PL = + { array_elements(my_locale_ab_month_names_pl_PL)-1, "", my_locale_ab_month_names_pl_PL, NULL }; +static TYPELIB my_locale_typelib_day_names_pl_PL = + { array_elements(my_locale_day_names_pl_PL)-1, "", my_locale_day_names_pl_PL, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_pl_PL = + { array_elements(my_locale_ab_day_names_pl_PL)-1, "", my_locale_ab_day_names_pl_PL, NULL }; +MY_LOCALE my_locale_pl_PL= + { "pl_PL", "Polish - Poland", "false", &my_locale_typelib_month_names_pl_PL, &my_locale_typelib_ab_month_names_pl_PL, &my_locale_typelib_day_names_pl_PL, &my_locale_typelib_ab_day_names_pl_PL }; +/***** LOCALE END pl_PL *****/ + +/***** LOCALE BEGIN pt_BR: Portugese - Brazil *****/ +static const char *my_locale_month_names_pt_BR[13] = + {"janeiro","fevereiro","março","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro", NullS }; +static const char *my_locale_ab_month_names_pt_BR[13] = + {"Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez", NullS }; +static const char *my_locale_day_names_pt_BR[8] = + {"segunda","terça","quarta","quinta","sexta","sábado","domingo", NullS }; +static const char *my_locale_ab_day_names_pt_BR[8] = + {"Seg","Ter","Qua","Qui","Sex","Sáb","Dom", NullS }; +static TYPELIB my_locale_typelib_month_names_pt_BR = + { array_elements(my_locale_month_names_pt_BR)-1, "", my_locale_month_names_pt_BR, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_pt_BR = + { array_elements(my_locale_ab_month_names_pt_BR)-1, "", my_locale_ab_month_names_pt_BR, NULL }; +static TYPELIB my_locale_typelib_day_names_pt_BR = + { array_elements(my_locale_day_names_pt_BR)-1, "", my_locale_day_names_pt_BR, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_pt_BR = + { array_elements(my_locale_ab_day_names_pt_BR)-1, "", my_locale_ab_day_names_pt_BR, NULL }; +MY_LOCALE my_locale_pt_BR= + { "pt_BR", "Portugese - Brazil", "false", &my_locale_typelib_month_names_pt_BR, &my_locale_typelib_ab_month_names_pt_BR, &my_locale_typelib_day_names_pt_BR, &my_locale_typelib_ab_day_names_pt_BR }; +/***** LOCALE END pt_BR *****/ + +/***** LOCALE BEGIN pt_PT: Portugese - Portugal *****/ +static const char *my_locale_month_names_pt_PT[13] = + {"Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro", NullS }; +static const char *my_locale_ab_month_names_pt_PT[13] = + {"Jan","Fev","Mar","Abr","Mai","Jun","Jul","Ago","Set","Out","Nov","Dez", NullS }; +static const char *my_locale_day_names_pt_PT[8] = + {"Segunda","Terça","Quarta","Quinta","Sexta","Sábado","Domingo", NullS }; +static const char *my_locale_ab_day_names_pt_PT[8] = + {"Seg","Ter","Qua","Qui","Sex","Sáb","Dom", NullS }; +static TYPELIB my_locale_typelib_month_names_pt_PT = + { array_elements(my_locale_month_names_pt_PT)-1, "", my_locale_month_names_pt_PT, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_pt_PT = + { array_elements(my_locale_ab_month_names_pt_PT)-1, "", my_locale_ab_month_names_pt_PT, NULL }; +static TYPELIB my_locale_typelib_day_names_pt_PT = + { array_elements(my_locale_day_names_pt_PT)-1, "", my_locale_day_names_pt_PT, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_pt_PT = + { array_elements(my_locale_ab_day_names_pt_PT)-1, "", my_locale_ab_day_names_pt_PT, NULL }; +MY_LOCALE my_locale_pt_PT= + { "pt_PT", "Portugese - Portugal", "false", &my_locale_typelib_month_names_pt_PT, &my_locale_typelib_ab_month_names_pt_PT, &my_locale_typelib_day_names_pt_PT, &my_locale_typelib_ab_day_names_pt_PT }; +/***** LOCALE END pt_PT *****/ + +/***** LOCALE BEGIN ro_RO: Romanian - Romania *****/ +static const char *my_locale_month_names_ro_RO[13] = + {"Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie", NullS }; +static const char *my_locale_ab_month_names_ro_RO[13] = + {"ian","feb","mar","apr","mai","iun","iul","aug","sep","oct","nov","dec", NullS }; +static const char *my_locale_day_names_ro_RO[8] = + {"Luni","Marţi","Miercuri","Joi","Vineri","SîmbĂtĂ","DuminicĂ", NullS }; +static const char *my_locale_ab_day_names_ro_RO[8] = + {"Lu","Ma","Mi","Jo","Vi","Sî","Du", NullS }; +static TYPELIB my_locale_typelib_month_names_ro_RO = + { array_elements(my_locale_month_names_ro_RO)-1, "", my_locale_month_names_ro_RO, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ro_RO = + { array_elements(my_locale_ab_month_names_ro_RO)-1, "", my_locale_ab_month_names_ro_RO, NULL }; +static TYPELIB my_locale_typelib_day_names_ro_RO = + { array_elements(my_locale_day_names_ro_RO)-1, "", my_locale_day_names_ro_RO, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ro_RO = + { array_elements(my_locale_ab_day_names_ro_RO)-1, "", my_locale_ab_day_names_ro_RO, NULL }; +MY_LOCALE my_locale_ro_RO= + { "ro_RO", "Romanian - Romania", "false", &my_locale_typelib_month_names_ro_RO, &my_locale_typelib_ab_month_names_ro_RO, &my_locale_typelib_day_names_ro_RO, &my_locale_typelib_ab_day_names_ro_RO }; +/***** LOCALE END ro_RO *****/ + +/***** LOCALE BEGIN ru_RU: Russian - Russia *****/ +static const char *my_locale_month_names_ru_RU[13] = + {"Января","Февраля","Марта","Апреля","Мая","Июня","Июля","Августа","Сентября","Октября","Ноября","Декабря", NullS }; +static const char *my_locale_ab_month_names_ru_RU[13] = + {"Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек", NullS }; +static const char *my_locale_day_names_ru_RU[8] = + {"Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье", NullS }; +static const char *my_locale_ab_day_names_ru_RU[8] = + {"Пнд","Втр","Срд","Чтв","Птн","Сбт","Вск", NullS }; +static TYPELIB my_locale_typelib_month_names_ru_RU = + { array_elements(my_locale_month_names_ru_RU)-1, "", my_locale_month_names_ru_RU, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ru_RU = + { array_elements(my_locale_ab_month_names_ru_RU)-1, "", my_locale_ab_month_names_ru_RU, NULL }; +static TYPELIB my_locale_typelib_day_names_ru_RU = + { array_elements(my_locale_day_names_ru_RU)-1, "", my_locale_day_names_ru_RU, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ru_RU = + { array_elements(my_locale_ab_day_names_ru_RU)-1, "", my_locale_ab_day_names_ru_RU, NULL }; +MY_LOCALE my_locale_ru_RU= + { "ru_RU", "Russian - Russia", "false", &my_locale_typelib_month_names_ru_RU, &my_locale_typelib_ab_month_names_ru_RU, &my_locale_typelib_day_names_ru_RU, &my_locale_typelib_ab_day_names_ru_RU }; +/***** LOCALE END ru_RU *****/ + +/***** LOCALE BEGIN ru_UA: Russian - Ukraine *****/ +static const char *my_locale_month_names_ru_UA[13] = + {"Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь", NullS }; +static const char *my_locale_ab_month_names_ru_UA[13] = + {"Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек", NullS }; +static const char *my_locale_day_names_ru_UA[8] = + {"Понедельник","Вторник","Среда","Четверг","Пятница","Суббота","Воскресенье", NullS }; +static const char *my_locale_ab_day_names_ru_UA[8] = + {"Пнд","Вто","Срд","Чтв","Птн","Суб","Вск", NullS }; +static TYPELIB my_locale_typelib_month_names_ru_UA = + { array_elements(my_locale_month_names_ru_UA)-1, "", my_locale_month_names_ru_UA, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ru_UA = + { array_elements(my_locale_ab_month_names_ru_UA)-1, "", my_locale_ab_month_names_ru_UA, NULL }; +static TYPELIB my_locale_typelib_day_names_ru_UA = + { array_elements(my_locale_day_names_ru_UA)-1, "", my_locale_day_names_ru_UA, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ru_UA = + { array_elements(my_locale_ab_day_names_ru_UA)-1, "", my_locale_ab_day_names_ru_UA, NULL }; +MY_LOCALE my_locale_ru_UA= + { "ru_UA", "Russian - Ukraine", "false", &my_locale_typelib_month_names_ru_UA, &my_locale_typelib_ab_month_names_ru_UA, &my_locale_typelib_day_names_ru_UA, &my_locale_typelib_ab_day_names_ru_UA }; +/***** LOCALE END ru_UA *****/ + +/***** LOCALE BEGIN sk_SK: Slovak - Slovakia *****/ +static const char *my_locale_month_names_sk_SK[13] = + {"január","február","marec","apríl","máj","jún","júl","august","september","október","november","december", NullS }; +static const char *my_locale_ab_month_names_sk_SK[13] = + {"jan","feb","mar","apr","máj","jún","júl","aug","sep","okt","nov","dec", NullS }; +static const char *my_locale_day_names_sk_SK[8] = + {"Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota","Nedeľa", NullS }; +static const char *my_locale_ab_day_names_sk_SK[8] = + {"Po","Ut","St","Št","Pi","So","Ne", NullS }; +static TYPELIB my_locale_typelib_month_names_sk_SK = + { array_elements(my_locale_month_names_sk_SK)-1, "", my_locale_month_names_sk_SK, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_sk_SK = + { array_elements(my_locale_ab_month_names_sk_SK)-1, "", my_locale_ab_month_names_sk_SK, NULL }; +static TYPELIB my_locale_typelib_day_names_sk_SK = + { array_elements(my_locale_day_names_sk_SK)-1, "", my_locale_day_names_sk_SK, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_sk_SK = + { array_elements(my_locale_ab_day_names_sk_SK)-1, "", my_locale_ab_day_names_sk_SK, NULL }; +MY_LOCALE my_locale_sk_SK= + { "sk_SK", "Slovak - Slovakia", "false", &my_locale_typelib_month_names_sk_SK, &my_locale_typelib_ab_month_names_sk_SK, &my_locale_typelib_day_names_sk_SK, &my_locale_typelib_ab_day_names_sk_SK }; +/***** LOCALE END sk_SK *****/ + +/***** LOCALE BEGIN sl_SI: Slovenian - Slovenia *****/ +static const char *my_locale_month_names_sl_SI[13] = + {"januar","februar","marec","april","maj","junij","julij","avgust","september","oktober","november","december", NullS }; +static const char *my_locale_ab_month_names_sl_SI[13] = + {"jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec", NullS }; +static const char *my_locale_day_names_sl_SI[8] = + {"ponedeljek","torek","sreda","četrtek","petek","sobota","nedelja", NullS }; +static const char *my_locale_ab_day_names_sl_SI[8] = + {"pon","tor","sre","čet","pet","sob","ned", NullS }; +static TYPELIB my_locale_typelib_month_names_sl_SI = + { array_elements(my_locale_month_names_sl_SI)-1, "", my_locale_month_names_sl_SI, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_sl_SI = + { array_elements(my_locale_ab_month_names_sl_SI)-1, "", my_locale_ab_month_names_sl_SI, NULL }; +static TYPELIB my_locale_typelib_day_names_sl_SI = + { array_elements(my_locale_day_names_sl_SI)-1, "", my_locale_day_names_sl_SI, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_sl_SI = + { array_elements(my_locale_ab_day_names_sl_SI)-1, "", my_locale_ab_day_names_sl_SI, NULL }; +MY_LOCALE my_locale_sl_SI= + { "sl_SI", "Slovenian - Slovenia", "false", &my_locale_typelib_month_names_sl_SI, &my_locale_typelib_ab_month_names_sl_SI, &my_locale_typelib_day_names_sl_SI, &my_locale_typelib_ab_day_names_sl_SI }; +/***** LOCALE END sl_SI *****/ + +/***** LOCALE BEGIN sq_AL: Albanian - Albania *****/ +static const char *my_locale_month_names_sq_AL[13] = + {"janar","shkurt","mars","prill","maj","qershor","korrik","gusht","shtator","tetor","nëntor","dhjetor", NullS }; +static const char *my_locale_ab_month_names_sq_AL[13] = + {"Jan","Shk","Mar","Pri","Maj","Qer","Kor","Gsh","Sht","Tet","Nën","Dhj", NullS }; +static const char *my_locale_day_names_sq_AL[8] = + {"e hënë ","e martë ","e mërkurë ","e enjte ","e premte ","e shtunë ","e diel ", NullS }; +static const char *my_locale_ab_day_names_sq_AL[8] = + {"Hën ","Mar ","Mër ","Enj ","Pre ","Sht ","Die ", NullS }; +static TYPELIB my_locale_typelib_month_names_sq_AL = + { array_elements(my_locale_month_names_sq_AL)-1, "", my_locale_month_names_sq_AL, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_sq_AL = + { array_elements(my_locale_ab_month_names_sq_AL)-1, "", my_locale_ab_month_names_sq_AL, NULL }; +static TYPELIB my_locale_typelib_day_names_sq_AL = + { array_elements(my_locale_day_names_sq_AL)-1, "", my_locale_day_names_sq_AL, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_sq_AL = + { array_elements(my_locale_ab_day_names_sq_AL)-1, "", my_locale_ab_day_names_sq_AL, NULL }; +MY_LOCALE my_locale_sq_AL= + { "sq_AL", "Albanian - Albania", "false", &my_locale_typelib_month_names_sq_AL, &my_locale_typelib_ab_month_names_sq_AL, &my_locale_typelib_day_names_sq_AL, &my_locale_typelib_ab_day_names_sq_AL }; +/***** LOCALE END sq_AL *****/ + +/***** LOCALE BEGIN sr_YU: Servian - Yugoslavia *****/ +static const char *my_locale_month_names_sr_YU[13] = + {"januar","februar","mart","april","maj","juni","juli","avgust","septembar","oktobar","novembar","decembar", NullS }; +static const char *my_locale_ab_month_names_sr_YU[13] = + {"jan","feb","mar","apr","maj","jun","jul","avg","sep","okt","nov","dec", NullS }; +static const char *my_locale_day_names_sr_YU[8] = + {"ponedeljak","utorak","sreda","četvrtak","petak","subota","nedelja", NullS }; +static const char *my_locale_ab_day_names_sr_YU[8] = + {"pon","uto","sre","čet","pet","sub","ned", NullS }; +static TYPELIB my_locale_typelib_month_names_sr_YU = + { array_elements(my_locale_month_names_sr_YU)-1, "", my_locale_month_names_sr_YU, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_sr_YU = + { array_elements(my_locale_ab_month_names_sr_YU)-1, "", my_locale_ab_month_names_sr_YU, NULL }; +static TYPELIB my_locale_typelib_day_names_sr_YU = + { array_elements(my_locale_day_names_sr_YU)-1, "", my_locale_day_names_sr_YU, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_sr_YU = + { array_elements(my_locale_ab_day_names_sr_YU)-1, "", my_locale_ab_day_names_sr_YU, NULL }; +MY_LOCALE my_locale_sr_YU= + { "sr_YU", "Servian - Yugoslavia", "false", &my_locale_typelib_month_names_sr_YU, &my_locale_typelib_ab_month_names_sr_YU, &my_locale_typelib_day_names_sr_YU, &my_locale_typelib_ab_day_names_sr_YU }; +/***** LOCALE END sr_YU *****/ + +/***** LOCALE BEGIN sv_SE: Swedish - Sweden *****/ +static const char *my_locale_month_names_sv_SE[13] = + {"januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december", NullS }; +static const char *my_locale_ab_month_names_sv_SE[13] = + {"jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec", NullS }; +static const char *my_locale_day_names_sv_SE[8] = + {"måndag","tisdag","onsdag","torsdag","fredag","lördag","söndag", NullS }; +static const char *my_locale_ab_day_names_sv_SE[8] = + {"mån","tis","ons","tor","fre","lör","sön", NullS }; +static TYPELIB my_locale_typelib_month_names_sv_SE = + { array_elements(my_locale_month_names_sv_SE)-1, "", my_locale_month_names_sv_SE, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_sv_SE = + { array_elements(my_locale_ab_month_names_sv_SE)-1, "", my_locale_ab_month_names_sv_SE, NULL }; +static TYPELIB my_locale_typelib_day_names_sv_SE = + { array_elements(my_locale_day_names_sv_SE)-1, "", my_locale_day_names_sv_SE, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_sv_SE = + { array_elements(my_locale_ab_day_names_sv_SE)-1, "", my_locale_ab_day_names_sv_SE, NULL }; +MY_LOCALE my_locale_sv_SE= + { "sv_SE", "Swedish - Sweden", "false", &my_locale_typelib_month_names_sv_SE, &my_locale_typelib_ab_month_names_sv_SE, &my_locale_typelib_day_names_sv_SE, &my_locale_typelib_ab_day_names_sv_SE }; +/***** LOCALE END sv_SE *****/ + +/***** LOCALE BEGIN ta_IN: Tamil - India *****/ +static const char *my_locale_month_names_ta_IN[13] = + {"ஜனவரி","பெப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்r", NullS }; +static const char *my_locale_ab_month_names_ta_IN[13] = + {"ஜனவரி","பெப்ரவரி","மார்ச்","ஏப்ரல்","மே","ஜூன்","ஜூலை","ஆகஸ்ட்","செப்டம்பர்","அக்டோபர்","நவம்பர்","டிசம்பர்r", NullS }; +static const char *my_locale_day_names_ta_IN[8] = + {"திங்கள்","செவ்வாய்","புதன்","வியாழன்","வெள்ளி","சனி","ஞாயிறு", NullS }; +static const char *my_locale_ab_day_names_ta_IN[8] = + {"த","ச","ப","வ","வ","ச","ஞ", NullS }; +static TYPELIB my_locale_typelib_month_names_ta_IN = + { array_elements(my_locale_month_names_ta_IN)-1, "", my_locale_month_names_ta_IN, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ta_IN = + { array_elements(my_locale_ab_month_names_ta_IN)-1, "", my_locale_ab_month_names_ta_IN, NULL }; +static TYPELIB my_locale_typelib_day_names_ta_IN = + { array_elements(my_locale_day_names_ta_IN)-1, "", my_locale_day_names_ta_IN, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ta_IN = + { array_elements(my_locale_ab_day_names_ta_IN)-1, "", my_locale_ab_day_names_ta_IN, NULL }; +MY_LOCALE my_locale_ta_IN= + { "ta_IN", "Tamil - India", "false", &my_locale_typelib_month_names_ta_IN, &my_locale_typelib_ab_month_names_ta_IN, &my_locale_typelib_day_names_ta_IN, &my_locale_typelib_ab_day_names_ta_IN }; +/***** LOCALE END ta_IN *****/ + +/***** LOCALE BEGIN te_IN: Telugu - India *****/ +static const char *my_locale_month_names_te_IN[13] = + {"జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్", NullS }; +static const char *my_locale_ab_month_names_te_IN[13] = + {"జనవరి","ఫిబ్రవరి","మార్చి","ఏప్రిల్","మే","జూన్","జూలై","ఆగస్టు","సెప్టెంబర్","అక్టోబర్","నవంబర్","డిసెంబర్", NullS }; +static const char *my_locale_day_names_te_IN[8] = + {"సోమవారం","మంగళవారం","బుధవారం","గురువారం","శుక్రవారం","శనివారం","ఆదివారం", NullS }; +static const char *my_locale_ab_day_names_te_IN[8] = + {"సోమ","మంగళ","బుధ","గురు","శుక్ర","శని","ఆది", NullS }; +static TYPELIB my_locale_typelib_month_names_te_IN = + { array_elements(my_locale_month_names_te_IN)-1, "", my_locale_month_names_te_IN, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_te_IN = + { array_elements(my_locale_ab_month_names_te_IN)-1, "", my_locale_ab_month_names_te_IN, NULL }; +static TYPELIB my_locale_typelib_day_names_te_IN = + { array_elements(my_locale_day_names_te_IN)-1, "", my_locale_day_names_te_IN, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_te_IN = + { array_elements(my_locale_ab_day_names_te_IN)-1, "", my_locale_ab_day_names_te_IN, NULL }; +MY_LOCALE my_locale_te_IN= + { "te_IN", "Telugu - India", "false", &my_locale_typelib_month_names_te_IN, &my_locale_typelib_ab_month_names_te_IN, &my_locale_typelib_day_names_te_IN, &my_locale_typelib_ab_day_names_te_IN }; +/***** LOCALE END te_IN *****/ + +/***** LOCALE BEGIN th_TH: Thai - Thailand *****/ +static const char *my_locale_month_names_th_TH[13] = + {"มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม", NullS }; +static const char *my_locale_ab_month_names_th_TH[13] = + {"ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค.", NullS }; +static const char *my_locale_day_names_th_TH[8] = + {"จันทร์","อังคาร","พุธ","พฤหัสบดี","ศุกร์","เสาร์","อาทิตย์", NullS }; +static const char *my_locale_ab_day_names_th_TH[8] = + {"จ.","อ.","พ.","พฤ.","ศ.","ส.","อา.", NullS }; +static TYPELIB my_locale_typelib_month_names_th_TH = + { array_elements(my_locale_month_names_th_TH)-1, "", my_locale_month_names_th_TH, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_th_TH = + { array_elements(my_locale_ab_month_names_th_TH)-1, "", my_locale_ab_month_names_th_TH, NULL }; +static TYPELIB my_locale_typelib_day_names_th_TH = + { array_elements(my_locale_day_names_th_TH)-1, "", my_locale_day_names_th_TH, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_th_TH = + { array_elements(my_locale_ab_day_names_th_TH)-1, "", my_locale_ab_day_names_th_TH, NULL }; +MY_LOCALE my_locale_th_TH= + { "th_TH", "Thai - Thailand", "false", &my_locale_typelib_month_names_th_TH, &my_locale_typelib_ab_month_names_th_TH, &my_locale_typelib_day_names_th_TH, &my_locale_typelib_ab_day_names_th_TH }; +/***** LOCALE END th_TH *****/ + +/***** LOCALE BEGIN tr_TR: Turkish - Turkey *****/ +static const char *my_locale_month_names_tr_TR[13] = + {"Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık", NullS }; +static const char *my_locale_ab_month_names_tr_TR[13] = + {"Oca","Şub","Mar","Nis","May","Haz","Tem","Ağu","Eyl","Eki","Kas","Ara", NullS }; +static const char *my_locale_day_names_tr_TR[8] = + {"Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi","Pazar", NullS }; +static const char *my_locale_ab_day_names_tr_TR[8] = + {"Pzt","Sal","Çrş","Prş","Cum","Cts","Paz", NullS }; +static TYPELIB my_locale_typelib_month_names_tr_TR = + { array_elements(my_locale_month_names_tr_TR)-1, "", my_locale_month_names_tr_TR, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_tr_TR = + { array_elements(my_locale_ab_month_names_tr_TR)-1, "", my_locale_ab_month_names_tr_TR, NULL }; +static TYPELIB my_locale_typelib_day_names_tr_TR = + { array_elements(my_locale_day_names_tr_TR)-1, "", my_locale_day_names_tr_TR, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_tr_TR = + { array_elements(my_locale_ab_day_names_tr_TR)-1, "", my_locale_ab_day_names_tr_TR, NULL }; +MY_LOCALE my_locale_tr_TR= + { "tr_TR", "Turkish - Turkey", "false", &my_locale_typelib_month_names_tr_TR, &my_locale_typelib_ab_month_names_tr_TR, &my_locale_typelib_day_names_tr_TR, &my_locale_typelib_ab_day_names_tr_TR }; +/***** LOCALE END tr_TR *****/ + +/***** LOCALE BEGIN uk_UA: Ukrainian - Ukraine *****/ +static const char *my_locale_month_names_uk_UA[13] = + {"Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень", NullS }; +static const char *my_locale_ab_month_names_uk_UA[13] = + {"Січ","Лют","Бер","Кві","Тра","Чер","Лип","Сер","Вер","Жов","Лис","Гру", NullS }; +static const char *my_locale_day_names_uk_UA[8] = + {"Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота","Неділя", NullS }; +static const char *my_locale_ab_day_names_uk_UA[8] = + {"Пнд","Втр","Срд","Чтв","Птн","Сбт","Ндл", NullS }; +static TYPELIB my_locale_typelib_month_names_uk_UA = + { array_elements(my_locale_month_names_uk_UA)-1, "", my_locale_month_names_uk_UA, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_uk_UA = + { array_elements(my_locale_ab_month_names_uk_UA)-1, "", my_locale_ab_month_names_uk_UA, NULL }; +static TYPELIB my_locale_typelib_day_names_uk_UA = + { array_elements(my_locale_day_names_uk_UA)-1, "", my_locale_day_names_uk_UA, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_uk_UA = + { array_elements(my_locale_ab_day_names_uk_UA)-1, "", my_locale_ab_day_names_uk_UA, NULL }; +MY_LOCALE my_locale_uk_UA= + { "uk_UA", "Ukrainian - Ukraine", "false", &my_locale_typelib_month_names_uk_UA, &my_locale_typelib_ab_month_names_uk_UA, &my_locale_typelib_day_names_uk_UA, &my_locale_typelib_ab_day_names_uk_UA }; +/***** LOCALE END uk_UA *****/ + +/***** LOCALE BEGIN ur_PK: Urdu - Pakistan *****/ +static const char *my_locale_month_names_ur_PK[13] = + {"جنوري","فروري","مارچ","اپريل","مٓی","جون","جولاي","اگست","ستمبر","اكتوبر","نومبر","دسمبر", NullS }; +static const char *my_locale_ab_month_names_ur_PK[13] = + {"جنوري","فروري","مارچ","اپريل","مٓی","جون","جولاي","اگست","ستمبر","اكتوبر","نومبر","دسمبر", NullS }; +static const char *my_locale_day_names_ur_PK[8] = + {"پير","منگل","بدھ","جمعرات","جمعه","هفته","اتوار", NullS }; +static const char *my_locale_ab_day_names_ur_PK[8] = + {"پير","منگل","بدھ","جمعرات","جمعه","هفته","اتوار", NullS }; +static TYPELIB my_locale_typelib_month_names_ur_PK = + { array_elements(my_locale_month_names_ur_PK)-1, "", my_locale_month_names_ur_PK, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_ur_PK = + { array_elements(my_locale_ab_month_names_ur_PK)-1, "", my_locale_ab_month_names_ur_PK, NULL }; +static TYPELIB my_locale_typelib_day_names_ur_PK = + { array_elements(my_locale_day_names_ur_PK)-1, "", my_locale_day_names_ur_PK, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_ur_PK = + { array_elements(my_locale_ab_day_names_ur_PK)-1, "", my_locale_ab_day_names_ur_PK, NULL }; +MY_LOCALE my_locale_ur_PK= + { "ur_PK", "Urdu - Pakistan", "false", &my_locale_typelib_month_names_ur_PK, &my_locale_typelib_ab_month_names_ur_PK, &my_locale_typelib_day_names_ur_PK, &my_locale_typelib_ab_day_names_ur_PK }; +/***** LOCALE END ur_PK *****/ + +/***** LOCALE BEGIN vi_VN: Vietnamese - Vietnam *****/ +static const char *my_locale_month_names_vi_VN[13] = + {"Tháng một","Tháng hai","Tháng ba","Tháng tư","Tháng năm","Tháng sáu","Tháng bảy","Tháng tám","Tháng chín","Tháng mười","Tháng mười một","Tháng mười hai", NullS }; +static const char *my_locale_ab_month_names_vi_VN[13] = + {"Thg 1","Thg 2","Thg 3","Thg 4","Thg 5","Thg 6","Thg 7","Thg 8","Thg 9","Thg 10","Thg 11","Thg 12", NullS }; +static const char *my_locale_day_names_vi_VN[8] = + {"Thứ hai ","Thứ ba ","Thứ tư ","Thứ năm ","Thứ sáu ","Thứ bảy ","Chủ nhật ", NullS }; +static const char *my_locale_ab_day_names_vi_VN[8] = + {"Th 2 ","Th 3 ","Th 4 ","Th 5 ","Th 6 ","Th 7 ","CN ", NullS }; +static TYPELIB my_locale_typelib_month_names_vi_VN = + { array_elements(my_locale_month_names_vi_VN)-1, "", my_locale_month_names_vi_VN, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_vi_VN = + { array_elements(my_locale_ab_month_names_vi_VN)-1, "", my_locale_ab_month_names_vi_VN, NULL }; +static TYPELIB my_locale_typelib_day_names_vi_VN = + { array_elements(my_locale_day_names_vi_VN)-1, "", my_locale_day_names_vi_VN, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_vi_VN = + { array_elements(my_locale_ab_day_names_vi_VN)-1, "", my_locale_ab_day_names_vi_VN, NULL }; +MY_LOCALE my_locale_vi_VN= + { "vi_VN", "Vietnamese - Vietnam", "false", &my_locale_typelib_month_names_vi_VN, &my_locale_typelib_ab_month_names_vi_VN, &my_locale_typelib_day_names_vi_VN, &my_locale_typelib_ab_day_names_vi_VN }; +/***** LOCALE END vi_VN *****/ + +/***** LOCALE BEGIN zh_CN: Chinese - Peoples Republic of China *****/ +static const char *my_locale_month_names_zh_CN[13] = + {"一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月", NullS }; +static const char *my_locale_ab_month_names_zh_CN[13] = + {" 1月"," 2月"," 3月"," 4月"," 5月"," 6月"," 7月"," 8月"," 9月","10月","11月","12月", NullS }; +static const char *my_locale_day_names_zh_CN[8] = + {"星期一","星期二","星期三","星期四","星期五","星期六","星期日", NullS }; +static const char *my_locale_ab_day_names_zh_CN[8] = + {"一","二","三","四","五","六","日", NullS }; +static TYPELIB my_locale_typelib_month_names_zh_CN = + { array_elements(my_locale_month_names_zh_CN)-1, "", my_locale_month_names_zh_CN, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_zh_CN = + { array_elements(my_locale_ab_month_names_zh_CN)-1, "", my_locale_ab_month_names_zh_CN, NULL }; +static TYPELIB my_locale_typelib_day_names_zh_CN = + { array_elements(my_locale_day_names_zh_CN)-1, "", my_locale_day_names_zh_CN, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_zh_CN = + { array_elements(my_locale_ab_day_names_zh_CN)-1, "", my_locale_ab_day_names_zh_CN, NULL }; +MY_LOCALE my_locale_zh_CN= + { "zh_CN", "Chinese - Peoples Republic of China", "false", &my_locale_typelib_month_names_zh_CN, &my_locale_typelib_ab_month_names_zh_CN, &my_locale_typelib_day_names_zh_CN, &my_locale_typelib_ab_day_names_zh_CN }; +/***** LOCALE END zh_CN *****/ + +/***** LOCALE BEGIN zh_TW: Chinese - Taiwan *****/ +static const char *my_locale_month_names_zh_TW[13] = + {"一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月", NullS }; +static const char *my_locale_ab_month_names_zh_TW[13] = + {" 1月"," 2月"," 3月"," 4月"," 5月"," 6月"," 7月"," 8月"," 9月","10月","11月","12月", NullS }; +static const char *my_locale_day_names_zh_TW[8] = + {"週一","週二","週三","週四","週五","週六","週日", NullS }; +static const char *my_locale_ab_day_names_zh_TW[8] = + {"一","二","三","四","五","六","日", NullS }; +static TYPELIB my_locale_typelib_month_names_zh_TW = + { array_elements(my_locale_month_names_zh_TW)-1, "", my_locale_month_names_zh_TW, NULL }; +static TYPELIB my_locale_typelib_ab_month_names_zh_TW = + { array_elements(my_locale_ab_month_names_zh_TW)-1, "", my_locale_ab_month_names_zh_TW, NULL }; +static TYPELIB my_locale_typelib_day_names_zh_TW = + { array_elements(my_locale_day_names_zh_TW)-1, "", my_locale_day_names_zh_TW, NULL }; +static TYPELIB my_locale_typelib_ab_day_names_zh_TW = + { array_elements(my_locale_ab_day_names_zh_TW)-1, "", my_locale_ab_day_names_zh_TW, NULL }; +MY_LOCALE my_locale_zh_TW= + { "zh_TW", "Chinese - Taiwan", "false", &my_locale_typelib_month_names_zh_TW, &my_locale_typelib_ab_month_names_zh_TW, &my_locale_typelib_day_names_zh_TW, &my_locale_typelib_ab_day_names_zh_TW }; +/***** LOCALE END zh_TW *****/ + +/***** LOCALE BEGIN ar_DZ: Arabic - Algeria *****/ +MY_LOCALE my_locale_ar_DZ= + { "ar_DZ", "Arabic - Algeria", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_DZ *****/ + +/***** LOCALE BEGIN ar_EG: Arabic - Egypt *****/ +MY_LOCALE my_locale_ar_EG= + { "ar_EG", "Arabic - Egypt", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_EG *****/ + +/***** LOCALE BEGIN ar_IN: Arabic - Iran *****/ +MY_LOCALE my_locale_ar_IN= + { "ar_IN", "Arabic - Iran", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_IN *****/ + +/***** LOCALE BEGIN ar_IQ: Arabic - Iraq *****/ +MY_LOCALE my_locale_ar_IQ= + { "ar_IQ", "Arabic - Iraq", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_IQ *****/ + +/***** LOCALE BEGIN ar_KW: Arabic - Kuwait *****/ +MY_LOCALE my_locale_ar_KW= + { "ar_KW", "Arabic - Kuwait", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_KW *****/ + +/***** LOCALE BEGIN ar_LB: Arabic - Lebanon *****/ +MY_LOCALE my_locale_ar_LB= + { "ar_LB", "Arabic - Lebanon", "false", &my_locale_typelib_month_names_ar_JO, &my_locale_typelib_ab_month_names_ar_JO, &my_locale_typelib_day_names_ar_JO, &my_locale_typelib_ab_day_names_ar_JO }; +/***** LOCALE END ar_LB *****/ + +/***** LOCALE BEGIN ar_LY: Arabic - Libya *****/ +MY_LOCALE my_locale_ar_LY= + { "ar_LY", "Arabic - Libya", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_LY *****/ + +/***** LOCALE BEGIN ar_MA: Arabic - Morocco *****/ +MY_LOCALE my_locale_ar_MA= + { "ar_MA", "Arabic - Morocco", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_MA *****/ + +/***** LOCALE BEGIN ar_OM: Arabic - Oman *****/ +MY_LOCALE my_locale_ar_OM= + { "ar_OM", "Arabic - Oman", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_OM *****/ + +/***** LOCALE BEGIN ar_QA: Arabic - Qatar *****/ +MY_LOCALE my_locale_ar_QA= + { "ar_QA", "Arabic - Qatar", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_QA *****/ + +/***** LOCALE BEGIN ar_SD: Arabic - Sudan *****/ +MY_LOCALE my_locale_ar_SD= + { "ar_SD", "Arabic - Sudan", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_SD *****/ + +/***** LOCALE BEGIN ar_TN: Arabic - Tunisia *****/ +MY_LOCALE my_locale_ar_TN= + { "ar_TN", "Arabic - Tunisia", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_TN *****/ + +/***** LOCALE BEGIN ar_YE: Arabic - Yemen *****/ +MY_LOCALE my_locale_ar_YE= + { "ar_YE", "Arabic - Yemen", "false", &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH }; +/***** LOCALE END ar_YE *****/ + +/***** LOCALE BEGIN de_BE: German - Belgium *****/ +MY_LOCALE my_locale_de_BE= + { "de_BE", "German - Belgium", "false", &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE }; +/***** LOCALE END de_BE *****/ + +/***** LOCALE BEGIN de_CH: German - Switzerland *****/ +MY_LOCALE my_locale_de_CH= + { "de_CH", "German - Switzerland", "false", &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE }; +/***** LOCALE END de_CH *****/ + +/***** LOCALE BEGIN de_LU: German - Luxembourg *****/ +MY_LOCALE my_locale_de_LU= + { "de_LU", "German - Luxembourg", "false", &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE }; +/***** LOCALE END de_LU *****/ + +/***** LOCALE BEGIN en_AU: English - Australia *****/ +MY_LOCALE my_locale_en_AU= + { "en_AU", "English - Australia", "true", &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US }; +/***** LOCALE END en_AU *****/ + +/***** LOCALE BEGIN en_CA: English - Canada *****/ +MY_LOCALE my_locale_en_CA= + { "en_CA", "English - Canada", "true", &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US }; +/***** LOCALE END en_CA *****/ + +/***** LOCALE BEGIN en_GB: English - United Kingdom *****/ +MY_LOCALE my_locale_en_GB= + { "en_GB", "English - United Kingdom", "true", &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US }; +/***** LOCALE END en_GB *****/ + +/***** LOCALE BEGIN en_IN: English - India *****/ +MY_LOCALE my_locale_en_IN= + { "en_IN", "English - India", "true", &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US }; +/***** LOCALE END en_IN *****/ + +/***** LOCALE BEGIN en_NZ: English - New Zealand *****/ +MY_LOCALE my_locale_en_NZ= + { "en_NZ", "English - New Zealand", "true", &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US }; +/***** LOCALE END en_NZ *****/ + +/***** LOCALE BEGIN en_PH: English - Philippines *****/ +MY_LOCALE my_locale_en_PH= + { "en_PH", "English - Philippines", "true", &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US }; +/***** LOCALE END en_PH *****/ + +/***** LOCALE BEGIN en_ZA: English - South Africa *****/ +MY_LOCALE my_locale_en_ZA= + { "en_ZA", "English - South Africa", "true", &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US }; +/***** LOCALE END en_ZA *****/ + +/***** LOCALE BEGIN en_ZW: English - Zimbabwe *****/ +MY_LOCALE my_locale_en_ZW= + { "en_ZW", "English - Zimbabwe", "true", &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US }; +/***** LOCALE END en_ZW *****/ + +/***** LOCALE BEGIN es_AR: Spanish - Argentina *****/ +MY_LOCALE my_locale_es_AR= + { "es_AR", "Spanish - Argentina", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_AR *****/ + +/***** LOCALE BEGIN es_BO: Spanish - Bolivia *****/ +MY_LOCALE my_locale_es_BO= + { "es_BO", "Spanish - Bolivia", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_BO *****/ + +/***** LOCALE BEGIN es_CL: Spanish - Chile *****/ +MY_LOCALE my_locale_es_CL= + { "es_CL", "Spanish - Chile", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_CL *****/ + +/***** LOCALE BEGIN es_CO: Spanish - Columbia *****/ +MY_LOCALE my_locale_es_CO= + { "es_CO", "Spanish - Columbia", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_CO *****/ + +/***** LOCALE BEGIN es_CR: Spanish - Costa Rica *****/ +MY_LOCALE my_locale_es_CR= + { "es_CR", "Spanish - Costa Rica", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_CR *****/ + +/***** LOCALE BEGIN es_DO: Spanish - Dominican Republic *****/ +MY_LOCALE my_locale_es_DO= + { "es_DO", "Spanish - Dominican Republic", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_DO *****/ + +/***** LOCALE BEGIN es_EC: Spanish - Ecuador *****/ +MY_LOCALE my_locale_es_EC= + { "es_EC", "Spanish - Ecuador", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_EC *****/ + +/***** LOCALE BEGIN es_GT: Spanish - Guatemala *****/ +MY_LOCALE my_locale_es_GT= + { "es_GT", "Spanish - Guatemala", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_GT *****/ + +/***** LOCALE BEGIN es_HN: Spanish - Honduras *****/ +MY_LOCALE my_locale_es_HN= + { "es_HN", "Spanish - Honduras", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_HN *****/ + +/***** LOCALE BEGIN es_MX: Spanish - Mexico *****/ +MY_LOCALE my_locale_es_MX= + { "es_MX", "Spanish - Mexico", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_MX *****/ + +/***** LOCALE BEGIN es_NI: Spanish - Nicaragua *****/ +MY_LOCALE my_locale_es_NI= + { "es_NI", "Spanish - Nicaragua", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_NI *****/ + +/***** LOCALE BEGIN es_PA: Spanish - Panama *****/ +MY_LOCALE my_locale_es_PA= + { "es_PA", "Spanish - Panama", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_PA *****/ + +/***** LOCALE BEGIN es_PE: Spanish - Peru *****/ +MY_LOCALE my_locale_es_PE= + { "es_PE", "Spanish - Peru", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_PE *****/ + +/***** LOCALE BEGIN es_PR: Spanish - Puerto Rico *****/ +MY_LOCALE my_locale_es_PR= + { "es_PR", "Spanish - Puerto Rico", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_PR *****/ + +/***** LOCALE BEGIN es_PY: Spanish - Paraguay *****/ +MY_LOCALE my_locale_es_PY= + { "es_PY", "Spanish - Paraguay", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_PY *****/ + +/***** LOCALE BEGIN es_SV: Spanish - El Salvador *****/ +MY_LOCALE my_locale_es_SV= + { "es_SV", "Spanish - El Salvador", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_SV *****/ + +/***** LOCALE BEGIN es_US: Spanish - United States *****/ +MY_LOCALE my_locale_es_US= + { "es_US", "Spanish - United States", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_US *****/ + +/***** LOCALE BEGIN es_UY: Spanish - Uruguay *****/ +MY_LOCALE my_locale_es_UY= + { "es_UY", "Spanish - Uruguay", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_UY *****/ + +/***** LOCALE BEGIN es_VE: Spanish - Venezuela *****/ +MY_LOCALE my_locale_es_VE= + { "es_VE", "Spanish - Venezuela", "false", &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES }; +/***** LOCALE END es_VE *****/ + +/***** LOCALE BEGIN fr_BE: French - Belgium *****/ +MY_LOCALE my_locale_fr_BE= + { "fr_BE", "French - Belgium", "false", &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR }; +/***** LOCALE END fr_BE *****/ + +/***** LOCALE BEGIN fr_CA: French - Canada *****/ +MY_LOCALE my_locale_fr_CA= + { "fr_CA", "French - Canada", "false", &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR }; +/***** LOCALE END fr_CA *****/ + +/***** LOCALE BEGIN fr_CH: French - Switzerland *****/ +MY_LOCALE my_locale_fr_CH= + { "fr_CH", "French - Switzerland", "false", &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR }; +/***** LOCALE END fr_CH *****/ + +/***** LOCALE BEGIN fr_LU: French - Luxembourg *****/ +MY_LOCALE my_locale_fr_LU= + { "fr_LU", "French - Luxembourg", "false", &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR }; +/***** LOCALE END fr_LU *****/ + +/***** LOCALE BEGIN it_IT: Italian - Italy *****/ +MY_LOCALE my_locale_it_IT= + { "it_IT", "Italian - Italy", "false", &my_locale_typelib_month_names_it_CH, &my_locale_typelib_ab_month_names_it_CH, &my_locale_typelib_day_names_it_CH, &my_locale_typelib_ab_day_names_it_CH }; +/***** LOCALE END it_IT *****/ + +/***** LOCALE BEGIN nl_BE: Dutch - Belgium *****/ +MY_LOCALE my_locale_nl_BE= + { "nl_BE", "Dutch - Belgium", "true", &my_locale_typelib_month_names_nl_NL, &my_locale_typelib_ab_month_names_nl_NL, &my_locale_typelib_day_names_nl_NL, &my_locale_typelib_ab_day_names_nl_NL }; +/***** LOCALE END nl_BE *****/ + +/***** LOCALE BEGIN no_NO: Norwegian - Norway *****/ +MY_LOCALE my_locale_no_NO= + { "no_NO", "Norwegian - Norway", "false", &my_locale_typelib_month_names_nb_NO, &my_locale_typelib_ab_month_names_nb_NO, &my_locale_typelib_day_names_nb_NO, &my_locale_typelib_ab_day_names_nb_NO }; +/***** LOCALE END no_NO *****/ + +/***** LOCALE BEGIN sv_FI: Swedish - Finland *****/ +MY_LOCALE my_locale_sv_FI= + { "sv_FI", "Swedish - Finland", "false", &my_locale_typelib_month_names_sv_SE, &my_locale_typelib_ab_month_names_sv_SE, &my_locale_typelib_day_names_sv_SE, &my_locale_typelib_ab_day_names_sv_SE }; +/***** LOCALE END sv_FI *****/ + +/***** LOCALE BEGIN zh_HK: Chinese - Hong Kong SAR *****/ +MY_LOCALE my_locale_zh_HK= + { "zh_HK", "Chinese - Hong Kong SAR", "false", &my_locale_typelib_month_names_zh_CN, &my_locale_typelib_ab_month_names_zh_CN, &my_locale_typelib_day_names_zh_CN, &my_locale_typelib_ab_day_names_zh_CN }; +/***** LOCALE END zh_HK *****/ + +MY_LOCALE *my_locales[]= + { + &my_locale_en_US, + &my_locale_en_GB, + &my_locale_ja_JP, + &my_locale_sv_SE, + &my_locale_de_DE, + &my_locale_fr_FR, + &my_locale_ar_AE, + &my_locale_ar_BH, + &my_locale_ar_JO, + &my_locale_ar_SA, + &my_locale_ar_SY, + &my_locale_be_BY, + &my_locale_bg_BG, + &my_locale_ca_ES, + &my_locale_cs_CZ, + &my_locale_da_DK, + &my_locale_de_AT, + &my_locale_es_ES, + &my_locale_et_EE, + &my_locale_eu_ES, + &my_locale_fi_FI, + &my_locale_fo_FO, + &my_locale_gl_ES, + &my_locale_gu_IN, + &my_locale_he_IL, + &my_locale_hi_IN, + &my_locale_hr_HR, + &my_locale_hu_HU, + &my_locale_id_ID, + &my_locale_is_IS, + &my_locale_it_CH, + &my_locale_ko_KR, + &my_locale_lt_LT, + &my_locale_lv_LV, + &my_locale_mk_MK, + &my_locale_mn_MN, + &my_locale_ms_MY, + &my_locale_nb_NO, + &my_locale_nl_NL, + &my_locale_pl_PL, + &my_locale_pt_BR, + &my_locale_pt_PT, + &my_locale_ro_RO, + &my_locale_ru_RU, + &my_locale_ru_UA, + &my_locale_sk_SK, + &my_locale_sl_SI, + &my_locale_sq_AL, + &my_locale_sr_YU, + &my_locale_ta_IN, + &my_locale_te_IN, + &my_locale_th_TH, + &my_locale_tr_TR, + &my_locale_uk_UA, + &my_locale_ur_PK, + &my_locale_vi_VN, + &my_locale_zh_CN, + &my_locale_zh_TW, + &my_locale_ar_DZ, + &my_locale_ar_EG, + &my_locale_ar_IN, + &my_locale_ar_IQ, + &my_locale_ar_KW, + &my_locale_ar_LB, + &my_locale_ar_LY, + &my_locale_ar_MA, + &my_locale_ar_OM, + &my_locale_ar_QA, + &my_locale_ar_SD, + &my_locale_ar_TN, + &my_locale_ar_YE, + &my_locale_de_BE, + &my_locale_de_CH, + &my_locale_de_LU, + &my_locale_en_AU, + &my_locale_en_CA, + &my_locale_en_IN, + &my_locale_en_NZ, + &my_locale_en_PH, + &my_locale_en_ZA, + &my_locale_en_ZW, + &my_locale_es_AR, + &my_locale_es_BO, + &my_locale_es_CL, + &my_locale_es_CO, + &my_locale_es_CR, + &my_locale_es_DO, + &my_locale_es_EC, + &my_locale_es_GT, + &my_locale_es_HN, + &my_locale_es_MX, + &my_locale_es_NI, + &my_locale_es_PA, + &my_locale_es_PE, + &my_locale_es_PR, + &my_locale_es_PY, + &my_locale_es_SV, + &my_locale_es_US, + &my_locale_es_UY, + &my_locale_es_VE, + &my_locale_fr_BE, + &my_locale_fr_CA, + &my_locale_fr_CH, + &my_locale_fr_LU, + &my_locale_it_IT, + &my_locale_nl_BE, + &my_locale_no_NO, + &my_locale_sv_FI, + &my_locale_zh_HK, + NULL + }; From 99e4dee4ff36cb38735d5da032e29d46ae996da2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Jul 2006 15:11:11 +0200 Subject: [PATCH 15/20] ndb - bug#20847 fix (4.1) ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp: DROP did not do merge with right buddies --- ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp b/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp index 642ba270760..e74ac93f3f8 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp @@ -59,7 +59,7 @@ Uint32 Dbtup::allocTabDescr(const Tablerec* regTabPtr, Uint32* offset) Uint32 reference = RNIL; Uint32 allocSize = getTabDescrOffsets(regTabPtr, offset); /* ---------------------------------------------------------------- */ -/* ALWAYS ALLOCATE A MULTIPLE OF 16 BYTES */ +/* ALWAYS ALLOCATE A MULTIPLE OF 16 WORDS */ /* ---------------------------------------------------------------- */ allocSize = (((allocSize - 1) >> 4) + 1) << 4; Uint32 list = nextHigherTwoLog(allocSize - 1); /* CALCULATE WHICH LIST IT BELONGS TO */ @@ -73,7 +73,6 @@ Uint32 Dbtup::allocTabDescr(const Tablerec* regTabPtr, Uint32* offset) if (retNo >= ZTD_FREE_SIZE) { ljam(); Uint32 retRef = reference + allocSize; /* SET THE RETURN POINTER */ - retNo = itdaMergeTabDescr(retRef, retNo); /* MERGE WITH POSSIBLE RIGHT NEIGHBOURS */ freeTabDescr(retRef, retNo); /* RETURN UNUSED TD SPACE TO THE TD AREA */ } else { ljam(); @@ -102,6 +101,7 @@ Uint32 Dbtup::allocTabDescr(const Tablerec* regTabPtr, Uint32* offset) void Dbtup::freeTabDescr(Uint32 retRef, Uint32 retNo) { + retNo = itdaMergeTabDescr(retRef, retNo); /* MERGE WITH POSSIBLE RIGHT NEIGHBOURS */ while (retNo >= ZTD_FREE_SIZE) { ljam(); Uint32 list = nextHigherTwoLog(retNo); @@ -111,6 +111,7 @@ void Dbtup::freeTabDescr(Uint32 retRef, Uint32 retNo) retRef += sizeOfChunk; retNo -= sizeOfChunk; }//while + ndbassert(retNo == 0); }//Dbtup::freeTabDescr() Uint32 From 854d7c4d4f5ccc110f65dd740e304a196428b3d6 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 5 Jul 2006 17:18:59 -0700 Subject: [PATCH 16/20] Bug#8706 "temporary table with data directory option fails" myisam should not use user-specified table name when creating temporary tables and use generated connection specific real name. Test included. myisam/mi_create.c: Bug#8706 When creating a temporary table with directory override, ensure that the real filename is using the hidden temporary name otherwise multiple clients cannot have same named temporary tables without conflict. mysql-test/r/myisam.result: Bug#8706 Test for bug mysql-test/t/myisam.test: Bug#8706 Test for bug --- myisam/mi_create.c | 36 +++++++++++++++++++++++++++++------- mysql-test/r/myisam.result | 21 +++++++++++++++++++++ mysql-test/t/myisam.test | 31 +++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 7 deletions(-) diff --git a/myisam/mi_create.c b/myisam/mi_create.c index 41c965c7c80..d15cad2840f 100644 --- a/myisam/mi_create.c +++ b/myisam/mi_create.c @@ -519,9 +519,20 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if (ci->index_file_name) { - fn_format(filename, ci->index_file_name,"",MI_NAME_IEXT,4); - fn_format(linkname,name, "",MI_NAME_IEXT,4); - linkname_ptr=linkname; + if (options & HA_OPTION_TMP_TABLE) + { + char *path; + /* chop off the table name, tempory tables use generated name */ + if ((path= strrchr(ci->index_file_name, FN_LIBCHAR))) + *path= '\0'; + fn_format(filename, name, ci->index_file_name, MI_NAME_IEXT, + MY_REPLACE_DIR | MY_UNPACK_FILENAME); + } + else + fn_format(filename, ci->index_file_name, "", + MI_NAME_IEXT, MY_UNPACK_FILENAME); + fn_format(linkname, name, "", MI_NAME_IEXT, MY_UNPACK_FILENAME); + linkname_ptr= linkname; /* Don't create the table if the link or file exists to ensure that one doesn't accidently destroy another table. @@ -575,10 +586,21 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, { if (ci->data_file_name) { - fn_format(filename, ci->data_file_name,"",MI_NAME_DEXT,4); - fn_format(linkname, name, "",MI_NAME_DEXT,4); - linkname_ptr=linkname; - create_flag=0; + if (options & HA_OPTION_TMP_TABLE) + { + char *path; + /* chop off the table name, tempory tables use generated name */ + if ((path= strrchr(ci->data_file_name, FN_LIBCHAR))) + *path= '\0'; + fn_format(filename, name, ci->data_file_name, MI_NAME_DEXT, + MY_REPLACE_DIR | MY_UNPACK_FILENAME); + } + else + fn_format(filename, ci->data_file_name, "", + MI_NAME_DEXT, MY_UNPACK_FILENAME); + fn_format(linkname, name, "", MI_NAME_DEXT, MY_UNPACK_FILENAME); + linkname_ptr= linkname; + create_flag= 0; } else { diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index cd1bc5c34e8..ce601944f97 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -769,3 +769,24 @@ a b xxxxxxxxx bbbbbb xxxxxxxxx bbbbbb DROP TABLE t1; +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create table t1; +Table Create Table +t1 CREATE TEMPORARY TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +create table t1 (a int) engine=myisam select 42 a; +select * from t1; +a +9 +select * from t1; +a +99 +select * from t1; +a +42 +drop table t1; diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test index ca49db40ae4..be7bec117f3 100644 --- a/mysql-test/t/myisam.test +++ b/mysql-test/t/myisam.test @@ -726,4 +726,35 @@ UPDATE t1 AS ta1,t1 AS ta2 SET ta1.b='aaaaaa',ta2.b='bbbbbb'; SELECT * FROM t1; DROP TABLE t1; +# +# Bug#8706 - temporary table with data directory option fails +# +connect (session1,localhost,root,,); +connect (session2,localhost,root,,); + +connection session1; +disable_query_log; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 9 a; +enable_query_log; +show create table t1; + +connection session2; +disable_query_log; +eval create temporary table t1 (a int) engine=myisam data directory="$MYSQL_TEST_DIR/var/tmp" select 99 a; +enable_query_log; +show create table t1; + +connection default; +create table t1 (a int) engine=myisam select 42 a; + +connection session1; +select * from t1; +disconnect session1; +connection session2; +select * from t1; +disconnect session2; +connection default; +select * from t1; +drop table t1; + # End of 4.1 tests From 7997d847f2298172842e32acd356e43097adab36 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Jul 2006 15:18:00 +0200 Subject: [PATCH 17/20] backport of ndb DictCache fix - don't invalidate tables that are in state RETRIEVING --- ndb/src/ndbapi/DictCache.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index 9b6449e8ec5..66ce6266fb9 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -278,12 +278,15 @@ GlobalDictCache::invalidate_all() if (vers->size()) { TableVersion * ver = & vers->back(); - ver->m_impl->m_status = NdbDictionary::Object::Invalid; - ver->m_status = DROPPED; - if (ver->m_refCount == 0) + if (ver->m_status != RETREIVING) { - delete ver->m_impl; - vers->erase(vers->size() - 1); + ver->m_impl->m_status = NdbDictionary::Object::Invalid; + ver->m_status = DROPPED; + if (ver->m_refCount == 0) + { + delete ver->m_impl; + vers->erase(vers->size() - 1); + } } } curr = m_tableHash.getNext(curr); From 8995277acc05f9998e9f7a24aa8cb9e1d917945e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 6 Jul 2006 23:59:04 +0400 Subject: [PATCH 18/20] A fix and a test case for Bug#19399 "res 'Lost Connection' when dropping/creating tables". The bug could lead to a crash when multi-delete statements were prepared and used with temporary tables. The bug was caused by lack of clean-up of multi-delete tables before re-execution of a prepared statement. In a statement like DELETE t1 FROM t1, t2 WHERE ... the first table list (t1) is moved to lex->auxilliary_table_list and excluded from lex->query_tables or select_lex->tables. Thus it was unaccessible to reinit_stmt_before_use and not cleaned up before re-execution of a prepared statement. mysql-test/r/ps.result: Updated test results (Bug#19399) mysql-test/t/ps.test: A test case for Bug#19399 "Stored Procedures 'Lost Connection' when dropping/creating tables": test that multi-delete tables are cleaned up properly before re-execution. sql/sql_lex.cc: Always initialize auxilliary_table_list when we initialize the lex: this way we don't have to check that lex->sql_command equals to SQLCOM_DELETE_MULTI whenever we need to access auxilliary_table_list. In particular, in reinit_stmt_before_use we can simply check that auxilliary_table_list is not NULL and clean it up if the check returns a true value. sql/sql_prepare.cc: Move the one table clean-up functionality to a method of st_table_list. Clean up auxiliary_table_list if it's not empty. sql/table.cc: Implement st_table_list::reinit_before_use(). sql/table.h: Declare st_table_list::reinit_before_use(). --- mysql-test/r/ps.result | 14 ++++++++++++++ mysql-test/t/ps.test | 25 +++++++++++++++++++++++++ sql/sql_lex.cc | 1 + sql/sql_prepare.cc | 20 +++++++++++++------- sql/table.cc | 17 +++++++++++++++++ sql/table.h | 5 +++++ 6 files changed, 75 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index 2be5366b180..01aa4ddf859 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -875,3 +875,17 @@ select @@max_prepared_stmt_count, @@prepared_stmt_count; @@max_prepared_stmt_count @@prepared_stmt_count 3 0 set global max_prepared_stmt_count= @old_max_prepared_stmt_count; +drop table if exists t1; +create temporary table if not exists t1 (a1 int); +prepare stmt from "delete t1 from t1 where (cast(a1/3 as unsigned) * 3) = a1"; +drop temporary table t1; +create temporary table if not exists t1 (a1 int); +execute stmt; +drop temporary table t1; +create temporary table if not exists t1 (a1 int); +execute stmt; +drop temporary table t1; +create temporary table if not exists t1 (a1 int); +execute stmt; +drop temporary table t1; +deallocate prepare stmt; diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index d6dcf02d5b7..0ca293eb1ba 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -926,4 +926,29 @@ select @@max_prepared_stmt_count, @@prepared_stmt_count; set global max_prepared_stmt_count= @old_max_prepared_stmt_count; --enable_ps_protocol +# +# Bug#19399 "Stored Procedures 'Lost Connection' when dropping/creating +# tables" +# Check that multi-delete tables are also cleaned up before re-execution. +# +--disable_warnings +drop table if exists t1; +create temporary table if not exists t1 (a1 int); +--enable_warnings +# exact delete syntax is essential +prepare stmt from "delete t1 from t1 where (cast(a1/3 as unsigned) * 3) = a1"; +drop temporary table t1; +create temporary table if not exists t1 (a1 int); +# the server crashed on the next statement without the fix +execute stmt; +drop temporary table t1; +create temporary table if not exists t1 (a1 int); +# the problem was in memory corruption: repeat the test just in case +execute stmt; +drop temporary table t1; +create temporary table if not exists t1 (a1 int); +execute stmt; +drop temporary table t1; +deallocate prepare stmt; + # End of 4.1 tests diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 29ea8ab2ae2..fb9a765f12c 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -125,6 +125,7 @@ void lex_start(THD *thd, uchar *buf,uint length) lex->value_list.empty(); lex->update_list.empty(); lex->param_list.empty(); + lex->auxilliary_table_list.empty(); lex->unit.next= lex->unit.master= lex->unit.link_next= lex->unit.return_to= 0; lex->unit.prev= lex->unit.link_prev= 0; diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 2d9e80df63c..2688841d96c 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -1727,14 +1727,9 @@ static void reset_stmt_for_execute(Prepared_statement *stmt) tables; tables= tables->next) { - /* - Reset old pointers to TABLEs: they are not valid since the tables - were closed in the end of previous prepare or execute call. - */ - tables->table= 0; - tables->table_list= 0; + tables->reinit_before_use(thd); } - + { SELECT_LEX_UNIT *unit= sl->master_unit(); unit->unclean(); @@ -1743,6 +1738,17 @@ static void reset_stmt_for_execute(Prepared_statement *stmt) unit->reinit_exec_mechanism(); } } + /* + Cleanup of the special case of DELETE t1, t2 FROM t1, t2, t3 ... + (multi-delete). We do a full clean up, although at the moment all we + need to clean in the tables of MULTI-DELETE list is 'table' member. + */ + for (TABLE_LIST *tables= (TABLE_LIST*) lex->auxilliary_table_list.first; + tables; + tables= tables->next) + { + tables->reinit_before_use(thd); + } lex->current_select= &lex->select_lex; if (lex->result) lex->result->cleanup(); diff --git a/sql/table.cc b/sql/table.cc index 513f42665a6..26da6dc4605 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1523,6 +1523,23 @@ db_type get_table_type(const char *name) DBUG_RETURN(ha_checktype((enum db_type) (uint) *(head+3))); } +/* + Cleanup this table for re-execution. + + SYNOPSIS + st_table_list::reinit_before_use() +*/ + +void st_table_list::reinit_before_use(THD * /* thd */) +{ + /* + Reset old pointers to TABLEs: they are not valid since the tables + were closed in the end of previous prepare or execute call. + */ + table= 0; + table_list= 0; +} + /***************************************************************************** ** Instansiate templates diff --git a/sql/table.h b/sql/table.h index 8cb15d3a69c..d615623cc37 100644 --- a/sql/table.h +++ b/sql/table.h @@ -238,6 +238,11 @@ typedef struct st_table_list bool cacheable_table; /* stop PS caching */ /* used in multi-upd privelege check */ bool table_in_update_from_clause; + /* + Cleanup for re-execution in a prepared statement or a stored + procedure. + */ + void reinit_before_use(THD *thd); } TABLE_LIST; typedef struct st_changed_table_list From 2c48aaa183a167fb3cac6f17bc17cb70e62a565e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 7 Jul 2006 10:57:22 +0200 Subject: [PATCH 19/20] ndb - bug#20847 : DbtupTabDesMan: add merge with left buddies ndb/src/kernel/blocks/ERROR_codes.txt: DbtupTabDesMan: add merge with left buddies ndb/src/kernel/blocks/dbtup/Dbtup.hpp: DbtupTabDesMan: add merge with left buddies ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: DbtupTabDesMan: add merge with left buddies ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp: DbtupTabDesMan: add merge with left buddies ndb/test/ndbapi/testDict.cpp: DbtupTabDesMan: add merge with left buddies ndb/test/run-test/daily-basic-tests.txt: DbtupTabDesMan: add merge with left buddies --- ndb/src/kernel/blocks/ERROR_codes.txt | 4 +- ndb/src/kernel/blocks/dbtup/Dbtup.hpp | 9 +- ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp | 7 + .../kernel/blocks/dbtup/DbtupTabDesMan.cpp | 166 ++++++++++++++---- ndb/test/ndbapi/testDict.cpp | 101 +++++++++++ ndb/test/run-test/daily-basic-tests.txt | 4 + 6 files changed, 257 insertions(+), 34 deletions(-) diff --git a/ndb/src/kernel/blocks/ERROR_codes.txt b/ndb/src/kernel/blocks/ERROR_codes.txt index 20f03e7ea69..de32ce91ee8 100644 --- a/ndb/src/kernel/blocks/ERROR_codes.txt +++ b/ndb/src/kernel/blocks/ERROR_codes.txt @@ -2,7 +2,7 @@ Next QMGR 1 Next NDBCNTR 1000 Next NDBFS 2000 Next DBACC 3002 -Next DBTUP 4013 +Next DBTUP 4014 Next DBLQH 5043 Next DBDICT 6006 Next DBDIH 7174 @@ -430,6 +430,8 @@ Drop Table/Index: 8035: Fail next trigger drop in TC 8036: Fail next index drop in TC +4013: verify TUP tab descr before and after next DROP TABLE + System Restart: --------------- diff --git a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp index 1cb3bd89997..360710d543b 100644 --- a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp +++ b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp @@ -2129,15 +2129,18 @@ private: // Public methods Uint32 getTabDescrOffsets(const Tablerec* regTabPtr, Uint32* offset); Uint32 allocTabDescr(const Tablerec* regTabPtr, Uint32* offset); - void freeTabDescr(Uint32 retRef, Uint32 retNo); + void freeTabDescr(Uint32 retRef, Uint32 retNo, bool normal = true); Uint32 getTabDescrWord(Uint32 index); void setTabDescrWord(Uint32 index, Uint32 word); // Private methods Uint32 sizeOfReadFunction(); void removeTdArea(Uint32 tabDesRef, Uint32 list); - void insertTdArea(Uint32 sizeOfChunk, Uint32 tabDesRef, Uint32 list); - Uint32 itdaMergeTabDescr(Uint32 retRef, Uint32 retNo); + void insertTdArea(Uint32 tabDesRef, Uint32 list); + void itdaMergeTabDescr(Uint32& retRef, Uint32& retNo, bool normal); +#ifdef VM_TRACE + void verifytabdes(); +#endif //------------------------------------------------------------------------------------------------------ // Page Memory Manager diff --git a/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp b/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp index c6e33bdc92b..ad8daff0729 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp @@ -567,6 +567,9 @@ void Dbtup::execDROP_TAB_REQ(Signal* signal) { ljamEntry(); + if (ERROR_INSERTED(4013)) { + verifytabdes(); + } DropTabReq* req = (DropTabReq*)signal->getDataPtr(); TablerecPtr tabPtr; @@ -685,5 +688,9 @@ void Dbtup::execFSREMOVECONF(Signal* signal) releaseTabDescr(tabPtr.p); initTab(tabPtr.p); + if (ERROR_INSERTED(4013)) { + CLEAR_ERROR_INSERT_VALUE; + verifytabdes(); + } }//Dbtup::execFSREMOVECONF() diff --git a/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp b/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp index e74ac93f3f8..3e96bc6c14a 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupTabDesMan.cpp @@ -24,13 +24,15 @@ #define ljam() { jamLine(22000 + __LINE__); } #define ljamEntry() { jamEntryLine(22000 + __LINE__); } -/* **************************************************************** */ -/* *********** TABLE DESCRIPTOR MEMORY MANAGER ******************** */ -/* **************************************************************** */ -/* This module is used to allocate and deallocate table descriptor */ -/* memory attached to fragments (could be allocated per table */ -/* instead. Performs its task by a buddy algorithm. */ -/* **************************************************************** */ +/* + * TABLE DESCRIPTOR MEMORY MANAGER + * + * Each table has a descriptor which is a contiguous array of words. + * The descriptor is allocated from a global array using a buddy + * algorithm. Free lists exist for each power of 2 words. Freeing + * a piece first merges with free right and left neighbours and then + * divides itself up into free list chunks. + */ Uint32 Dbtup::getTabDescrOffsets(const Tablerec* regTabPtr, Uint32* offset) @@ -72,8 +74,9 @@ Uint32 Dbtup::allocTabDescr(const Tablerec* regTabPtr, Uint32* offset) Uint32 retNo = (1 << i) - allocSize; /* CALCULATE THE DIFFERENCE */ if (retNo >= ZTD_FREE_SIZE) { ljam(); - Uint32 retRef = reference + allocSize; /* SET THE RETURN POINTER */ - freeTabDescr(retRef, retNo); /* RETURN UNUSED TD SPACE TO THE TD AREA */ + // return unused words, of course without attempting left merge + Uint32 retRef = reference + allocSize; + freeTabDescr(retRef, retNo, false); } else { ljam(); allocSize = 1 << i; @@ -99,15 +102,15 @@ Uint32 Dbtup::allocTabDescr(const Tablerec* regTabPtr, Uint32* offset) }//if }//Dbtup::allocTabDescr() -void Dbtup::freeTabDescr(Uint32 retRef, Uint32 retNo) +void Dbtup::freeTabDescr(Uint32 retRef, Uint32 retNo, bool normal) { - retNo = itdaMergeTabDescr(retRef, retNo); /* MERGE WITH POSSIBLE RIGHT NEIGHBOURS */ + itdaMergeTabDescr(retRef, retNo, normal); /* MERGE WITH POSSIBLE NEIGHBOURS */ while (retNo >= ZTD_FREE_SIZE) { ljam(); Uint32 list = nextHigherTwoLog(retNo); list--; /* RETURN TO NEXT LOWER LIST */ Uint32 sizeOfChunk = 1 << list; - insertTdArea(sizeOfChunk, retRef, list); + insertTdArea(retRef, list); retRef += sizeOfChunk; retNo -= sizeOfChunk; }//while @@ -128,7 +131,7 @@ Dbtup::setTabDescrWord(Uint32 index, Uint32 word) tableDescriptor[index].tabDescr = word; }//Dbtup::setTabDescrWord() -void Dbtup::insertTdArea(Uint32 sizeOfChunk, Uint32 tabDesRef, Uint32 list) +void Dbtup::insertTdArea(Uint32 tabDesRef, Uint32 list) { ndbrequire(list < 16); setTabDescrWord(tabDesRef + ZTD_FL_HEADER, ZTD_TYPE_FREE); @@ -145,19 +148,14 @@ void Dbtup::insertTdArea(Uint32 sizeOfChunk, Uint32 tabDesRef, Uint32 list) setTabDescrWord((tabDesRef + (1 << list)) - ZTD_TR_SIZE, 1 << list); }//Dbtup::insertTdArea() -/* ---------------------------------------------------------------- */ -/* ----------------------- MERGE_TAB_DESCR ------------------------ */ -/* ---------------------------------------------------------------- */ -/* INPUT: TAB_DESCR_PTR POINTING AT THE CURRENT CHUNK */ -/* */ -/* SHORTNAME: MTD */ -/* -----------------------------------------------------------------*/ -Uint32 Dbtup::itdaMergeTabDescr(Uint32 retRef, Uint32 retNo) +/* + * Merge to-be-removed chunk (which need not be initialized with header + * and trailer) with left and right buddies. The start point retRef + * moves to left and the size retNo increases to match the new chunk. + */ +void Dbtup::itdaMergeTabDescr(Uint32& retRef, Uint32& retNo, bool normal) { - /* THE SIZE OF THE PART TO MERGE MUST BE OF THE SAME SIZE AS THE INSERTED PART */ - /* THIS IS TRUE EITHER IF ONE PART HAS THE SAME SIZE OR THE SUM OF BOTH PARTS */ - /* TOGETHER HAS THE SAME SIZE AS THE PART TO BE INSERTED */ - /* FIND THE SIZES OF THE PARTS TO THE RIGHT OF THE PART TO BE REINSERTED */ + // merge right while ((retRef + retNo) < cnoOfTabDescrRec) { ljam(); Uint32 tabDesRef = retRef + retNo; @@ -171,11 +169,28 @@ Uint32 Dbtup::itdaMergeTabDescr(Uint32 retRef, Uint32 retNo) removeTdArea(tabDesRef, list); } else { ljam(); - return retNo; - }//if - }//while - ndbrequire((retRef + retNo) == cnoOfTabDescrRec); - return retNo; + break; + } + } + // merge left + const bool mergeLeft = normal; + while (mergeLeft && retRef > 0) { + ljam(); + Uint32 trailerWord = getTabDescrWord(retRef - ZTD_TR_TYPE); + if (trailerWord == ZTD_TYPE_FREE) { + ljam(); + Uint32 sizeOfMergedPart = getTabDescrWord(retRef - ZTD_TR_SIZE); + ndbrequire(retRef >= sizeOfMergedPart); + retRef -= sizeOfMergedPart; + retNo += sizeOfMergedPart; + Uint32 list = nextHigherTwoLog(sizeOfMergedPart - 1); + removeTdArea(retRef, list); + } else { + ljam(); + break; + } + } + ndbrequire((retRef + retNo) <= cnoOfTabDescrRec); }//Dbtup::itdaMergeTabDescr() /* ---------------------------------------------------------------- */ @@ -211,3 +226,94 @@ void Dbtup::removeTdArea(Uint32 tabDesRef, Uint32 list) setTabDescrWord(tabDescrPrevPtr + ZTD_FL_NEXT, tabDescrNextPtr); }//if }//Dbtup::removeTdArea() + +#ifdef VM_TRACE +void +Dbtup::verifytabdes() +{ + struct WordType { + short fl; // free list 0-15 + short ti; // table id + WordType() : fl(-1), ti(-1) {} + }; + WordType* wt = new WordType [cnoOfTabDescrRec]; + uint free_frags = 0; + // free lists + { + for (uint i = 0; i < 16; i++) { + Uint32 desc2 = RNIL; + Uint32 desc = cfreeTdList[i]; + while (desc != RNIL) { + const Uint32 size = (1 << i); + ndbrequire(size >= ZTD_FREE_SIZE); + ndbrequire(desc + size <= cnoOfTabDescrRec); + { Uint32 index = desc + ZTD_FL_HEADER; + ndbrequire(tableDescriptor[index].tabDescr == ZTD_TYPE_FREE); + } + { Uint32 index = desc + ZTD_FL_SIZE; + ndbrequire(tableDescriptor[index].tabDescr == size); + } + { Uint32 index = desc + size - ZTD_TR_TYPE; + ndbrequire(tableDescriptor[index].tabDescr == ZTD_TYPE_FREE); + } + { Uint32 index = desc + size - ZTD_TR_SIZE; + ndbrequire(tableDescriptor[index].tabDescr == size); + } + { Uint32 index = desc + ZTD_FL_PREV; + ndbrequire(tableDescriptor[index].tabDescr == desc2); + } + for (uint j = 0; j < size; j++) { + ndbrequire(wt[desc + j].fl == -1); + wt[desc + j].fl = i; + } + desc2 = desc; + desc = tableDescriptor[desc + ZTD_FL_NEXT].tabDescr; + free_frags++; + } + } + } + // tables + { + for (uint i = 0; i < cnoOfTablerec; i++) { + TablerecPtr ptr; + ptr.i = i; + ptrAss(ptr, tablerec); + if (ptr.p->tableStatus == DEFINED) { + Uint32 offset[10]; + const Uint32 alloc = getTabDescrOffsets(ptr.p, offset); + const Uint32 desc = ptr.p->readKeyArray - offset[3]; + Uint32 size = alloc; + if (size % ZTD_FREE_SIZE != 0) + size += ZTD_FREE_SIZE - size % ZTD_FREE_SIZE; + ndbrequire(desc + size <= cnoOfTabDescrRec); + { Uint32 index = desc + ZTD_FL_HEADER; + ndbrequire(tableDescriptor[index].tabDescr == ZTD_TYPE_NORMAL); + } + { Uint32 index = desc + ZTD_FL_SIZE; + ndbrequire(tableDescriptor[index].tabDescr == size); + } + { Uint32 index = desc + size - ZTD_TR_TYPE; + ndbrequire(tableDescriptor[index].tabDescr == ZTD_TYPE_NORMAL); + } + { Uint32 index = desc + size - ZTD_TR_SIZE; + ndbrequire(tableDescriptor[index].tabDescr == size); + } + for (uint j = 0; j < size; j++) { + ndbrequire(wt[desc + j].ti == -1); + wt[desc + j].ti = i; + } + } + } + } + // all words + { + for (uint i = 0; i < cnoOfTabDescrRec; i++) { + bool is_fl = wt[i].fl != -1; + bool is_ti = wt[i].ti != -1; + ndbrequire(is_fl != is_ti); + } + } + delete [] wt; + ndbout << "verifytabdes: frags=" << free_frags << endl; +} +#endif diff --git a/ndb/test/ndbapi/testDict.cpp b/ndb/test/ndbapi/testDict.cpp index 5f88342705a..3e4ca007978 100644 --- a/ndb/test/ndbapi/testDict.cpp +++ b/ndb/test/ndbapi/testDict.cpp @@ -223,6 +223,101 @@ int runCreateAndDrop(NDBT_Context* ctx, NDBT_Step* step){ return NDBT_OK; } +int runCreateAndDropAtRandom(NDBT_Context* ctx, NDBT_Step* step) +{ + myRandom48Init(NdbTick_CurrentMillisecond()); + Ndb* pNdb = GETNDB(step); + NdbDictionary::Dictionary* pDic = pNdb->getDictionary(); + int loops = ctx->getNumLoops(); + int numTables = NDBT_Tables::getNumTables(); + bool* tabList = new bool [ numTables ]; + int tabCount; + + { + for (int num = 0; num < numTables; num++) { + (void)pDic->dropTable(NDBT_Tables::getTable(num)->getName()); + tabList[num] = false; + } + tabCount = 0; + } + + NdbRestarter restarter; + int result = NDBT_OK; + int bias = 1; // 0-less 1-more + int i = 0; + + while (i < loops) { + g_info << "loop " << i << " tabs " << tabCount << "/" << numTables << endl; + int num = myRandom48(numTables); + const NdbDictionary::Table* pTab = NDBT_Tables::getTable(num); + char tabName[200]; + strcpy(tabName, pTab->getName()); + + if (tabList[num] == false) { + if (bias == 0 && myRandom48(100) < 80) + continue; + g_info << tabName << ": create" << endl; + if (pDic->createTable(*pTab) != 0) { + const NdbError err = pDic->getNdbError(); + g_err << tabName << ": create failed: " << err << endl; + result = NDBT_FAILED; + break; + } + const NdbDictionary::Table* pTab2 = pDic->getTable(tabName); + if (pTab2 == NULL) { + const NdbError err = pDic->getNdbError(); + g_err << tabName << ": verify create: " << err << endl; + result = NDBT_FAILED; + break; + } + tabList[num] = true; + assert(tabCount < numTables); + tabCount++; + if (tabCount == numTables) + bias = 0; + } + else { + if (bias == 1 && myRandom48(100) < 80) + continue; + g_info << tabName << ": drop" << endl; + if (restarter.insertErrorInAllNodes(4013) != 0) { + g_err << "error insert failed" << endl; + result = NDBT_FAILED; + break; + } + if (pDic->dropTable(tabName) != 0) { + const NdbError err = pDic->getNdbError(); + g_err << tabName << ": drop failed: " << err << endl; + result = NDBT_FAILED; + break; + } + const NdbDictionary::Table* pTab2 = pDic->getTable(tabName); + if (pTab2 != NULL) { + g_err << tabName << ": verify drop: table exists" << endl; + result = NDBT_FAILED; + break; + } + if (pDic->getNdbError().code != 709 && + pDic->getNdbError().code != 723) { + const NdbError err = pDic->getNdbError(); + g_err << tabName << ": verify drop: " << err << endl; + result = NDBT_FAILED; + break; + } + tabList[num] = false; + assert(tabCount > 0); + tabCount--; + if (tabCount == 0) + bias = 1; + } + i++; + } + + delete [] tabList; + return result; +} + + int runCreateAndDropWithData(NDBT_Context* ctx, NDBT_Step* step){ Ndb* pNdb = GETNDB(step); int loops = ctx->getNumLoops(); @@ -1562,6 +1657,12 @@ TESTCASE("CreateAndDrop", "Try to create and drop the table loop number of times\n"){ INITIALIZER(runCreateAndDrop); } +TESTCASE("CreateAndDropAtRandom", + "Try to create and drop table at random loop number of times\n" + "Uses all available tables\n" + "Uses error insert 4013 to make TUP verify table descriptor"){ + INITIALIZER(runCreateAndDropAtRandom); +} TESTCASE("CreateAndDropWithData", "Try to create and drop the table when it's filled with data\n" "do this loop number of times\n"){ diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt index e70dcafb249..e9064d6e30b 100644 --- a/ndb/test/run-test/daily-basic-tests.txt +++ b/ndb/test/run-test/daily-basic-tests.txt @@ -489,6 +489,10 @@ max-time: 1500 cmd: testDict args: -n CreateAndDrop +max-time: 1500 +cmd: testDict +args: -n CreateAndDropAtRandom -l 200 T1 + max-time: 1500 cmd: testDict args: -n CreateAndDropWithData From 665db1a6ade28cc7c6152a7411badbc822792331 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 10 Jul 2006 12:05:51 +0200 Subject: [PATCH 20/20] ndb - bug#20847: non-debug compile fix ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: non-debug compile fix --- ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp b/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp index ad8daff0729..73165dc7738 100644 --- a/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp +++ b/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp @@ -568,7 +568,9 @@ Dbtup::execDROP_TAB_REQ(Signal* signal) { ljamEntry(); if (ERROR_INSERTED(4013)) { +#ifdef VM_TRACE verifytabdes(); +#endif } DropTabReq* req = (DropTabReq*)signal->getDataPtr(); @@ -690,7 +692,9 @@ void Dbtup::execFSREMOVECONF(Signal* signal) initTab(tabPtr.p); if (ERROR_INSERTED(4013)) { CLEAR_ERROR_INSERT_VALUE; +#ifdef VM_TRACE verifytabdes(); +#endif } }//Dbtup::execFSREMOVECONF()