~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/tests/t/myisam.test

[patch 109/129] Merge patch for revision 1921 from InnoDB SVN:
revno: 1921
revision-id: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6160
parent: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6159
committer: vasil
timestamp: Wed 2009-11-11 13:33:49 +0000
message:
  branches/zip: Merge r6152:6159 from branches/5.1:
  
  (r6158 was skipped as an equivallent change has already been merged from MySQL)
  
    ------------------------------------------------------------------------
    r6154 | calvin | 2009-11-11 02:51:17 +0200 (Wed, 11 Nov 2009) | 17 lines
    Changed paths:
       M /branches/5.1/include/os0file.h
       M /branches/5.1/os/os0file.c
    
    branches/5.1: fix bug#3139: Mysql crashes: 'windows error 995'
    after several selects on a large DB
    
    During stress environment, Windows AIO may fail with error code
    ERROR_OPERATION_ABORTED. InnoDB does not handle the error, rather
    crashes. The cause of the error is unknown, but likely due to
    faulty hardware or driver.
    
    This patch introduces a new error code OS_FILE_OPERATION_ABORTED,
    which maps to Windows ERROR_OPERATION_ABORTED (995). When the error
    is detected during AIO, the InnoDB will issue a synchronous retry
    (read/write).
    
    This patch has been extensively tested by MySQL support.
    
    Approved by: Marko
    rb://196
    ------------------------------------------------------------------------
    r6158 | vasil | 2009-11-11 14:52:14 +0200 (Wed, 11 Nov 2009) | 37 lines
    Changed paths:
       M /branches/5.1/handler/ha_innodb.cc
       M /branches/5.1/handler/ha_innodb.h
    
    branches/5.1:
    
    Merge a change from MySQL:
    (this has been reviewed by Calvin and Marko, and Calvin says Luis has
    incorporated Marko's suggestions)
    
      ------------------------------------------------------------
      revno: 3092.5.1
      committer: Luis Soares <luis.soares@sun.com>
      branch nick: mysql-5.1-bugteam
      timestamp: Thu 2009-09-24 15:52:52 +0100
      message:
        BUG#42829: binlogging enabled for all schemas regardless of
        binlog-db-db / binlog-ignore-db
              
        InnoDB will return an error if statement based replication is used
        along with transaction isolation level READ-COMMITTED (or weaker),
        even if the statement in question is filtered out according to the
        binlog-do-db rules set. In this case, an error should not be printed.
              
        This patch addresses this issue by extending the existing check in
        external_lock to take into account the filter rules before deciding to
        print an error. Furthermore, it also changes decide_logging_format to
        take into consideration whether the statement is filtered out from 
        binlog before decision is made.
      added:
        mysql-test/suite/binlog/r/binlog_stm_do_db.result
        mysql-test/suite/binlog/t/binlog_stm_do_db-master.opt
        mysql-test/suite/binlog/t/binlog_stm_do_db.test
      modified:
        sql/sql_base.cc
        sql/sql_class.cc
        storage/innobase/handler/ha_innodb.cc
        storage/innobase/handler/ha_innodb.h
        storage/innodb_plugin/handler/ha_innodb.cc
        storage/innodb_plugin/handler/ha_innodb.h
    
    ------------------------------------------------------------------------
modified:
  include/os0file.h              2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Finclude%2Fos0file.h
  os/os0file.c                   2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Fos%2Fos0file.c
diff:
=== modified file 'include/os0file.h'

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
# Test problem with rows that are 65517-65520 bytes long
31
31
#
32
32
 
33
 
create temporary table t1 (a int not null auto_increment, b blob not null, primary key (a)) engine=myisam;
 
33
create table t1 (a int not null auto_increment, b blob not null, primary key (a));
34
34
 
35
35
let $1=100;
36
36
disable_query_log;
342
342
 
343
343
CREATE TEMPORARY TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a)) ENGINE=MyISAM;
344
344
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
345
 
create temporary table t2 (a int not null, b int, c int, key(b), key(c), key(a)) engine=myisam;
 
345
create table t2 (a int not null, b int, c int, key(b), key(c), key(a));
346
346
INSERT into t2 values (1,1,1), (2,2,2);
347
347
alter table t1 ENGINE=MYISAM;
348
348
show index from t1;
361
361
# Test bug when updating a split dynamic row where keys are not changed
362
362
#
363
363
 
364
 
create temporary table t1 (a int not null auto_increment primary key, b varchar(255)) engine=myisam;
 
364
create table t1 (a int not null auto_increment primary key, b varchar(255));
365
365
insert into t1 (b) values (repeat('a',100)),(repeat('b',100)),(repeat('c',100));
366
366
update t1 set b=repeat(left(b,1),200) where a=1;
367
367
 
441
441
#
442
442
# Verify blob handling
443
443
#
444
 
create temporary table t1 (a blob) engine=myisam;
 
444
create table t1 (a blob);
445
445
insert into t1 values('a '),('a');
446
446
select concat(a,'.') from t1 where a='a';
447
447
select concat(a,'.') from t1 where a='a ';
453
453
#
454
454
# Test text and unique
455
455
#
456
 
create temporary table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))) engine=myisam;
 
456
create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20)));
457
457
insert into t1 (b) values ('a'),('b'),('c');
458
458
select concat(b,'.') from t1;
459
459
update t1 set b='b ' where a=2;
469
469
#
470
470
# Test keys with 0 segments. (Bug #3203)
471
471
#
472
 
create temporary table t1 (a int not null) engine=myisam;
473
 
create temporary table t2 (a int not null, primary key (a)) engine=myisam;
 
472
create table t1 (a int not null);
 
473
create table t2 (a int not null, primary key (a));
474
474
insert into t1 values (1);
475
475
insert into t2 values (1),(2);
476
476
select sql_big_result distinct t1.a from t1,t2 order by t2.a;
494
494
 
495
495
# End of 4.0 tests
496
496
 
497
 
create temporary table t1 (a int, b varchar(200), c text not null) engine=myisam;
498
 
create temporary table t2 (a int, b varchar(200), c text not null) engine=myisam;
 
497
create table t1 (a int, b varchar(200), c text not null);
 
498
create table t2 (a int, b varchar(200), c text not null);
499
499
insert t1 values (1, "aaa", "bbb"), (NULL, "", "ccccc"), (0, NULL, "");
500
500
insert t2 select * from t1;
501
501
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
531
531
#
532
532
# index search for NULL in blob. Bug #4816
533
533
#
534
 
create temporary table t1 ( a tinytext, b char(1), index idx (a(1),b) ) engine=myisam;
 
534
create table t1 ( a tinytext, b char(1), index idx (a(1),b) );
535
535
insert into t1 values (null,''), (null,'');
536
536
explain select count(*) from t1 where a is null;
537
537
select count(*) from t1 where a is null;
540
540
#
541
541
# bug9188 - Corruption Can't open file: 'table.MYI' (errno: 145)
542
542
#
543
 
create temporary table t1 (c1 int, c2 varchar(4) not null default '',
544
 
                 key(c2(3))) engine=myisam;
 
543
create table t1 (c1 int, c2 varchar(4) not null default '',
 
544
                 key(c2(3)));
545
545
insert into t1 values (1,'A'), (2, 'B'), (3, 'A');
546
546
update t1 set c2='A  B' where c1=2;
547
547
check table t1;
549
549
 
550
550
# BUG#13814 - key value packed incorrectly for TINYBLOBs
551
551
 
552
 
create temporary table t1(
 
552
create table t1(
553
553
  cip INT NOT NULL,
554
554
  score INT NOT NULL DEFAULT 0,
555
555
  bob TINYBLOB
556
 
) engine=myisam;
 
556
);
557
557
 
558
558
insert into t1 (cip) VALUES (1), (2), (3);
559
559
insert into t1 (cip, bob) VALUES (4, 'a' ), (5, 'b'), 
821
821
 
822
822
# BUG#9622 - ANALYZE TABLE and ALTER TABLE .. ENABLE INDEX produce
823
823
# different statistics on the same table with NULL values.
824
 
create temporary table t1 (a int, key(a)) engine=myisam;
 
824
create table t1 (a int, key(a));
825
825
 
826
826
insert into t1 values (1),(2),(3),(4),(NULL),(NULL),(NULL),(NULL);
827
827
analyze table t1;