diff options
author | unknown <pekka@mysql.com> | 2004-09-17 14:09:21 +0200 |
---|---|---|
committer | unknown <pekka@mysql.com> | 2004-09-17 14:09:21 +0200 |
commit | 72fedd949429c8bbe7e7bce8461e4582f27c683e (patch) | |
tree | 2e93e4fe52838a8045237bc21ca4276940a489be /ndb/test | |
parent | b5d77b3a26d0a930591e0451877828dcc6be55f2 (diff) | |
download | mariadb-git-72fedd949429c8bbe7e7bce8461e4582f27c683e.tar.gz |
ndb charsets (wl-1732) final part: use strxfrm + strcoll
ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp:
oops
ndb/src/kernel/blocks/dbtux/DbtuxScan.cpp:
jamEntry
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
jamEntry
mysql-test/r/ndb_index.result:
ndb charsets: minimal fix to make test pass
mysql-test/t/ndb_index.test:
ndb charsets: minimal fix to make test pass
Diffstat (limited to 'ndb/test')
-rw-r--r-- | ndb/test/ndbapi/testOIBasic.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ndb/test/ndbapi/testOIBasic.cpp b/ndb/test/ndbapi/testOIBasic.cpp index ac28b96af80..f9eb3514926 100644 --- a/ndb/test/ndbapi/testOIBasic.cpp +++ b/ndb/test/ndbapi/testOIBasic.cpp @@ -28,6 +28,7 @@ #include <NdbCondition.h> #include <NdbThread.h> #include <NdbTick.h> +#include <my_sys.h> // options @@ -37,6 +38,8 @@ struct Opt { const char* m_bound; const char* m_case; bool m_core; + const char* m_csname; + CHARSET_INFO* m_cs; bool m_dups; NdbDictionary::Object::FragmentType m_fragtype; unsigned m_idxloop; @@ -59,6 +62,8 @@ struct Opt { m_bound("01234"), m_case(0), m_core(false), + m_csname("latin1_bin"), + m_cs(0), m_dups(false), m_fragtype(NdbDictionary::Object::FragUndefined), m_idxloop(4), @@ -94,6 +99,7 @@ printhelp() << " -bound xyz use only these bound types 0-4 [" << d.m_bound << "]" << endl << " -case abc only given test cases (letters a-z)" << endl << " -core core dump on error [" << d.m_core << "]" << endl + << " -csname S charset (collation) of non-pk char column [" << d.m_csname << "]" << endl << " -dups allow duplicate tuples from index scan [" << d.m_dups << "]" << endl << " -fragtype T fragment type single/small/medium/large" << endl << " -index xyz only given index numbers (digits 1-9)" << endl @@ -983,6 +989,10 @@ createtable(Par par) c.setLength(col.m_length); c.setPrimaryKey(col.m_pk); c.setNullable(col.m_nullable); + if (c.getCharset()) { // test if char type + if (! col.m_pk) + c.setCharset(par.m_cs); + } t.addColumn(c); } con.m_dic = con.m_ndb->getDictionary(); @@ -3149,6 +3159,10 @@ runtest(Par par) LL1("start"); if (par.m_seed != 0) srandom(par.m_seed); + assert(par.m_csname != 0); + CHARSET_INFO* cs; + CHK((cs = get_charset_by_name(par.m_csname, MYF(0))) != 0 || (cs = get_charset_by_csname(par.m_csname, MY_CS_PRIMARY, MYF(0))) != 0); + par.m_cs = cs; Con con; CHK(con.connect() == 0); par.m_con = &con; @@ -3232,6 +3246,12 @@ NDB_COMMAND(testOIBasic, "testOIBasic", "testOIBasic", "testOIBasic", 65535) g_opt.m_core = true; continue; } + if (strcmp(arg, "-csname") == 0) { + if (++argv, --argc > 0) { + g_opt.m_csname = strdup(argv[0]); + continue; + } + } if (strcmp(arg, "-dups") == 0) { g_opt.m_dups = true; continue; |