1
/* Copyright (C) 2006-2008 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
#include "../maria_def.h"
20
#include "../trnman.h"
21
#include "sequence_storage.h"
22
#include <my_getopt.h>
24
extern my_bool maria_log_remove();
25
extern void translog_example_table_init();
28
static const char *default_dbug_option;
30
static TRN *trn= &dummy_transaction_object;
35
#define PCACHE_SIZE (1024*1024*10)
36
#define LONG_BUFFER_SIZE ((1024L*1024L*1024L) + (1024L*1024L*512))
37
#define MIN_REC_LENGTH (1024L*1024L + 1024L*512L + 1)
38
#define LOG_FILE_SIZE (1024L*1024L*1024L + 1024L*1024L*512)
44
#define PCACHE_SIZE (1024*1024*10)
45
#define LONG_BUFFER_SIZE (1024L*1024L)
46
#define MIN_REC_LENGTH (1024L)
47
#define LOG_FILE_SIZE (1024L*1024L*1024L + 1024L*1024L*512)
51
#endif /*READONLY_TEST*/
55
#define LOG_FILE_SIZE 1024L*1024L*3L
56
#define ITERATIONS 1600
59
#define LOG_FILE_SIZE 1024L*1024L*100L
60
#define ITERATIONS 65000
65
Check that the buffer filled correctly
69
ptr Pointer to the buffer
70
length length of the buffer
77
static my_bool check_content(uchar *ptr, ulong length)
81
DBUG_ENTER("check_content");
82
for (i= 0; i < length; i++)
85
int4store(buff, (i >> 2));
86
if (ptr[i] != buff[i % 4])
88
fprintf(stderr, "Byte # %lu is %x instead of %x",
89
i, (uint) ptr[i], (uint) buff[i % 4]);
90
DBUG_DUMP("mem", ptr +(ulong) (i > 16 ? i - 16 : 0),
91
(i > 16 ? 16 : i) + (i + 16 < length ? 16 : length - i));
100
Read whole record content, and check content (put with offset)
103
read_and_check_content()
104
rec The record header buffer
105
buffer The buffer to read the record in
106
skip Skip this number of bytes ot the record content
113
static my_bool read_and_check_content(TRANSLOG_HEADER_BUFFER *rec,
114
uchar *buffer, uint skip)
118
DBUG_ENTER("read_and_check_content");
119
DBUG_ASSERT(rec->record_length < LONG_BUFFER_SIZE + LSN_STORE_SIZE * 2 + 2);
120
if ((len= translog_read_record(rec->lsn, 0, rec->record_length,
121
buffer, NULL)) != rec->record_length)
123
fprintf(stderr, "Requested %lu byte, read %lu\n",
124
(ulong) rec->record_length, (ulong) len);
127
res|= check_content(buffer + skip, rec->record_length - skip);
131
static const char *load_default_groups[]= {"ma_unit_loghandler", 0};
133
static const char *default_dbug_option=
134
IF_WIN("d:t:i:O,\\ma_test_loghandler.trace",
135
"d:t:i:o,/tmp/ma_test_loghandler.trace");
137
static const char *opt_wfile= NULL;
138
static const char *opt_rfile= NULL;
139
static struct my_option my_long_options[] =
142
{"debug", '#', "Output debug log. Often the argument is 'd:t:o,filename'.",
143
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
145
{"write-seq", 'w', "Path to file in which \"random\" sequence used in the test will be written",
146
(uchar**) &opt_wfile, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
147
{"read-seq", 'r', "Path to file from which \"random\" sequence used in the test will be read",
148
(uchar**) &opt_rfile, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
149
{"help", '?', "Display this help and exit.",
150
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
151
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
153
static SEQ_STORAGE seq;
155
static uint32 get_len()
158
DBUG_ENTER("get_len");
160
res= seq_storage_next(&seq);
164
((ulonglong) rand() *
165
(LONG_BUFFER_SIZE - MIN_REC_LENGTH - 1) / RAND_MAX) + MIN_REC_LENGTH;
167
seq_storage_write(opt_wfile, res))
170
DBUG_PRINT("info", ("length value : %lu", (ulong) res));
174
static void usage(void)
176
puts("Copyright (C) 2008 MySQL AB");
177
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,");
178
puts("and you are welcome to modify and redistribute it under the GPL license\n");
180
puts("Unit test of maria engine");
181
(void)(printf("\nUsage: %s [OPTIONS]\n", my_progname_short));
182
my_print_help(my_long_options);
183
print_defaults("my", load_default_groups);
184
my_print_variables(my_long_options);
189
get_one_option(int optid __attribute__((unused)),
190
const struct my_option *opt __attribute__((unused)),
191
char *argument __attribute__((unused)))
199
DBUG_SET_INITIAL(argument ? argument : default_dbug_option);
207
static void get_options(int *argc,char ***argv)
211
if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
214
if (opt_rfile && opt_wfile)
222
int main(int argc __attribute__((unused)), char *argv[])
230
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA,
231
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA,
232
0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55
234
uchar *long_buffer= malloc(LONG_BUFFER_SIZE + LSN_STORE_SIZE * 2 + 2);
237
LSN lsn, lsn_base, first_lsn;
238
TRANSLOG_HEADER_BUFFER rec;
239
LEX_CUSTRING parts[TRANSLOG_INTERNAL_PARTS + 2];
240
struct st_translog_scanner_data scanner;
245
bzero(&pagecache, sizeof(pagecache));
246
maria_data_root= (char *)".";
247
load_defaults("my", load_default_groups, &argc, &argv);
249
get_options(&argc, &argv);
251
if (maria_log_remove())
256
for (i= 0; i < (LONG_BUFFER_SIZE + LSN_STORE_SIZE * 2 + 2); i++)
259
int4store(buff, (i >> 2));
260
long_buffer[i]= buff[i % 4];
264
bzero(long_tr_id, 6);
266
if (ma_control_file_open(TRUE, TRUE))
268
fprintf(stderr, "Can't init control file (%d)\n", errno);
271
if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0,
272
TRANSLOG_PAGE_SIZE, 0)) == 0)
274
fprintf(stderr, "Got error: init_pagecache() (errno: %d)\n", errno);
277
if (translog_init_with_table(".", LOG_FILE_SIZE, 50112, 0, &pagecache,
278
0, 0, &translog_example_table_init, 0))
280
fprintf(stderr, "Can't init loghandler (%d)\n", errno);
283
/* Suppressing of automatic record writing */
284
trn->first_undo_lsn|= TRANSACTION_LOGGED_LONG_ID;
286
plan(((ITERATIONS - 1) * 4 + 1) * 2);
289
seq_storage_reader_init(&seq, opt_rfile))
295
int4store(long_tr_id, 0);
296
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)long_tr_id;
297
parts[TRANSLOG_INTERNAL_PARTS + 0].length= 6;
299
trn->first_undo_lsn= TRANSACTION_LOGGED_LONG_ID;
300
if (translog_write_record(&lsn, LOGREC_FIXED_RECORD_0LSN_EXAMPLE,
301
trn, NULL, 6, TRANSLOG_INTERNAL_PARTS + 1, parts,
304
fprintf(stderr, "Can't write record #%lu\n", (ulong) 0);
306
ok(0, "write LOGREC_FIXED_RECORD_0LSN_EXAMPLE");
309
ok(1, "write LOGREC_FIXED_RECORD_0LSN_EXAMPLE");
310
lsn_base= first_lsn= lsn;
312
for (i= 1; i < ITERATIONS; i++)
316
lsn_store(lsn_buff, lsn_base);
317
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)lsn_buff;
318
parts[TRANSLOG_INTERNAL_PARTS + 0].length= LSN_STORE_SIZE;
319
trn->short_id= i % 0xFFFF;
320
if (translog_write_record(&lsn,
321
LOGREC_FIXED_RECORD_1LSN_EXAMPLE, trn, NULL,
322
LSN_STORE_SIZE, TRANSLOG_INTERNAL_PARTS + 1,
325
fprintf(stderr, "1 Can't write reference before record #%lu\n",
328
ok(0, "write LOGREC_FIXED_RECORD_1LSN_EXAMPLE");
331
ok(1, "write LOGREC_FIXED_RECORD_1LSN_EXAMPLE");
332
lsn_store(lsn_buff, lsn_base);
334
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)lsn_buff;
335
parts[TRANSLOG_INTERNAL_PARTS + 0].length= LSN_STORE_SIZE;
336
parts[TRANSLOG_INTERNAL_PARTS + 1].str= (char*)long_buffer;
337
parts[TRANSLOG_INTERNAL_PARTS + 1].length= rec_len;
338
trn->short_id= i % 0xFFFF;
339
if (translog_write_record(&lsn,
340
LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE,
341
trn, NULL, LSN_STORE_SIZE + rec_len,
342
TRANSLOG_INTERNAL_PARTS + 2,
345
fprintf(stderr, "1 Can't write var reference before record #%lu\n",
348
ok(0, "write LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE");
351
ok(1, "write LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE");
355
lsn_store(lsn_buff, lsn_base);
356
lsn_store(lsn_buff + LSN_STORE_SIZE, first_lsn);
357
parts[TRANSLOG_INTERNAL_PARTS + 1].str= (char*)lsn_buff;
358
parts[TRANSLOG_INTERNAL_PARTS + 1].length= 23;
359
trn->short_id= i % 0xFFFF;
360
if (translog_write_record(&lsn,
361
LOGREC_FIXED_RECORD_2LSN_EXAMPLE,
362
trn, NULL, 23, TRANSLOG_INTERNAL_PARTS + 1,
365
fprintf(stderr, "0 Can't write reference before record #%lu\n",
368
ok(0, "write LOGREC_FIXED_RECORD_2LSN_EXAMPLE");
371
ok(1, "write LOGREC_FIXED_RECORD_2LSN_EXAMPLE");
372
lsn_store(lsn_buff, lsn_base);
373
lsn_store(lsn_buff + LSN_STORE_SIZE, first_lsn);
375
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)lsn_buff;
376
parts[TRANSLOG_INTERNAL_PARTS + 0].length= LSN_STORE_SIZE * 2;
377
parts[TRANSLOG_INTERNAL_PARTS + 1].str= (char*)long_buffer;
378
parts[TRANSLOG_INTERNAL_PARTS + 1].length= rec_len;
379
trn->short_id= i % 0xFFFF;
380
if (translog_write_record(&lsn,
381
LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE,
382
trn, NULL, LSN_STORE_SIZE * 2 + rec_len,
383
TRANSLOG_INTERNAL_PARTS + 2,
386
fprintf(stderr, "0 Can't write var reference before record #%lu\n",
389
ok(0, "write LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE");
392
ok(1, "write LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE");
394
int4store(long_tr_id, i);
395
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)long_tr_id;
396
parts[TRANSLOG_INTERNAL_PARTS + 0].length= 6;
397
trn->short_id= i % 0xFFFF;
398
if (translog_write_record(&lsn,
399
LOGREC_FIXED_RECORD_0LSN_EXAMPLE,
401
TRANSLOG_INTERNAL_PARTS + 1, parts, NULL, NULL))
403
fprintf(stderr, "Can't write record #%lu\n", (ulong) i);
405
ok(0, "write LOGREC_FIXED_RECORD_0LSN_EXAMPLE");
408
ok(1, "write LOGREC_FIXED_RECORD_0LSN_EXAMPLE");
413
parts[TRANSLOG_INTERNAL_PARTS + 0].str= (char*)long_buffer;
414
parts[TRANSLOG_INTERNAL_PARTS + 0].length= rec_len;
415
trn->short_id= i % 0xFFFF;
416
if (translog_write_record(&lsn,
417
LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE,
419
TRANSLOG_INTERNAL_PARTS + 1, parts, NULL, NULL))
421
fprintf(stderr, "Can't write variable record #%lu\n", (ulong) i);
423
ok(0, "write LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE");
426
ok(1, "write LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE");
430
end_pagecache(&pagecache, 1);
431
ma_control_file_end();
433
if (ma_control_file_open(TRUE,TRUE))
435
fprintf(stderr, "pass2: Can't init control file (%d)\n", errno);
438
if ((pagen= init_pagecache(&pagecache, PCACHE_SIZE, 0, 0,
439
TRANSLOG_PAGE_SIZE, 0)) == 0)
441
fprintf(stderr, "pass2: Got error: init_pagecache() (errno: %d)\n", errno);
444
if (translog_init_with_table(".", LOG_FILE_SIZE, 50112, 0, &pagecache,
445
0, READONLY, &translog_example_table_init, 0))
447
fprintf(stderr, "pass2: Can't init loghandler (%d)\n", errno);
452
/* If we were writing sequence we need it only once */
455
seq_storage_rewind(&seq);
461
int len= translog_read_record_header(first_lsn, &rec);
462
if (len == RECHEADER_READ_ERROR)
464
fprintf(stderr, "translog_read_record_header failed (%d)\n", errno);
465
translog_free_record_header(&rec);
468
if (rec.type !=LOGREC_FIXED_RECORD_0LSN_EXAMPLE || rec.short_trid != 0 ||
469
rec.record_length != 6 || uint4korr(rec.header) != 0 ||
470
((uchar)rec.header[4]) != 0 || ((uchar)rec.header[5]) != 0xFF ||
471
first_lsn != rec.lsn)
473
fprintf(stderr, "Incorrect LOGREC_FIXED_RECORD_0LSN_EXAMPLE "
475
"type %u, strid %u, len %u, i: %u, 4: %u 5: %u, "
476
"lsn(0x%lu,0x%lx)\n",
477
(uint) rec.type, (uint) rec.short_trid, (uint) rec.record_length,
478
(uint)uint4korr(rec.header), (uint) rec.header[4],
479
(uint) rec.header[5],
480
LSN_IN_PARTS(rec.lsn));
481
translog_free_record_header(&rec);
484
ok(1, "read record");
485
translog_free_record_header(&rec);
487
if (translog_scanner_init(first_lsn, 1, &scanner, 0))
489
fprintf(stderr, "scanner init failed\n");
494
len= translog_read_next_record_header(&scanner, &rec);
495
if (len == RECHEADER_READ_ERROR)
497
fprintf(stderr, "1-%d translog_read_next_record_header failed (%d)\n",
499
translog_free_record_header(&rec);
502
if (len == RECHEADER_READ_EOF)
506
fprintf(stderr, "EOL met at iteration %u instead of %u\n",
508
translog_free_record_header(&rec);
517
ref= lsn_korr(rec.header);
518
if (rec.type != LOGREC_FIXED_RECORD_1LSN_EXAMPLE ||
519
rec.short_trid != (i % 0xFFFF) ||
520
rec.record_length != LSN_STORE_SIZE || ref != lsn)
522
fprintf(stderr, "Incorrect LOGREC_FIXED_RECORD_1LSN_EXAMPLE "
524
"type %u, strid %u, len %u, ref(%lu,0x%lx), lsn(%lu,0x%lx)\n",
525
i, (uint) rec.type, (uint) rec.short_trid,
526
(uint) rec.record_length,
527
LSN_IN_PARTS(ref), LSN_IN_PARTS(rec.lsn));
528
translog_free_record_header(&rec);
535
ref1= lsn_korr(rec.header);
536
ref2= lsn_korr(rec.header + LSN_STORE_SIZE);
537
if (rec.type != LOGREC_FIXED_RECORD_2LSN_EXAMPLE ||
538
rec.short_trid != (i % 0xFFFF) ||
539
rec.record_length != 23 ||
542
((uchar)rec.header[22]) != 0x55 ||
543
((uchar)rec.header[21]) != 0xAA ||
544
((uchar)rec.header[20]) != 0x55 ||
545
((uchar)rec.header[19]) != 0xAA ||
546
((uchar)rec.header[18]) != 0x55 ||
547
((uchar)rec.header[17]) != 0xAA ||
548
((uchar)rec.header[16]) != 0x55 ||
549
((uchar)rec.header[15]) != 0xAA ||
550
((uchar)rec.header[14]) != 0x55)
552
fprintf(stderr, "Incorrect LOGREC_FIXED_RECORD_2LSN_EXAMPLE "
554
"type %u, strid %u, len %u, ref1(%lu,0x%lx), "
555
"ref2(%lu,0x%lx) %x%x%x%x%x%x%x%x%x "
557
i, (uint) rec.type, (uint) rec.short_trid,
558
(uint) rec.record_length,
559
LSN_IN_PARTS(ref1), LSN_IN_PARTS(ref2),
560
(uint) rec.header[14], (uint) rec.header[15],
561
(uint) rec.header[16], (uint) rec.header[17],
562
(uint) rec.header[18], (uint) rec.header[19],
563
(uint) rec.header[20], (uint) rec.header[21],
564
(uint) rec.header[22],
565
LSN_IN_PARTS(rec.lsn));
566
translog_free_record_header(&rec);
571
ok(1, "read record");
572
translog_free_record_header(&rec);
574
len= translog_read_next_record_header(&scanner, &rec);
575
if (len == RECHEADER_READ_ERROR)
577
fprintf(stderr, "1-%d translog_read_next_record_header (var) "
578
"failed (%d)\n", i, errno);
581
if (len == RECHEADER_READ_EOF)
583
fprintf(stderr, "EOL met at the middle of iteration (first var) %u "
584
"instead of beginning of %u\n", i, ITERATIONS);
590
ref= lsn_korr(rec.header);
592
if (rec.type !=LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE ||
593
rec.short_trid != (i % 0xFFFF) ||
594
rec.record_length != rec_len + LSN_STORE_SIZE ||
595
len != 12 || ref != lsn ||
596
check_content(rec.header + LSN_STORE_SIZE, len - LSN_STORE_SIZE))
598
fprintf(stderr, "Incorrect LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE "
600
"type %u (%d), strid %u (%d), len %lu, %lu + 7 (%d), "
602
"ref(%lu,0x%lx), lsn(%lu,0x%lx) (%d), content: %d\n",
604
rec.type !=LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE,
605
(uint) rec.short_trid,
606
rec.short_trid != (i % 0xFFFF),
607
(ulong) rec.record_length, (ulong) rec_len,
608
rec.record_length != rec_len + LSN_STORE_SIZE,
611
LSN_IN_PARTS(ref), LSN_IN_PARTS(rec.lsn),
613
check_content(rec.header + LSN_STORE_SIZE,
614
len - LSN_STORE_SIZE));
615
translog_free_record_header(&rec);
618
if (read_and_check_content(&rec, long_buffer, LSN_STORE_SIZE))
621
"Incorrect LOGREC_VARIABLE_RECORD_1LSN_EXAMPLE "
622
"in whole rec read lsn(%lu,0x%lx)\n",
623
LSN_IN_PARTS(rec.lsn));
624
translog_free_record_header(&rec);
631
ref1= lsn_korr(rec.header);
632
ref2= lsn_korr(rec.header + LSN_STORE_SIZE);
634
if (rec.type != LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE ||
635
rec.short_trid != (i % 0xFFFF) ||
636
rec.record_length != rec_len + LSN_STORE_SIZE * 2 ||
640
check_content(rec.header + LSN_STORE_SIZE * 2,
641
len - LSN_STORE_SIZE * 2))
643
fprintf(stderr, "Incorrect LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE "
645
"type %u, strid %u, len %lu != %lu + 14, hdr len: %d, "
646
"ref1(%lu,0x%lx), ref2(%lu,0x%lx), "
648
i, (uint) rec.type, (uint) rec.short_trid,
649
(ulong) rec.record_length, (ulong) rec_len,
651
LSN_IN_PARTS(ref1), LSN_IN_PARTS(ref2),
652
LSN_IN_PARTS(rec.lsn));
653
translog_free_record_header(&rec);
656
if (read_and_check_content(&rec, long_buffer, LSN_STORE_SIZE * 2))
659
"Incorrect LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE "
660
"in whole rec read lsn(%lu,0x%lx)\n",
661
LSN_IN_PARTS(rec.lsn));
662
translog_free_record_header(&rec);
666
ok(1, "read record");
667
translog_free_record_header(&rec);
669
len= translog_read_next_record_header(&scanner, &rec);
670
if (len == RECHEADER_READ_ERROR)
672
fprintf(stderr, "1-%d translog_read_next_record_header failed (%d)\n",
674
translog_free_record_header(&rec);
677
if (len == RECHEADER_READ_EOF)
679
fprintf(stderr, "EOL met at the middle of iteration %u "
680
"instead of beginning of %u\n", i, ITERATIONS);
681
translog_free_record_header(&rec);
684
if (rec.type != LOGREC_FIXED_RECORD_0LSN_EXAMPLE ||
685
rec.short_trid != (i % 0xFFFF) ||
686
rec.record_length != 6 || uint4korr(rec.header) != i ||
687
((uchar)rec.header[4]) != 0 || ((uchar)rec.header[5]) != 0xFF)
689
fprintf(stderr, "Incorrect LOGREC_FIXED_RECORD_0LSN_EXAMPLE "
691
"type %u, strid %u, len %u, i: %u, 4: %u 5: %u "
693
i, (uint) rec.type, (uint) rec.short_trid,
694
(uint) rec.record_length,
695
(uint)uint4korr(rec.header), (uint) rec.header[4],
696
(uint) rec.header[5],
697
LSN_IN_PARTS(rec.lsn));
698
translog_free_record_header(&rec);
701
ok(1, "read record");
702
translog_free_record_header(&rec);
706
len= translog_read_next_record_header(&scanner, &rec);
708
if (rec.type != LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE ||
709
rec.short_trid != (i % 0xFFFF) ||
710
rec.record_length != rec_len ||
711
len != 9 || check_content(rec.header, len))
713
fprintf(stderr, "Incorrect LOGREC_VARIABLE_RECORD_0LSN_EXAMPLE "
715
"type %u, strid %u, len %lu != %lu, hdr len: %d, "
717
i, (uint) rec.type, (uint) rec.short_trid,
718
(ulong) rec.record_length, (ulong) rec_len,
719
len, LSN_IN_PARTS(rec.lsn));
720
translog_free_record_header(&rec);
723
if (read_and_check_content(&rec, long_buffer, 0))
726
"Incorrect LOGREC_VARIABLE_RECORD_2LSN_EXAMPLE "
727
"in whole rec read lsn(%lu,0x%lx)\n",
728
LSN_IN_PARTS(rec.lsn));
729
translog_free_record_header(&rec);
732
ok(1, "read record");
733
translog_free_record_header(&rec);
740
ok(0, "read record");
742
end_pagecache(&pagecache, 1);
743
ma_control_file_end();
744
free_defaults(default_argv);
745
seq_storage_destroy(&seq);
746
if (maria_log_remove())
749
return (test(exit_status()));
752
#include "../ma_check_standalone.h"