403Webshell
Server IP : 172.67.216.182  /  Your IP : 162.158.189.137
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/src/mysql-test/suite/ndb/r/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/ndb/r/ndb_dbug_tc_select.result
drop table if exists t1,t2;
#
# Test tc select with 2-way joins with unique lookups
#
create table t1 (a int key, b int) engine ndb;
create table t2 (a int, b int, c int, d int, primary key(a,b), unique(d)) engine ndb partition by key(a);
#
# 2-way join tc selection in pk
#
explain select t2.c from t1,t2 where t1.a=50 and t2.a=t1.a and t2.b=t1.b;
id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
1	SIMPLE	t1	p0,p1,p2,p3,p4,p5,p6,p7	eq_ref	PRIMARY	PRIMARY	4	const	#	#	Parent of 2 pushed join@1; Using where with pushed condition (`test`.`t1`.`b` is not null)
1	SIMPLE	t2	p2	eq_ref	PRIMARY	PRIMARY	8	const,test.t1.b	#	#	Child of 't1' in pushed join@1
Warnings:
Note	1003	/* select#1 */ select `test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t1`.`a` = 50) and (`test`.`t2`.`a` = 50))
#
# 2-way join tc selection in unique key
#
explain select t1.b from t1,t2 where t2.d=50 and t1.a=t2.a;
id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
1	SIMPLE	t2	p0,p1,p2,p3,p4,p5,p6,p7	ref	PRIMARY,d	d	5	const	#	#	Parent of 2 pushed join@1
1	SIMPLE	t1	p0,p1,p2,p3,p4,p5,p6,p7	eq_ref	PRIMARY	PRIMARY	4	test.t2.a	#	#	Child of 't2' in pushed join@1
Warnings:
Note	1003	/* select#1 */ select `test`.`t1`.`b` AS `b` from `test`.`t1` join `test`.`t2` where ((`test`.`t1`.`a` = `test`.`t2`.`a`) and (`test`.`t2`.`d` = 50))
drop table t1,t2;
#
# Test tc select with 2-way joins with scan followed by unique lookup
#
create table t1 (a int, b int, primary key(a,b)) engine ndb partition by key (a);
create table t2 (a int, b int, c int, primary key(a,b)) engine ndb partition by key (a);
explain select t2.c from t1,t2 where t1.a=50 and t2.a=t1.a and t2.b=t1.b;
id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	filtered	Extra
1	SIMPLE	t1	p2	ref	PRIMARY	PRIMARY	4	const	#	#	Parent of 2 pushed join@1
1	SIMPLE	t2	p2	eq_ref	PRIMARY	PRIMARY	8	const,test.t1.b	#	#	Child of 't1' in pushed join@1
Warnings:
Note	1003	/* select#1 */ select `test`.`t2`.`c` AS `c` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`b` = `test`.`t1`.`b`) and (`test`.`t1`.`a` = 50) and (`test`.`t2`.`a` = 50))
drop table t1,t2;
create table t1 (a int , b varchar(22), c int, primary key(a), unique(b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a varchar(1024), b int , c int, primary key(a), unique(b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a varchar(32), b varchar(257), c int, primary key(a), unique(b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a int , b int, c int, d int, primary key(a,c), unique(c,b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a int, b char(22) , c char(12), d int, primary key(a,c), unique(c,b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a varchar(32), b int, c varchar(257), d int, primary key(a,c), unique(c,b)) engine ndb;
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a int , b int, c int, d int, e int, primary key(a,c,e), unique(c,b,d)) engine ndb partition by key(c,e);
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a int, b varchar(22) , c char(12), d int, e varchar(257), primary key(a,c,e), unique(c,b,d)) engine ndb partition by key(c,e);
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;
create table t1 (a varchar(1024), b char(22), c varchar(257), d int, e char(12), primary key(a,c,e), unique(c,b,d)) engine ndb partition by key(c,e);
# verify tc select on insert using simple int key
# verify tc select on select using simple pk int key
# verify tc select on select using simple unique int key
# verify tc select on update using simple pk int key
# verify tc select on update using simple unique int key
# verify tc select on delete using simple pk int key
# verify tc select on delete using simple unique int key
# Cleanup
drop table t1;

Youez - 2016 - github.com/yon3zu
LinuXploit