403Webshell
Server IP : 45.40.142.9  /  Your IP : 216.73.216.250
Web Server : Apache
System : Linux s45-40-142-9.secureserver.net 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64
User : bayspec ( 506)
PHP Version : 5.6.40
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/mysql-test/include/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/mysql-test/include/check_qep.inc
# include/check_qep.inc
#
# SUMMARY
#
#    Designed to be used together with include/check_qep.inc
#
#    $query should be assigned a select statement using 
#    straight_join to force the tables to be joined in most 
#    optimal order.
#
#    expect_qep.inc will then store the estimated 'Last_query_cost'
#    and total # 'Handler_read%' for this straight_joined query.
#
#    We should then assign a non-straight_join'ed version of
#    the same query to $query and execute it using 
#    'include/check_qep.inc'. Its estimated cost and
#    #handler_reads will then be verified against the
#    previous straight_joined query.
#
# USAGE
#
#    let $query= <select straight_join optimal statement>;
#    --source include/expect_qep.inc
#    let $query= <select statement>;
#    --source include/check_qep.inc
#
# EXAMPLE
#    t/greedy_optimizer.test
#

flush status;
eval EXPLAIN $query;
eval $query;

let $cost=
 query_get_value(SHOW STATUS LIKE 'Last_query_cost', Value, 1);

let $reads=
`select sum(variable_value)
   from information_schema.session_status
   where VARIABLE_NAME like 'Handler_read%'`;

#echo Cost: $cost, Handler_reads: $reads;

if ($cost != $best_cost)
{ echo ### FAILED: Query_cost: $cost, expected: $best_cost ###;
}
if ($reads != $best_reads)
{ echo ### FAILED: Handler_reads: $reads, expected: $best_reads ###;
}

Youez - 2016 - github.com/yon3zu
LinuXploit