Loading include/config-win.h +7 −1 Original line number Diff line number Diff line Loading @@ -218,7 +218,13 @@ inline double ulonglong2double(ulonglong value) ((uint32) (uchar) (A)[0]))) #define sint4korr(A) (*((long *) (A))) #define uint2korr(A) (*((uint16 *) (A))) #define uint3korr(A) (long) (*((unsigned long *) (A)) & 0xFFFFFF) /* ATTENTION ! Please, note, uint3korr reads 4 bytes (not 3) ! It means, that you have to provide enough allocated space ! */ #define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) #define uint4korr(A) (*((unsigned long *) (A))) #define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ (((uint32) ((uchar) (A)[1])) << 8) +\ Loading include/my_global.h +7 −1 Original line number Diff line number Diff line Loading @@ -898,7 +898,13 @@ typedef char bool; /* Ordinary boolean values 0 1 */ (((uint32) ((uchar) (A)[1])) << 8) +\ (((uint32) ((uchar) (A)[2])) << 16)) #else #define uint3korr(A) (long) (*((unsigned long *) (A)) & 0xFFFFFF) /* ATTENTION ! Please, note, uint3korr reads 4 bytes (not 3) ! It means, that you have to provide enough allocated space ! */ #define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) #endif #define uint4korr(A) (*((unsigned long *) (A))) #define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ Loading mysql-test/r/lock_multi.result +12 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,18 @@ unlock tables; n 1 drop table t1; create table t1 (a int, b int); create table t2 (c int, d int); insert into t1 values(1,1); insert into t1 values(2,2); insert into t2 values(1,2); lock table t1 read; update t1,t2 set c=a where b=d; select c from t2; c 2 drop table t1; drop table t2; create table t1 (a int); create table t2 (a int); lock table t1 write, t2 write; Loading mysql-test/r/multi_update.result +0 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,6 @@ Table 't2' was locked with a READ lock and can't be updated UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n; Table 't2' was locked with a READ lock and can't be updated UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; Table 't2' was locked with a READ lock and can't be updated unlock tables; LOCK TABLES t1 write, t2 write; UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; Loading mysql-test/t/lock_multi.test +24 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,30 @@ connection reader; reap; drop table t1; # # Test problem when using locks with multi-updates # It should not block when multi-update is reading on a read-locked table # connection locker; create table t1 (a int, b int); create table t2 (c int, d int); insert into t1 values(1,1); insert into t1 values(2,2); insert into t2 values(1,2); lock table t1 read; connection writer; --sleep 2 send update t1,t2 set c=a where b=d; connection reader; --sleep 2 select c from t2; connection writer; reap; connection locker; drop table t1; drop table t2; # # Test problem when using locks on many tables and droping a table that # is to-be-locked by another thread Loading Loading
include/config-win.h +7 −1 Original line number Diff line number Diff line Loading @@ -218,7 +218,13 @@ inline double ulonglong2double(ulonglong value) ((uint32) (uchar) (A)[0]))) #define sint4korr(A) (*((long *) (A))) #define uint2korr(A) (*((uint16 *) (A))) #define uint3korr(A) (long) (*((unsigned long *) (A)) & 0xFFFFFF) /* ATTENTION ! Please, note, uint3korr reads 4 bytes (not 3) ! It means, that you have to provide enough allocated space ! */ #define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) #define uint4korr(A) (*((unsigned long *) (A))) #define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ (((uint32) ((uchar) (A)[1])) << 8) +\ Loading
include/my_global.h +7 −1 Original line number Diff line number Diff line Loading @@ -898,7 +898,13 @@ typedef char bool; /* Ordinary boolean values 0 1 */ (((uint32) ((uchar) (A)[1])) << 8) +\ (((uint32) ((uchar) (A)[2])) << 16)) #else #define uint3korr(A) (long) (*((unsigned long *) (A)) & 0xFFFFFF) /* ATTENTION ! Please, note, uint3korr reads 4 bytes (not 3) ! It means, that you have to provide enough allocated space ! */ #define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF) #endif #define uint4korr(A) (*((unsigned long *) (A))) #define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\ Loading
mysql-test/r/lock_multi.result +12 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,18 @@ unlock tables; n 1 drop table t1; create table t1 (a int, b int); create table t2 (c int, d int); insert into t1 values(1,1); insert into t1 values(2,2); insert into t2 values(1,2); lock table t1 read; update t1,t2 set c=a where b=d; select c from t2; c 2 drop table t1; drop table t2; create table t1 (a int); create table t2 (a int); lock table t1 write, t2 write; Loading
mysql-test/r/multi_update.result +0 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,6 @@ Table 't2' was locked with a READ lock and can't be updated UPDATE t1,t2 SET t1.d=t2.d,t2.d=30 WHERE t1.n=t2.n; Table 't2' was locked with a READ lock and can't be updated UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; Table 't2' was locked with a READ lock and can't be updated unlock tables; LOCK TABLES t1 write, t2 write; UPDATE t1,t2 SET t1.d=t2.d WHERE t1.n=t2.n; Loading
mysql-test/t/lock_multi.test +24 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,30 @@ connection reader; reap; drop table t1; # # Test problem when using locks with multi-updates # It should not block when multi-update is reading on a read-locked table # connection locker; create table t1 (a int, b int); create table t2 (c int, d int); insert into t1 values(1,1); insert into t1 values(2,2); insert into t2 values(1,2); lock table t1 read; connection writer; --sleep 2 send update t1,t2 set c=a where b=d; connection reader; --sleep 2 select c from t2; connection writer; reap; connection locker; drop table t1; drop table t2; # # Test problem when using locks on many tables and droping a table that # is to-be-locked by another thread Loading