diff options
author | unknown <pekka@mysql.com> | 2005-04-01 10:13:37 +0200 |
---|---|---|
committer | unknown <pekka@mysql.com> | 2005-04-01 10:13:37 +0200 |
commit | cb1bdf4d84221312258dd8451f58c06337ff108d (patch) | |
tree | 748a9a8f5a64181143501a3ccc782f1dfa1af35f | |
parent | 5b0c75259c0b62a0a8efc4964fb70816e1d1954e (diff) | |
parent | 8ef1afbaa4ba0c639f2ecf47853086e783cc1efa (diff) | |
download | mariadb-git-cb1bdf4d84221312258dd8451f58c06337ff108d.tar.gz |
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
-rw-r--r-- | mysql-test/r/group_by.result | 2 | ||||
-rw-r--r-- | mysql-test/t/group_by.test | 3 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbacc/DbaccMain.cpp | 20 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbdict/Dbdict.cpp | 4 | ||||
-rw-r--r-- | scripts/make_win_src_distribution.sh | 2 | ||||
-rw-r--r-- | sql/item_cmpfunc.cc | 10 | ||||
-rw-r--r-- | sql/sql_select.cc | 5 | ||||
-rw-r--r-- | support-files/mysql.server.sh | 17 |
8 files changed, 52 insertions, 11 deletions
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 9ff1fbcb833..af69cc83e83 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -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 diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index 327be1b724b..46e58cd00fd 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -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; diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp index a16c0da369b..12f77d59efc 100644 --- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp +++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp @@ -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) diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 78209c3affa..4bc5b127a8f 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -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); } diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index efcbeffeb11..25f5726c35a 100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -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 diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index ddb116f548a..66354560756 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -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; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 257f0f3c79a..0c00d947508 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -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; diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index ce35fd50832..2735ad91c6e 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -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 |