Commit 6f829a4f authored by unknown's avatar unknown

Merge gbichot@bk-internal.mysql.com:/home/bk/mysql-maria

into  gbichot4.local:/home/mysql_src/mysql-maria-monty

parents 86b7194c c9a82581
This diff is collapsed.
This diff is collapsed.
set global maria_log_file_size=4294967295;
drop database if exists mysqltest;
create database mysqltest;
use mysqltest;
* shut down mysqld, removed logs, restarted it
use mysqltest;
CREATE TABLE t1 (
line LINESTRING NOT NULL,
kind ENUM('po', 'pp', 'rr', 'dr', 'rd', 'ts', 'cl') NOT NULL DEFAULT 'po',
name VARCHAR(32)
,SPATIAL key (line)
) transactional=1 row_format=page engine=maria;
SHOW INDEX FROM t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 line 1 line A NULL 32 NULL SPATIAL
CREATE TABLE t2 (a VARCHAR(200), b TEXT, FULLTEXT (a,b)
) transactional=1 row_format=page engine=maria;
SHOW INDEX FROM t2;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t2 1 a 1 a NULL NULL NULL NULL YES FULLTEXT
t2 1 a 2 b NULL NULL NULL NULL YES FULLTEXT
* TEST of REDO: see if recovery can reconstruct if we give it an old table
* copied t2 for feeding_recovery
* copied t1 for feeding_recovery
flush table t2;
* copied t2 for comparison
flush table t1;
* copied t1 for comparison
SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
* crashing mysqld intentionally
set global maria_checkpoint_interval=1;
ERROR HY000: Lost connection to MySQL server during query
* copied t2 back for feeding_recovery
* copied t1 back for feeding_recovery
* recovery happens
check table t2 extended;
Table Op Msg_type Msg_text
mysqltest.t2 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
check table t1 extended;
Table Op Msg_type Msg_text
mysqltest.t1 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
use mysqltest;
* TEST of INSERT and DELETE's rollback
flush table t2;
* copied t2 for comparison
flush table t1;
* copied t1 for comparison
lock tables t1 write, t2 write;
SET SESSION debug="+d,maria_crash";
* crashing mysqld intentionally
set global maria_checkpoint_interval=1;
ERROR HY000: Lost connection to MySQL server during query
* recovery happens
check table t2 extended;
Table Op Msg_type Msg_text
mysqltest.t2 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
check table t1 extended;
Table Op Msg_type Msg_text
mysqltest.t1 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
use mysqltest;
flush table t2;
* copied t2 for comparison
flush table t1;
* copied t1 for comparison
lock tables t1 write, t2 write;
SET SESSION debug="+d,maria_flush_whole_page_cache,maria_crash";
* crashing mysqld intentionally
set global maria_checkpoint_interval=1;
ERROR HY000: Lost connection to MySQL server during query
* recovery happens
check table t2 extended;
Table Op Msg_type Msg_text
mysqltest.t2 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
check table t1 extended;
Table Op Msg_type Msg_text
mysqltest.t1 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
use mysqltest;
flush table t2;
* copied t2 for comparison
flush table t1;
* copied t1 for comparison
lock tables t1 write, t2 write;
SET SESSION debug="+d,maria_flush_states,maria_flush_whole_log,maria_crash";
* crashing mysqld intentionally
set global maria_checkpoint_interval=1;
ERROR HY000: Lost connection to MySQL server during query
* recovery happens
check table t2 extended;
Table Op Msg_type Msg_text
mysqltest.t2 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
check table t1 extended;
Table Op Msg_type Msg_text
mysqltest.t1 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
use mysqltest;
flush table t2;
* copied t2 for comparison
flush table t1;
* copied t1 for comparison
lock tables t1 write, t2 write;
SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
* crashing mysqld intentionally
set global maria_checkpoint_interval=1;
ERROR HY000: Lost connection to MySQL server during query
* recovery happens
check table t2 extended;
Table Op Msg_type Msg_text
mysqltest.t2 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
check table t1 extended;
Table Op Msg_type Msg_text
mysqltest.t1 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
use mysqltest;
flush table t2;
* copied t2 for comparison
flush table t1;
* copied t1 for comparison
lock tables t1 write, t2 write;
select count(*) from t1;
count(*)
1080
delete from t1;
select count(*) from t1;
count(*)
782
select count(*) from t2;
count(*)
720
delete from t2;
select count(*) from t2;
count(*)
0
SET SESSION debug="+d,maria_flush_whole_log,maria_crash";
* crashing mysqld intentionally
set global maria_checkpoint_interval=1;
ERROR HY000: Lost connection to MySQL server during query
* recovery happens
check table t2 extended;
Table Op Msg_type Msg_text
mysqltest.t2 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
check table t1 extended;
Table Op Msg_type Msg_text
mysqltest.t1 check status OK
* testing that checksum after recovery is as expected
Checksum-check
ok
use mysqltest;
drop table t1,t2;
...@@ -2195,13 +2195,6 @@ t1 CREATE TABLE `t1` ( ...@@ -2195,13 +2195,6 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL `a` int(11) DEFAULT NULL
) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 ) ENGINE=MARIA DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1
drop table t1; drop table t1;
create table t1 (s varchar(25), fulltext(s)) TRANSACTIONAL= 1;
ERROR HY000: Maria can't yet handle SPATIAL or FULLTEXT keys in transactional mode. For now use TRANSACTIONAL=0
drop table if exists t1;
create table t1 ( fid int not null auto_increment primary key,
g geometry not null, spatial key(g));
ERROR HY000: Maria can't yet handle SPATIAL or FULLTEXT keys in transactional mode. For now use TRANSACTIONAL=0
drop table if exists t1;
set global maria_log_file_size=4294967296; set global maria_log_file_size=4294967296;
Warnings: Warnings:
Warning 1292 Truncated incorrect log_file_size value: '4294967296' Warning 1292 Truncated incorrect log_file_size value: '4294967296'
......
This diff is collapsed.
This diff is collapsed.
--skip-stack-trace --skip-core-file
This diff is collapsed.
...@@ -1410,18 +1410,6 @@ create table t1 (a int); ...@@ -1410,18 +1410,6 @@ create table t1 (a int);
show create table t1; show create table t1;
drop table t1; drop table t1;
#
# Show that we can't yet create fulltext or spatial index with Maria
#
--error 138
create table t1 (s varchar(25), fulltext(s)) TRANSACTIONAL= 1;
drop table if exists t1;
--error 138
create table t1 ( fid int not null auto_increment primary key,
g geometry not null, spatial key(g));
drop table if exists t1;
# #
# Test warning on log file size truncates # Test warning on log file size truncates
# #
......
This diff is collapsed.
...@@ -4442,7 +4442,16 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param) ...@@ -4442,7 +4442,16 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param)
for (;;) for (;;)
{ {
int flag; int flag;
/*
Assume table is transactional and it had LSN pages in the
cache. Repair has flushed them, left data pages stay in
cache, and disabled transactionality (so share's current page
type is PLAIN); page cache would assert if it finds a cached LSN page
while _ma_scan_block_record() requested a PLAIN page. So we use
UNKNOWN.
*/
enum pagecache_page_type save_page_type= share->page_type;
share->page_type= PAGECACHE_READ_UNKNOWN_PAGE;
if (info != sort_info->new_info) if (info != sort_info->new_info)
{ {
/* Safe scanning */ /* Safe scanning */
...@@ -4459,6 +4468,7 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param) ...@@ -4459,6 +4468,7 @@ static int sort_get_next_record(MARIA_SORT_PARAM *sort_param)
flag= _ma_scan_block_record(info, sort_param->record, flag= _ma_scan_block_record(info, sort_param->record,
info->cur_row.nextpos, 1); info->cur_row.nextpos, 1);
} }
share->page_type= save_page_type;
if (!flag) if (!flag)
{ {
if (sort_param->calc_checksum) if (sort_param->calc_checksum)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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