mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user