403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/local/mysql/mysql-test/main/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/mysql/mysql-test/main/show_explain_non_select.test
#
# SHOW EXPLAIN tests for non-select subqueries
#
--source include/have_debug.inc
--source include/have_debug_sync.inc
--source include/have_innodb.inc
--source include/not_embedded.inc

--disable_warnings
drop table if exists t0, t1;
--enable_warnings

SET @old_debug= @@session.debug;
set debug_sync='RESET';

# 
# Setup two threads and their ids
#
let $thr1=`select connection_id()`;
connect (con2, localhost, root,,);
connection con2;
let $thr2=`select connection_id()`;
connection default;

# 
# Create tables
# 
create table t0 (a int) engine=myisam;
insert into t0 values (1),(2),(3),(4),(5),(6),(7),(8);

create table t1 (a int, b int, filler char(100), key(a), key(b));
insert into t1 
select A.a+10*B.a + 10*C.a, A.a+10*B.a + 10*C.a, 'filler' 
from t0 A, t0 B, t0 C;

let $wait_condition= select State='show_explain_trap' from information_schema.processlist where id=$thr2;

--echo #
--echo # Test SHOW EXPLAIN for single-table DELETE
--echo #
connection con2;
SET debug_dbug='+d,show_explain_probe_delete_exec_start';
send delete from t1 where a<10 and b+1>1000;

connection default;
--source include/wait_condition.inc
evalp show explain for $thr2;
connection con2;
reap;

--echo #
--echo # Test SHOW EXPLAIN for multi-table DELETE
--echo #
set @show_explain_probe_select_id=1;
SET debug_dbug='+d,show_explain_probe_do_select';
send delete t1 from t1, t0 where t0.a=t1.a and t1.b +1 > 1000;
connection default;
--source include/wait_condition.inc
evalp show explain for $thr2;
connection con2;
reap;

--echo #
--echo # Test SHOW EXPLAIN for single-table UPDATE
--echo #
connection con2;
SET debug_dbug='+d,show_explain_probe_update_exec_start';
send update t1 set filler='filler-data-2' where a<10 and b+1>1000;

connection default;
--source include/wait_condition.inc
evalp show explain for $thr2;
connection con2;
reap;

drop table t0,t1;

SET debug_dbug=@old_debug;
set debug_sync='RESET';

Youez - 2016 - github.com/yon3zu
LinuXploit