mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-27 05:56:07 +03:00 
			
		
		
		
	- Renamed "Using join cache" to "Using join buffer". - "Using join buffer" is now printed on the last table that "reads" from the join buffer cache. mysql-test/r/archive_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/compress.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ctype_utf8.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/derived.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/distinct.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/func_group.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/func_group_innodb.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/greedy_optimizer.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/group_by.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/group_min_max.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/index_merge_myisam.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/information_schema.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/innodb_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/innodb_mysql.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/join.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/join_nested.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/key_diff.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/myisam.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ndb_condition_pushdown.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ndb_gis.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/range.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/row.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/select.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ssl.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/ssl_compress.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/subselect.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/subselect3.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/union.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. mysql-test/r/view.result: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch. sql/sql_select.cc: Bug #27531: renamed "Using join cache" to "Using join buffer" and moved to the last table in the batch.
		
			
				
	
	
		
			148 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			148 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| create table t1 (USR_ID integer not null, MAX_REQ integer not null, constraint PK_SEA_USER primary key (USR_ID)) engine=InnoDB;
 | |
| insert into t1 values (1, 3);
 | |
| select count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ from t1 group by MAX_REQ;
 | |
| count(*) + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ + MAX_REQ - MAX_REQ
 | |
| 1
 | |
| select Case When Count(*) < MAX_REQ Then 1 Else 0 End from t1 where t1.USR_ID = 1 group by MAX_REQ;
 | |
| Case When Count(*) < MAX_REQ Then 1 Else 0 End
 | |
| 1
 | |
| drop table t1;
 | |
| create table t1m (a int) engine=myisam;
 | |
| create table t1i (a int) engine=innodb;
 | |
| create table t2m (a int) engine=myisam;
 | |
| create table t2i (a int) engine=innodb;
 | |
| insert into t2m values (5);
 | |
| insert into t2i values (5);
 | |
| select min(a) from t1m;
 | |
| min(a)
 | |
| NULL
 | |
| select min(7) from t1m;
 | |
| min(7)
 | |
| NULL
 | |
| select min(7) from DUAL;
 | |
| min(7)
 | |
| 7
 | |
| explain select min(7) from t2m join t1m;
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 | |
| select min(7) from t2m join t1m;
 | |
| min(7)
 | |
| NULL
 | |
| select max(a) from t1m;
 | |
| max(a)
 | |
| NULL
 | |
| select max(7) from t1m;
 | |
| max(7)
 | |
| NULL
 | |
| select max(7) from DUAL;
 | |
| max(7)
 | |
| 7
 | |
| explain select max(7) from t2m join t1m;
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	NULL	NULL	NULL	NULL	NULL	NULL	NULL	Select tables optimized away
 | |
| select max(7) from t2m join t1m;
 | |
| max(7)
 | |
| NULL
 | |
| select 1, min(a) from t1m where a=99;
 | |
| 1	min(a)
 | |
| 1	NULL
 | |
| select 1, min(a) from t1m where 1=99;
 | |
| 1	min(a)
 | |
| 1	NULL
 | |
| select 1, min(1) from t1m where a=99;
 | |
| 1	min(1)
 | |
| 1	NULL
 | |
| select 1, min(1) from t1m where 1=99;
 | |
| 1	min(1)
 | |
| 1	NULL
 | |
| select 1, max(a) from t1m where a=99;
 | |
| 1	max(a)
 | |
| 1	NULL
 | |
| select 1, max(a) from t1m where 1=99;
 | |
| 1	max(a)
 | |
| 1	NULL
 | |
| select 1, max(1) from t1m where a=99;
 | |
| 1	max(1)
 | |
| 1	NULL
 | |
| select 1, max(1) from t1m where 1=99;
 | |
| 1	max(1)
 | |
| 1	NULL
 | |
| select min(a) from t1i;
 | |
| min(a)
 | |
| NULL
 | |
| select min(7) from t1i;
 | |
| min(7)
 | |
| NULL
 | |
| select min(7) from DUAL;
 | |
| min(7)
 | |
| 7
 | |
| explain select min(7) from t2i join t1i;
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	t2i	ALL	NULL	NULL	NULL	NULL	1	
 | |
| 1	SIMPLE	t1i	ALL	NULL	NULL	NULL	NULL	1	Using join buffer
 | |
| select min(7) from t2i join t1i;
 | |
| min(7)
 | |
| NULL
 | |
| select max(a) from t1i;
 | |
| max(a)
 | |
| NULL
 | |
| select max(7) from t1i;
 | |
| max(7)
 | |
| NULL
 | |
| select max(7) from DUAL;
 | |
| max(7)
 | |
| 7
 | |
| explain select max(7) from t2i join t1i;
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	t2i	ALL	NULL	NULL	NULL	NULL	1	
 | |
| 1	SIMPLE	t1i	ALL	NULL	NULL	NULL	NULL	1	Using join buffer
 | |
| select max(7) from t2i join t1i;
 | |
| max(7)
 | |
| NULL
 | |
| select 1, min(a) from t1i where a=99;
 | |
| 1	min(a)
 | |
| 1	NULL
 | |
| select 1, min(a) from t1i where 1=99;
 | |
| 1	min(a)
 | |
| 1	NULL
 | |
| select 1, min(1) from t1i where a=99;
 | |
| 1	min(1)
 | |
| 1	NULL
 | |
| select 1, min(1) from t1i where 1=99;
 | |
| 1	min(1)
 | |
| 1	NULL
 | |
| select 1, max(a) from t1i where a=99;
 | |
| 1	max(a)
 | |
| 1	NULL
 | |
| select 1, max(a) from t1i where 1=99;
 | |
| 1	max(a)
 | |
| 1	NULL
 | |
| select 1, max(1) from t1i where a=99;
 | |
| 1	max(1)
 | |
| 1	NULL
 | |
| select 1, max(1) from t1i where 1=99;
 | |
| 1	max(1)
 | |
| 1	NULL
 | |
| explain select count(*), min(7), max(7) from t1m, t1i;
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	t1m	system	NULL	NULL	NULL	NULL	0	const row not found
 | |
| 1	SIMPLE	t1i	ALL	NULL	NULL	NULL	NULL	1	
 | |
| select count(*), min(7), max(7) from t1m, t1i;
 | |
| count(*)	min(7)	max(7)
 | |
| 0	NULL	NULL
 | |
| explain select count(*), min(7), max(7) from t1m, t2i;
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	t1m	system	NULL	NULL	NULL	NULL	0	const row not found
 | |
| 1	SIMPLE	t2i	ALL	NULL	NULL	NULL	NULL	1	
 | |
| select count(*), min(7), max(7) from t1m, t2i;
 | |
| count(*)	min(7)	max(7)
 | |
| 0	NULL	NULL
 | |
| explain select count(*), min(7), max(7) from t2m, t1i;
 | |
| id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 | |
| 1	SIMPLE	t2m	system	NULL	NULL	NULL	NULL	1	
 | |
| 1	SIMPLE	t1i	ALL	NULL	NULL	NULL	NULL	1	
 | |
| select count(*), min(7), max(7) from t2m, t1i;
 | |
| count(*)	min(7)	max(7)
 | |
| 0	NULL	NULL
 | |
| drop table t1m, t1i, t2m, t2i;
 |