Commit 5b9bd8c0 authored by pekka@mysql.com's avatar pekka@mysql.com

Merge

parents 45a79c90 7ace3f13
......@@ -693,7 +693,7 @@ concat('val-', x3.a + 3*x4.a), -- 12
concat('val-', @a:=x3.a + 3*x4.a + 12*C.a), -- 120
concat('val-', @a + 120*D.a)
from t1 x3, t1 x4, t1 C, t1 D where x3.a < 3 and x4.a < 4 and D.a < 4;
delete from t2 where a = 2 and b = 'val-2' limit 30;
delete from t2 where a = 2 and b = 'val-2' order by a,b,c,d limit 30;
explain select c from t2 where a = 2 and b = 'val-2' group by c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref PRIMARY,a PRIMARY 402 const,const 6 Using where
......
......@@ -508,7 +508,8 @@ insert into t2 select
concat('val-', @a:=x3.a + 3*x4.a + 12*C.a), -- 120
concat('val-', @a + 120*D.a)
from t1 x3, t1 x4, t1 C, t1 D where x3.a < 3 and x4.a < 4 and D.a < 4;
delete from t2 where a = 2 and b = 'val-2' limit 30;
delete from t2 where a = 2 and b = 'val-2' order by a,b,c,d limit 30;
explain select c from t2 where a = 2 and b = 'val-2' group by c;
select c from t2 where a = 2 and b = 'val-2' group by c;
......
......@@ -2618,6 +2618,26 @@ void Dbacc::execACC_LOCKREQ(Signal* signal)
*sig = *req;
return;
}
operationRecPtr.i = req->accOpPtr;
ptrCheckGuard(operationRecPtr, coprecsize, operationrec);
fragrecptr.i = operationRecPtr.p->fragptr;
ptrCheckGuard(fragrecptr, cfragmentsize, fragmentrec);
if (fragrecptr.p->keyLength == 0 &&
// should test some state variable
operationRecPtr.p->elementPage != RNIL) {
jam();
// re-compute long key vars
Page8Ptr tPageptr;
tPageptr.i = operationRecPtr.p->elementPage;
ptrCheckGuard(tPageptr, cpagesize, page8);
Uint32 tKeyptr =
operationRecPtr.p->elementPointer +
operationRecPtr.p->elementIsforward *
(ZELEM_HEAD_SIZE + fragrecptr.p->localkeylen);
tslcPageIndex = tPageptr.p->word32[tKeyptr] & 0x3ff;
tslcPagedir = tPageptr.p->word32[tKeyptr] >> 10;
searchLongKey(signal, false);
}
if (lockOp == AccLockReq::Unlock) {
jam();
// do unlock via ACC_COMMITREQ (immediate)
......
......@@ -2470,7 +2470,9 @@ Dbdict::restartCreateTab_writeTableConf(Signal* signal,
callback.m_callbackFunction =
safe_cast(&Dbdict::restartCreateTab_dihComplete);
SegmentedSectionPtr fragDataPtr; fragDataPtr.setNull();
SegmentedSectionPtr fragDataPtr;
fragDataPtr.sz = 0;
fragDataPtr.setNull();
createTab_dih(signal, createTabPtr, fragDataPtr, &callback);
}
......
......@@ -251,7 +251,7 @@ copy_dir_dirs() {
for i in client dbug extra heap include \
libmysql libmysqld myisam \
myisammrg mysys regex sql strings sql-common \
myisammrg mysys regex sql strings sql-common sql/examples \
tools vio zlib
do
copy_dir_files $i
......
......@@ -432,10 +432,16 @@ int Arg_comparator::compare_e_binary_string()
int Arg_comparator::compare_real()
{
double val1= (*a)->val_real();
/*
Fix yet another manifestation of Bug#2338. 'Volatile' will instruct
gcc to flush double values out of 80-bit Intel FPU registers before
performing the comparison.
*/
volatile double val1, val2;
val1= (*a)->val_real();
if (!(*a)->null_value)
{
double val2= (*b)->val_real();
val2= (*b)->val_real();
if (!(*b)->null_value)
{
owner->null_value= 0;
......
......@@ -10580,8 +10580,9 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit,
/*
We'll use ref access method on key new_ref_key. In general case
the index search tuple for new_ref_key will be different (e.g.
when one of the indexes only covers prefix of the field, see
BUG#9213 in group_by.test).
when one index is defined as (part1, part2, ...) and another as
(part1, part2(N), ...) and the WHERE clause contains
"part1 = const1 AND part2=const2".
So we build tab->ref from scratch here.
*/
KEYUSE *keyuse= tab->keyuse;
......
......@@ -102,7 +102,18 @@ wait_for_pid () {
i=0
while test $i -lt 35 ; do
sleep 1
test -s $pid_file && i='' && break
case "$1" in
'created')
test -s $pid_file && i='' && break
;;
'removed')
test ! -s $pid_file && i='' && break
;;
*)
echo "wait_for_pid () usage: wait_for_pid created|removed"
exit 1
;;
esac
echo $echo_n ".$echo_c"
i=`expr $i + 1`
done
......@@ -198,7 +209,7 @@ case "$mode" in
# be overwritten at next upgrade.
echo $echo_n "Starting MySQL"
$sbindir/mysqlmanager $USER_OPTION --pid-file=$pid_file >/dev/null 2>&1 &
wait_for_pid
wait_for_pid created
# Make lock for RedHat / SuSE
if test -w /var/lock/subsys
......@@ -219,7 +230,7 @@ case "$mode" in
echo $echo_n "Shutting down MySQL"
kill $mysqlmanager_pid
# mysqlmanager should remove the pid_file when it exits, so wait for it.
wait_for_pid
wait_for_pid removed
# delete lock for RedHat / SuSE
if test -f /var/lock/subsys/mysqlmanager
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment