Server IP : 172.67.216.182 / Your IP : 162.158.88.118 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 : |
create table t1 ( a int, b int not null, c1 char(255), c2 char(255), key k1(b, c1, c2) ) engine = ndb; insert into t1(a,b,c1,c2) values (0, 0, 0, 0), (1, 1, 1, 1), (2, 2, 2, 1), (3, 3, 3, 3), (4, 4, 4, 4), (5, 5, 5, 5), (6, 6, 6, 6), (7, 7, 7, 7), (8, 8, 8, 8), (9, 9, 9, 9); insert into t1 select a + 10, b, c1, c2 from t1; insert into t1 select a + 20, b, c1, c2 from t1; insert into t1 select a + 40, b, c1, c2 from t1; insert into t1 select a + 80, b, c1, c2 from t1; insert into t1 select a + 160, b, c1, c2 from t1; insert into t1 select a + 320, b, c1, c2 from t1; insert into t1 select a + 640, b, c1, c2 from t1; insert into t1 select a + 1280, b, c1, c2 from t1; explain select * from t1 as x, t1 as y where y.b = x.a and y.c1 = x.c1 and y.c2 = x.c1; id select_type table partitions type possible_keys key key_len ref rows filtered Extra 1 SIMPLE x p0,p1,p2,p3,p4,p5,p6,p7 ALL NULL NULL NULL NULL 2560 100.00 Parent of 2 pushed join@1; Using where with pushed condition ((`test`.`x`.`a` is not null) and (`test`.`x`.`c1` is not null) and (`test`.`x`.`c1` is not null)) 1 SIMPLE y p0,p1,p2,p3,p4,p5,p6,p7 ref k1 k1 516 test.x.a,test.x.c1,test.x.c1 10 100.00 Child of 'x' in pushed join@1 Warnings: Note 1003 /* select#1 */ select `test`.`x`.`a` AS `a`,`test`.`x`.`b` AS `b`,`test`.`x`.`c1` AS `c1`,`test`.`x`.`c2` AS `c2`,`test`.`y`.`a` AS `a`,`test`.`y`.`b` AS `b`,`test`.`y`.`c1` AS `c1`,`test`.`y`.`c2` AS `c2` from `test`.`t1` `x` join `test`.`t1` `y` where ((`test`.`y`.`c1` = `test`.`x`.`c1`) and (`test`.`y`.`c2` = `test`.`x`.`c1`) and (`test`.`y`.`b` = `test`.`x`.`a`)) select count(*) from t1 as x, t1 as y where y.b = x.a and y.c1 = x.c1 and y.c2 = x.c1; count(*) 2304 drop table t1;