Commit cb1bdf4d authored by unknown's avatar unknown

Merge


mysql-test/r/group_by.result:
  Auto merged
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
  Auto merged
scripts/make_win_src_distribution.sh:
  Auto merged
sql/item.cc:
  Auto merged
sql/item.h:
  Auto merged
sql/item_subselect.h:
  Auto merged
sql/sql_select.cc:
  Auto merged
ndb/src/kernel/blocks/dbdict/Dbdict.cpp:
  merge
sql/item_cmpfunc.cc:
  merge
support-files/mysql.server.sh:
  merge
parents 5b0c7525 8ef1afba
...@@ -693,7 +693,7 @@ concat('val-', x3.a + 3*x4.a), -- 12 ...@@ -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:=x3.a + 3*x4.a + 12*C.a), -- 120
concat('val-', @a + 120*D.a) 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; 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; 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 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 1 SIMPLE t2 ref PRIMARY,a PRIMARY 402 const,const 6 Using where
......
...@@ -508,7 +508,8 @@ insert into t2 select ...@@ -508,7 +508,8 @@ insert into t2 select
concat('val-', @a:=x3.a + 3*x4.a + 12*C.a), -- 120 concat('val-', @a:=x3.a + 3*x4.a + 12*C.a), -- 120
concat('val-', @a + 120*D.a) 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; 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; 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; select c from t2 where a = 2 and b = 'val-2' group by c;
......
...@@ -2618,6 +2618,26 @@ void Dbacc::execACC_LOCKREQ(Signal* signal) ...@@ -2618,6 +2618,26 @@ void Dbacc::execACC_LOCKREQ(Signal* signal)
*sig = *req; *sig = *req;
return; 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) { if (lockOp == AccLockReq::Unlock) {
jam(); jam();
// do unlock via ACC_COMMITREQ (immediate) // do unlock via ACC_COMMITREQ (immediate)
......
...@@ -2470,7 +2470,9 @@ Dbdict::restartCreateTab_writeTableConf(Signal* signal, ...@@ -2470,7 +2470,9 @@ Dbdict::restartCreateTab_writeTableConf(Signal* signal,
callback.m_callbackFunction = callback.m_callbackFunction =
safe_cast(&Dbdict::restartCreateTab_dihComplete); safe_cast(&Dbdict::restartCreateTab_dihComplete);
SegmentedSectionPtr fragDataPtr; fragDataPtr.setNull(); SegmentedSectionPtr fragDataPtr;
fragDataPtr.sz = 0;
fragDataPtr.setNull();
createTab_dih(signal, createTabPtr, fragDataPtr, &callback); createTab_dih(signal, createTabPtr, fragDataPtr, &callback);
} }
......
...@@ -251,7 +251,7 @@ copy_dir_dirs() { ...@@ -251,7 +251,7 @@ copy_dir_dirs() {
for i in client dbug extra heap include \ for i in client dbug extra heap include \
libmysql libmysqld myisam \ libmysql libmysqld myisam \
myisammrg mysys regex sql strings sql-common \ myisammrg mysys regex sql strings sql-common sql/examples \
tools vio zlib tools vio zlib
do do
copy_dir_files $i copy_dir_files $i
......
...@@ -432,10 +432,16 @@ int Arg_comparator::compare_e_binary_string() ...@@ -432,10 +432,16 @@ int Arg_comparator::compare_e_binary_string()
int Arg_comparator::compare_real() 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) if (!(*a)->null_value)
{ {
double val2= (*b)->val_real(); val2= (*b)->val_real();
if (!(*b)->null_value) if (!(*b)->null_value)
{ {
owner->null_value= 0; owner->null_value= 0;
......
...@@ -10580,8 +10580,9 @@ test_if_skip_sort_order(JOIN_TAB *tab,ORDER *order,ha_rows select_limit, ...@@ -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 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. 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 when one index is defined as (part1, part2, ...) and another as
BUG#9213 in group_by.test). (part1, part2(N), ...) and the WHERE clause contains
"part1 = const1 AND part2=const2".
So we build tab->ref from scratch here. So we build tab->ref from scratch here.
*/ */
KEYUSE *keyuse= tab->keyuse; KEYUSE *keyuse= tab->keyuse;
......
...@@ -102,7 +102,18 @@ wait_for_pid () { ...@@ -102,7 +102,18 @@ wait_for_pid () {
i=0 i=0
while test $i -lt 35 ; do while test $i -lt 35 ; do
sleep 1 sleep 1
case "$1" in
'created')
test -s $pid_file && i='' && break 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" echo $echo_n ".$echo_c"
i=`expr $i + 1` i=`expr $i + 1`
done done
...@@ -198,7 +209,7 @@ case "$mode" in ...@@ -198,7 +209,7 @@ case "$mode" in
# be overwritten at next upgrade. # be overwritten at next upgrade.
echo $echo_n "Starting MySQL" echo $echo_n "Starting MySQL"
$sbindir/mysqlmanager $USER_OPTION --pid-file=$pid_file >/dev/null 2>&1 & $sbindir/mysqlmanager $USER_OPTION --pid-file=$pid_file >/dev/null 2>&1 &
wait_for_pid wait_for_pid created
# Make lock for RedHat / SuSE # Make lock for RedHat / SuSE
if test -w /var/lock/subsys if test -w /var/lock/subsys
...@@ -219,7 +230,7 @@ case "$mode" in ...@@ -219,7 +230,7 @@ case "$mode" in
echo $echo_n "Shutting down MySQL" echo $echo_n "Shutting down MySQL"
kill $mysqlmanager_pid kill $mysqlmanager_pid
# mysqlmanager should remove the pid_file when it exits, so wait for it. # 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 # delete lock for RedHat / SuSE
if test -f /var/lock/subsys/mysqlmanager 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