mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge
This commit is contained in:
@ -305,6 +305,15 @@ i ELT(j, '345', '34')
|
||||
1 345
|
||||
2 34
|
||||
DROP TABLE t1;
|
||||
create table t1(a char(4));
|
||||
insert into t1 values ('one'),(NULL),('two'),('four');
|
||||
select a, quote(a), isnull(quote(a)), quote(a) is null, ifnull(quote(a), 'n') from t1;
|
||||
a quote(a) isnull(quote(a)) quote(a) is null ifnull(quote(a), 'n')
|
||||
one 'one' 0 0 'one'
|
||||
NULL NULL 1 1 n
|
||||
two 'two' 0 0 'two'
|
||||
four 'four' 0 0 'four'
|
||||
drop table t1;
|
||||
select 1=_latin1'1';
|
||||
1=_latin1'1'
|
||||
1
|
||||
|
@ -193,3 +193,15 @@ Ok
|
||||
handler t close;
|
||||
use test;
|
||||
drop table t1;
|
||||
create table t1 ( a int, b int, INDEX a (a) );
|
||||
insert into t1 values (1,2), (2,1);
|
||||
handler t1 open;
|
||||
handler t1 read a=(1) where b=2;
|
||||
a b
|
||||
1 2
|
||||
handler t1 read a=(1) where b=3;
|
||||
a b
|
||||
handler t1 read a=(1) where b=1;
|
||||
a b
|
||||
handler t1 close;
|
||||
drop table t1;
|
||||
|
@ -1595,3 +1595,26 @@ t2 CREATE TABLE `t2` (
|
||||
CONSTRAINT `t2_ibfk_2` FOREIGN KEY (`b`) REFERENCES `t1` (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
drop table t2, t1;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 24
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 0
|
||||
create table t1 (a int) engine=innodb;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 25
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
begin;
|
||||
delete from t1;
|
||||
commit;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 26
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
drop table t1;
|
||||
|
@ -16,19 +16,4 @@ master_pos_wait('master-bin.001',3000)>=0
|
||||
select * from t1 where a=8000;
|
||||
a
|
||||
8000
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 1
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
begin;
|
||||
delete from t1;
|
||||
commit;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 2
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
drop table t1;
|
||||
|
@ -397,6 +397,11 @@ set ft_boolean_syntax = @@init_connect;
|
||||
ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
set global ft_boolean_syntax = @@init_connect;
|
||||
ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of ''
|
||||
set global myisam_max_sort_file_size=4294967296;
|
||||
show global variables like 'myisam_max_sort_file_size';
|
||||
Variable_name Value
|
||||
myisam_max_sort_file_size 4294967296
|
||||
set global myisam_max_sort_file_size=default;
|
||||
select @@global.max_user_connections,@@local.max_join_size;
|
||||
@@global.max_user_connections @@session.max_join_size
|
||||
100 200
|
||||
|
@ -172,6 +172,15 @@ INSERT INTO t1 VALUES (1,1),(2,2);
|
||||
SELECT DISTINCT i, ELT(j, '345', '34') FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# bug #3756: quote and NULL
|
||||
#
|
||||
|
||||
create table t1(a char(4));
|
||||
insert into t1 values ('one'),(NULL),('two'),('four');
|
||||
select a, quote(a), isnull(quote(a)), quote(a) is null, ifnull(quote(a), 'n') from t1;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Test collation and coercibility
|
||||
#
|
||||
|
@ -126,3 +126,15 @@ handler t close;
|
||||
use test;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# BUG#3649
|
||||
#
|
||||
create table t1 ( a int, b int, INDEX a (a) );
|
||||
insert into t1 values (1,2), (2,1);
|
||||
handler t1 open;
|
||||
handler t1 read a=(1) where b=2;
|
||||
handler t1 read a=(1) where b=3;
|
||||
handler t1 read a=(1) where b=1;
|
||||
handler t1 close;
|
||||
drop table t1;
|
||||
|
||||
|
@ -1106,4 +1106,37 @@ show create table t2;
|
||||
drop table t2, t1;
|
||||
|
||||
|
||||
#
|
||||
# Let us test binlog_cache_use and binlog_cache_disk_use status vars.
|
||||
# Actually this test has nothing to do with innodb per se, it just requires
|
||||
# transactional table.
|
||||
#
|
||||
show status like "binlog_cache_use";
|
||||
show status like "binlog_cache_disk_use";
|
||||
|
||||
create table t1 (a int) engine=innodb;
|
||||
|
||||
# Now we are going to create transaction which is long enough so its
|
||||
# transaction binlog will be flushed to disk...
|
||||
let $1=2000;
|
||||
disable_query_log;
|
||||
begin;
|
||||
while ($1)
|
||||
{
|
||||
eval insert into t1 values( $1 );
|
||||
dec $1;
|
||||
}
|
||||
commit;
|
||||
enable_query_log;
|
||||
show status like "binlog_cache_use";
|
||||
show status like "binlog_cache_disk_use";
|
||||
|
||||
# Transaction which should not be flushed to disk and so should not
|
||||
# increase binlog_cache_disk_use.
|
||||
begin;
|
||||
delete from t1;
|
||||
commit;
|
||||
show status like "binlog_cache_use";
|
||||
show status like "binlog_cache_disk_use";
|
||||
|
||||
drop table t1;
|
||||
|
@ -60,22 +60,6 @@ select * from t1 where a=8000;
|
||||
|
||||
connection master;
|
||||
|
||||
# binlog_cache_use and binlog_cache_disk_use status vars test
|
||||
# This test uses the previous test. Namely, it needs the long
|
||||
# transaction that adds 8000 lines to the t1 table.
|
||||
|
||||
show status like "binlog_cache_use";
|
||||
show status like "binlog_cache_disk_use";
|
||||
|
||||
# transaction which should not be flushed to disk and so should not
|
||||
# increase binlog_cache_disk_use
|
||||
begin;
|
||||
delete from t1;
|
||||
commit;
|
||||
|
||||
show status like "binlog_cache_use";
|
||||
show status like "binlog_cache_disk_use";
|
||||
|
||||
# The following DROP is a very important cleaning task:
|
||||
# imagine the next test is run with --skip-innodb: it will do
|
||||
# DROP TABLE IF EXISTS t1; but this will delete the frm and leave
|
||||
|
@ -286,6 +286,14 @@ set ft_boolean_syntax = @@init_connect;
|
||||
--error 1231
|
||||
set global ft_boolean_syntax = @@init_connect;
|
||||
|
||||
# Bug#3754 SET GLOBAL myisam_max_sort_file_size doesn't work as
|
||||
# expected: check that there is no overflow when 64-bit unsigned
|
||||
# variables are set
|
||||
|
||||
set global myisam_max_sort_file_size=4294967296;
|
||||
show global variables like 'myisam_max_sort_file_size';
|
||||
set global myisam_max_sort_file_size=default;
|
||||
|
||||
#
|
||||
# swap
|
||||
#
|
||||
|
Reference in New Issue
Block a user