File: db917.test

package info (click to toggle)
mariadb-10.0 10.0.32-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 476,064 kB
  • sloc: cpp: 1,400,131; ansic: 832,140; perl: 54,391; sh: 41,304; pascal: 32,365; yacc: 14,921; xml: 5,257; sql: 4,667; cs: 4,647; makefile: 4,555; ruby: 4,465; python: 2,292; lex: 1,427; java: 941; asm: 295; awk: 54; php: 22; sed: 16
file content (23 lines) | stat: -rw-r--r-- 975 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# test DB-917
# test that table/share open lock timeout does not crash the server on subsequent access
source include/have_partition.inc;
source include/have_tokudb.inc;
disable_warnings;
drop table if exists t1;
enable_warnings;
set @orig_table_open_cache = @@global.table_open_cache;
create table t1(a int) engine = tokudb partition by key(a) partitions 2 (partition p0 engine = tokudb, partition p1 engine = tokudb);
lock tables t1 read;
set @@global.table_open_cache = 1;
begin;
insert into t1 values(1),(1);
# when the bug is present, this results in a lock wait timeout
--error ER_BAD_FIELD_ERROR
select * from t1 where c like _ucs2 0x039C0025 collate ucs2_unicode_ci;
# when the bug exists, this results in the assertion
# kc_info->cp_info[keynr] == NULL in tokudb/ha_tokudb.cc initialize_col_pack_info
--error ER_TABLE_EXISTS_ERROR
create table t1(c1 binary (1), c2 varbinary(1));
unlock tables;
drop table t1;
set @@global.table_open_cache = @orig_table_open_cache;