Commit 0c3d72ab authored by unknown's avatar unknown

Merge rburnett@bk-internal.mysql.com:/home/bk/mysql-4.1

into mdk10.(none):/home/reggie/bk/mysql-4.1

parents cbd33347 e1efe797
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags -g"
extra_configs="$pentium_configs --with-charset=utf8 --with-collation=utf8_general_cs"
. "$path/FINISH.sh"
......@@ -2770,16 +2770,23 @@ case $default_charset in
;;
utf8)
default_charset_default_collation="utf8_general_ci"
define(UTFC1, utf8_general_ci utf8_bin)
define(UTFC2, utf8_czech_ci utf8_danish_ci)
define(UTFC3, utf8_estonian_ci utf8_icelandic_ci)
define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
define(UTFC9, utf8_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
if test "$default_collation" = "utf8_general_cs"; then
# For those who explicitly desire "utf8_general_cs", support it,
# and then also set the CPP switch enabling that code.
UTFC="utf8_general_cs"
AC_DEFINE([HAVE_UTF8_GENERAL_CS], [1], [certain Japanese customer])
else
define(UTFC1, utf8_general_ci utf8_bin)
define(UTFC2, utf8_czech_ci utf8_danish_ci)
define(UTFC3, utf8_estonian_ci utf8_icelandic_ci)
define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
define(UTFC7, utf8_spanish2_ci utf8_spanish_ci)
define(UTFC8, utf8_swedish_ci utf8_turkish_ci)
define(UTFC9, utf8_unicode_ci)
UTFC="UTFC1 UTFC2 UTFC3 UTFC4 UTFC5 UTFC6 UTFC7 UTFC8 UTFC9"
fi
default_charset_collations="$UTFC"
;;
*)
......
......@@ -619,12 +619,18 @@ counter datavalue
1 newval
2 newval
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
select * from t1 order by counter;
counter datavalue
1 newval
2 newval
3 newval
4 newval
5 newval
6 newval
7 newval
8 newval
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
select * from t1 order by counter;
counter datavalue
......@@ -632,8 +638,32 @@ counter datavalue
2 newval
3 newval
4 newval
5 newval
6 newval
7 newval
8 newval
35 newval
36 newval
37 newval
38 newval
39 newval
40 newval
41 newval
42 newval
43 newval
44 newval
45 newval
46 newval
47 newval
48 newval
49 newval
50 newval
51 newval
52 newval
53 newval
54 newval
55 newval
56 newval
57 newval
58 newval
drop table t1;
......@@ -596,9 +596,11 @@ insert into t1 (datavalue) values ('newval');
insert into t1 (datavalue) values ('newval');
select * from t1 order by counter;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
select * from t1 order by counter;
connection con2;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
insert into t1 (datavalue) select datavalue from t1 where counter < 100;
select * from t1 order by counter;
drop table t1;
......@@ -62,7 +62,7 @@ extern CHARSET_INFO my_charset_utf8_slovak_uca_ci;
extern CHARSET_INFO my_charset_utf8_spanish2_uca_ci;
extern CHARSET_INFO my_charset_utf8_roman_uca_ci;
extern CHARSET_INFO my_charset_utf8_persian_uca_ci;
#ifdef HAVE_CYBOZU_COLLATION
#ifdef HAVE_UTF8_GENERAL_CS
extern CHARSET_INFO my_charset_utf8_general_cs;
#endif
#endif
......@@ -149,7 +149,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_utf8
add_compiled_collation(&my_charset_utf8_general_ci);
add_compiled_collation(&my_charset_utf8_bin);
#ifdef HAVE_CYBOZU_COLLATION
#ifdef HAVE_UTF8_GENERAL_CS
add_compiled_collation(&my_charset_utf8_general_cs);
#endif
#ifdef HAVE_UCA_COLLATIONS
......
......@@ -11274,10 +11274,10 @@ void Dbacc::execACC_CHECK_SCAN(Signal* signal)
operationRecPtr.i = scanPtr.p->scanFirstQueuedOp;
ptrCheckGuard(operationRecPtr, coprecsize, operationrec);
takeOutReadyScanQueue(signal);
fragrecptr.i = operationRecPtr.p->fragptr;
ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec);
if (operationRecPtr.p->elementIsDisappeared == ZTRUE) {
jam();
fragrecptr.i = operationRecPtr.p->fragptr;
ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec);
if (fragrecptr.p->createLcp == ZTRUE) {
if (remainingUndoPages() < ZMIN_UNDO_PAGES_AT_COMMIT) {
jam();
......@@ -11922,8 +11922,6 @@ void Dbacc::sendNextScanConf(Signal* signal)
return;
}//if
fragrecptr.i = operationRecPtr.p->fragptr;
ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec);
if (fragrecptr.p->keyLength != 0) {
jam();
signal->theData[0] = scanPtr.p->scanUserptr;
......
......@@ -530,6 +530,74 @@ runOperations(NDBT_Context* ctx, NDBT_Step* step)
return NDBT_OK;
}
int
runLockUpgrade1(NDBT_Context* ctx, NDBT_Step* step){
// Verify that data in index match
// table data
Ndb* pNdb = GETNDB(step);
HugoOperations hugoOps(*ctx->getTab());
HugoTransactions hugoTrans(*ctx->getTab());
if(hugoTrans.loadTable(pNdb, 1) != 0){
g_err << "Load table failed" << endl;
return NDBT_FAILED;
}
int result= NDBT_OK;
do
{
CHECK(hugoOps.startTransaction(pNdb) == 0);
CHECK(hugoOps.pkReadRecord(pNdb, 0, 1, NdbOperation::LM_Read) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
ctx->setProperty("READ_DONE", 1);
ctx->broadcast();
ndbout_c("wait 2");
ctx->getPropertyWait("READ_DONE", 2);
ndbout_c("wait 2 - done");
ctx->setProperty("READ_DONE", 3);
ctx->broadcast();
ndbout_c("before update");
CHECK(hugoOps.pkUpdateRecord(pNdb, 0, 1, 2) == 0);
ndbout_c("wait update");
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
CHECK(hugoOps.closeTransaction(pNdb));
} while(0);
return result;
}
int
runLockUpgrade2(NDBT_Context* ctx, NDBT_Step* step){
// Verify that data in index match
// table data
Ndb* pNdb = GETNDB(step);
HugoOperations hugoOps(*ctx->getTab());
HugoTransactions hugoTrans(*ctx->getTab());
int result= NDBT_OK;
do
{
CHECK(hugoOps.startTransaction(pNdb) == 0);
ndbout_c("wait 1");
ctx->getPropertyWait("READ_DONE", 1);
ndbout_c("wait 1 - done");
CHECK(hugoOps.pkReadRecord(pNdb, 0, 1, NdbOperation::LM_Read) == 0);
CHECK(hugoOps.execute_NoCommit(pNdb) == 0);
ctx->setProperty("READ_DONE", 2);
ctx->broadcast();
ndbout_c("wait 3");
ctx->getPropertyWait("READ_DONE", 3);
ndbout_c("wait 3 - done");
NdbSleep_MilliSleep(200);
CHECK(hugoOps.execute_Commit(pNdb) == 0);
} while(0);
return NDBT_FAILED;
}
int
main(int argc, const char** argv){
ndb_init();
......@@ -538,6 +606,31 @@ main(int argc, const char** argv){
generate(tmp, 5);
NDBT_TestSuite ts("testOperations");
{
BaseString name("bug_9749");
NDBT_TestCaseImpl1 *pt = new NDBT_TestCaseImpl1(&ts,
name.c_str(), "");
pt->addInitializer(new NDBT_Initializer(pt,
"runClearTable",
runClearTable));
pt->addStep(new NDBT_ParallelStep(pt,
"thread1",
runLockUpgrade1));
pt->addStep(new NDBT_ParallelStep(pt,
"thread2",
runLockUpgrade2));
pt->addFinalizer(new NDBT_Finalizer(pt,
"runClearTable",
runClearTable));
ts.addTest(pt);
}
for(size_t i = 0; i<tmp.size(); i++)
{
BaseString name;
......
......@@ -2375,7 +2375,7 @@ CHARSET_INFO my_charset_utf8_bin=
&my_collation_mb_bin_handler
};
#ifdef HAVE_CYBOZU_COLLATION
#ifdef HAVE_UTF8_GENERAL_CS
/*
* These functions bacically do the same as their original, except
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment