Commit c4690d39 authored by Rich Prohaska's avatar Rich Prohaska

Merge branch 'master' into releases/tokudb-7.5

parents 4555904b 412be21f
drop table if exists t1,t2;
create table t1 (x int) engine=innodb;
lock table t1 read;
create temporary table t2 (x int) engine=tokudb;
insert into t2 values (1);
unlock tables;
drop table t1, t2;
set default_storage_engine=TokuDB;
drop table if exists t1;
CREATE TABLE t1(c1 INT,c2 CHAR)PARTITION BY KEY(c1) PARTITIONS 5;
insert INTO t1 values(1,1),(2,1),(2,2),(2,3);
ALTER TABLE t1 ADD UNIQUE INDEX i1(c1);
ERROR 23000: Can't write; duplicate key in table 't1'
drop table t1;
set default_storage_engine='tokudb';
drop table if exists t;
create table t (id int primary key);
set autocommit=OFF;
lock tables t write;
optimize table t;
Table Op Msg_type Msg_text
test.t optimize status OK
unlock tables;
drop table t;
# test for DB-762 and DB-767
source include/have_tokudb.inc;
source include/have_innodb.inc;
disable_warnings;
drop table if exists t1,t2;
enable_warnings;
create table t1 (x int) engine=innodb;
lock table t1 read;
create temporary table t2 (x int) engine=tokudb;
insert into t2 values (1);
unlock tables;
drop table t1, t2;
# reproducer for DB-766
source include/have_tokudb.inc;
source include/have_partition.inc;
set default_storage_engine=TokuDB;
disable_warnings;
drop table if exists t1;
enable_warnings;
CREATE TABLE t1(c1 INT,c2 CHAR)PARTITION BY KEY(c1) PARTITIONS 5;
insert INTO t1 values(1,1),(2,1),(2,2),(2,3);
--error ER_DUP_KEY
ALTER TABLE t1 ADD UNIQUE INDEX i1(c1);
drop table t1;
\ No newline at end of file
# test case for DB-768
source include/have_tokudb.inc;
set default_storage_engine='tokudb';
disable_warnings;
drop table if exists t;
enable_warnings;
create table t (id int primary key);
set autocommit=OFF;
lock tables t write;
optimize table t;
unlock tables;
drop table t;
......@@ -5980,6 +5980,8 @@ int ha_tokudb::extra(enum ha_extra_function operation) {
case HA_EXTRA_NO_IGNORE_NO_KEY:
using_ignore_no_key = false;
break;
case HA_EXTRA_NOT_USED:
break; // must do nothing and return 0
default:
break;
}
......@@ -6225,7 +6227,11 @@ int ha_tokudb::start_stmt(THD * thd, thr_lock_type lock_type) {
int error = 0;
tokudb_trx_data *trx = (tokudb_trx_data *) thd_get_ha_data(thd, tokudb_hton);
DBUG_ASSERT(trx);
if (!trx) {
error = create_tokudb_trx_data_instance(&trx);
if (error) { goto cleanup; }
thd_set_ha_data(thd, tokudb_hton, trx);
}
/*
note that trx->stmt may have been already initialized as start_stmt()
......
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