summaryrefslogtreecommitdiff
path: root/storage/maria/unittest
diff options
context:
space:
mode:
authorunknown <guilhem@gbichot4.local>2007-08-03 15:58:50 +0200
committerunknown <guilhem@gbichot4.local>2007-08-03 15:58:50 +0200
commit3d0f42a94c35eaf2f62677f618963b2af9166338 (patch)
treeb9151207471475243d2a37cd7a60a18c5c2cf0a7 /storage/maria/unittest
parent91f03a4d31f295acd4e63df6216a1c6c9260d7f1 (diff)
downloadmariadb-git-3d0f42a94c35eaf2f62677f618963b2af9166338.tar.gz
Log handler's unit test were broken by me on June 22, fixing this:
don't auto-log LOGREC_LONG_TRANSACTION_ID in log handler's unit tests, as they read their log and expect to find only the records they asked for, and so not LOGREC_LONG_TRANSACTION_ID. All log handler's unit tests pass. A way to run them faster: when their LONG_BUFFER_SIZE is too big (1GB) I divide it by ten and then I can run them on /dev/shm - they are then "instant". By the way, pushbuild was not displaying anymore "unit: failed" in the list of all pushes, which participates to the reasons why I didn't notice the breakage earlier. The other reason being that I was too lazy to run log handler unit tests on my machine as they took long (hadn't yet thought about the /dev/shm idea) and so I relied on pushbuild; Danny has now quickly fixed pushbuild - thanks :) storage/maria/unittest/ma_test_loghandler-t.c: don't auto-log LOGREC_LONG_TRANSACTION_ID in log handler's unit tests, as they read their log and expect to find only the records they asked for storage/maria/unittest/ma_test_loghandler_multigroup-t.c: don't auto-log LOGREC_LONG_TRANSACTION_ID in log handler's unit tests, as they read their log and expect to find only the records they asked for storage/maria/unittest/ma_test_loghandler_multithread-t.c: don't auto-log LOGREC_LONG_TRANSACTION_ID in log handler's unit tests, as they read their log and expect to find only the records they asked for storage/maria/unittest/ma_test_loghandler_pagecache-t.c: don't auto-log LOGREC_LONG_TRANSACTION_ID in log handler's unit tests, as they read their log and expect to find only the records they asked for
Diffstat (limited to 'storage/maria/unittest')
-rw-r--r--storage/maria/unittest/ma_test_loghandler-t.c1
-rw-r--r--storage/maria/unittest/ma_test_loghandler_multigroup-t.c1
-rw-r--r--storage/maria/unittest/ma_test_loghandler_multithread-t.c2
-rw-r--r--storage/maria/unittest/ma_test_loghandler_pagecache-t.c1
4 files changed, 5 insertions, 0 deletions
diff --git a/storage/maria/unittest/ma_test_loghandler-t.c b/storage/maria/unittest/ma_test_loghandler-t.c
index 04459adeac8..3aecb724c6d 100644
--- a/storage/maria/unittest/ma_test_loghandler-t.c
+++ b/storage/maria/unittest/ma_test_loghandler-t.c
@@ -193,6 +193,7 @@ int main(int argc __attribute__((unused)), char *argv[])
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)long_tr_id;
parts[TRANSLOG_INTERNAL_PARTS + 0].length= 6;
trn->short_id= 0;
+ trn->first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
if (translog_write_record(&lsn,
LOGREC_FIXED_RECORD_0LSN_EXAMPLE,
trn, NULL,
diff --git a/storage/maria/unittest/ma_test_loghandler_multigroup-t.c b/storage/maria/unittest/ma_test_loghandler_multigroup-t.c
index cec7198ef3b..bf4cfe110e3 100644
--- a/storage/maria/unittest/ma_test_loghandler_multigroup-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_multigroup-t.c
@@ -190,6 +190,7 @@ int main(int argc __attribute__((unused)), char *argv[])
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)long_tr_id;
parts[TRANSLOG_INTERNAL_PARTS + 0].length= 6;
trn->short_id= 0;
+ trn->first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
if (translog_write_record(&lsn, LOGREC_FIXED_RECORD_0LSN_EXAMPLE,
trn, NULL,
6, TRANSLOG_INTERNAL_PARTS + 1, parts, NULL))
diff --git a/storage/maria/unittest/ma_test_loghandler_multithread-t.c b/storage/maria/unittest/ma_test_loghandler_multithread-t.c
index 86e66daca52..0f56ef5384c 100644
--- a/storage/maria/unittest/ma_test_loghandler_multithread-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_multithread-t.c
@@ -124,6 +124,7 @@ void writer(int num)
uint i;
trn.short_id= num;
+ trn.first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
for (i= 0; i < ITERATIONS; i++)
{
uint len= get_len();
@@ -299,6 +300,7 @@ int main(int argc __attribute__((unused)),
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)long_tr_id;
parts[TRANSLOG_INTERNAL_PARTS + 0].length= 6;
+ dummy_transaction_object.first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
if (translog_write_record(&first_lsn,
LOGREC_FIXED_RECORD_0LSN_EXAMPLE,
&dummy_transaction_object, NULL, 6,
diff --git a/storage/maria/unittest/ma_test_loghandler_pagecache-t.c b/storage/maria/unittest/ma_test_loghandler_pagecache-t.c
index 804dd961fbc..7dfdc32234e 100644
--- a/storage/maria/unittest/ma_test_loghandler_pagecache-t.c
+++ b/storage/maria/unittest/ma_test_loghandler_pagecache-t.c
@@ -90,6 +90,7 @@ int main(int argc __attribute__((unused)), char *argv[])
int4store(long_tr_id, 0);
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)long_tr_id;
parts[TRANSLOG_INTERNAL_PARTS + 0].length= 6;
+ dummy_transaction_object.first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
if (translog_write_record(&lsn,
LOGREC_FIXED_RECORD_0LSN_EXAMPLE,
&dummy_transaction_object, NULL, 6,