mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
9cba6c5aa3
This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
69 lines
2.5 KiB
SQL
69 lines
2.5 KiB
SQL
--echo #
|
|
--echo # mdev-539: fast build of unique/primary indexes for MyISAM/Aria
|
|
--echo #
|
|
|
|
--source include/default_charset.inc
|
|
|
|
call mtr.add_suppression("Can't find record in '.*'");
|
|
|
|
--disable_warnings
|
|
DROP DATABASE IF EXISTS dbt3_s001;
|
|
--enable_warnings
|
|
CREATE DATABASE dbt3_s001;
|
|
|
|
use dbt3_s001;
|
|
|
|
--disable_query_log
|
|
--disable_result_log
|
|
--disable_warnings
|
|
--source include/dbt3_s001.inc
|
|
--enable_warnings
|
|
--enable_result_log
|
|
--enable_query_log
|
|
|
|
|
|
drop index `primary` on lineitem;
|
|
show create table lineitem;
|
|
alter table lineitem add primary key (l_orderkey, l_linenumber);
|
|
show create table lineitem;
|
|
drop index `primary` on lineitem;
|
|
select * from lineitem where l_orderkey=1 and l_linenumber=2;
|
|
insert into lineitem values
|
|
(1,68,9,2,36,34850.16,0.07,0.06,'N','O','1996-04-12','1996-02-28','1996-04-20','TAKE BACK RETURN','MAIL','slyly bold pinto beans detect s');
|
|
select * from lineitem where l_orderkey=1 and l_linenumber=2;
|
|
--error ER_DUP_ENTRY
|
|
alter table lineitem add primary key (l_orderkey, l_linenumber);
|
|
show create table lineitem;
|
|
select * from lineitem where l_orderkey=1 and l_linenumber=2;
|
|
delete from lineitem where l_orderkey=1 and l_linenumber=2 and l_discount=0.07;
|
|
alter table lineitem add primary key (l_orderkey, l_linenumber);
|
|
show create table lineitem;
|
|
select * from lineitem where l_orderkey=1 and l_linenumber=2;
|
|
|
|
create unique index i_c_name on customer(c_name);
|
|
show create table customer;
|
|
select * from customer where c_name='Customer#000000003';
|
|
drop index i_c_name on customer;
|
|
insert into customer values
|
|
(303,'Customer#000000003','MG9kdTD2WBHm',1,'11-719-748-3364',7498.12,'AUTOMOBILE','special packages wake. slyly reg');
|
|
select * from customer where c_name='Customer#000000003';
|
|
--error ER_DUP_ENTRY
|
|
alter table customer add unique index i_c_name(c_name);
|
|
show create table customer;
|
|
select * from customer where c_name='Customer#000000003';
|
|
delete from customer where c_custkey=303;
|
|
select * from customer where c_name='Customer#000000003';
|
|
alter table customer add unique index i_c_name(c_name);
|
|
show create table customer;
|
|
select * from customer where c_name='Customer#000000003';
|
|
|
|
drop index `primary` on customer;
|
|
show create table customer;
|
|
insert into customer values
|
|
(3,'Customer#000000303','MG9kdTD2WBHm',1,'11-719-748-3364',7498.12,'AUTOMOBILE','special packages wake. slyly reg');
|
|
alter ignore table customer add primary key (c_custkey);
|
|
show create table customer;
|
|
select * from customer where c_custkey=3;
|
|
--source include/restore_charset.inc
|
|
DROP DATABASE dbt3_s001;
|
|
|