Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9d615368
Commit
9d615368
authored
Jul 29, 2004
by
jan@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
Merge jlindstrom@build.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/mysql-4.1
parents
8be6dd7d
88f6267b
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
218 additions
and
210 deletions
+218
-210
acinclude.m4
acinclude.m4
+2
-2
include/myisampack.h
include/myisampack.h
+180
-177
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+3
-3
mysql-test/r/ndb_lock.result
mysql-test/r/ndb_lock.result
+8
-8
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+2
-2
mysql-test/t/ndb_lock.test
mysql-test/t/ndb_lock.test
+4
-4
ndb/src/common/util/ConfigValues.cpp
ndb/src/common/util/ConfigValues.cpp
+5
-3
ndb/src/mgmsrv/MgmtSrvr.hpp
ndb/src/mgmsrv/MgmtSrvr.hpp
+3
-0
sql/mysqld.cc
sql/mysqld.cc
+9
-9
sql/set_var.cc
sql/set_var.cc
+2
-2
No files found.
acinclude.m4
View file @
9d615368
...
...
@@ -183,8 +183,8 @@ dnl Auxiliary macro to check for zlib at given path
AC_DEFUN([MYSQL_CHECK_ZLIB_DIR], [
save_INCLUDES="$INCLUDES"
save_LIBS="$LIBS"
INCLUDES="$ZLIB_INCLUDES"
LIBS="$ZLIB_LIBS"
INCLUDES="$
INCLUDES $
ZLIB_INCLUDES"
LIBS="$
LIBS $
ZLIB_LIBS"
AC_CACHE_VAL([mysql_cv_compress],
[AC_TRY_LINK([#include <zlib.h>],
[int link_test() { return compress(0, (unsigned long*) 0, "", 0); }],
...
...
include/myisampack.h
View file @
9d615368
...
...
@@ -22,215 +22,218 @@
*/
/* these two are for uniformity */
#define mi_sint1korr(A) (
int8)(*A
)
#define mi_uint1korr(A) (
uint8)(*A
)
#define mi_sint1korr(A) (
(int8)(*A)
)
#define mi_uint1korr(A) (
(uint8)(*A)
)
#define mi_sint2korr(A) (
int16) (((int16) ((uchar) (A
)[1])) +\
((int16) ((int16) (A)[0]) << 8
))
#define mi_sint3korr(A) ((int32) ((((
uchar) (A
)[0]) & 128) ? \
#define mi_sint2korr(A) (
(int16) (((int16) (((uchar*) (A)
)[1])) +\
((int16) ((int16) ((char*) (A))[0]) << 8)
))
#define mi_sint3korr(A) ((int32) ((((
(uchar*) (A)
)[0]) & 128) ? \
(((uint32) 255L << 24) | \
(((uint32) (uchar) (A
)[0]) << 16) |\
(((uint32) (uchar) (A
)[1]) << 8) | \
((uint32) (uchar) (A
)[2])) : \
(((uint32) (uchar) (A
)[0]) << 16) |\
(((uint32) (uchar) (A
)[1]) << 8) | \
((uint32) (uchar) (A
)[2])))
#define mi_sint4korr(A) (
int32) (((int32) ((uchar) (A
)[3])) +\
(((int32) ((uchar) (A)[2]) << 8)
) +\
(((int32) ((uchar) (A)[1]) << 16)
) +\
(((int32) ((int16) (A
)[0]) << 24)))
#define mi_sint8korr(A) (
longlong) mi_uint8korr(A
)
#define mi_uint2korr(A) (
uint16) (((uint16) ((uchar) (A
)[1])) +\
((uint16) ((uchar) (A)[0]) << 8
))
#define mi_uint3korr(A) (
uint32) (((uint32) ((uchar) (A
)[2])) +\
(((uint32) ((uchar) (A
)[1])) << 8) +\
(((uint32) ((uchar) (A)[0])) << 16
))
#define mi_uint4korr(A) (
uint32) (((uint32) ((uchar) (A
)[3])) +\
(((uint32) ((uchar) (A
)[2])) << 8) +\
(((uint32) ((uchar) (A
)[1])) << 16) +\
(((uint32) ((uchar) (A)[0])) << 24
))
#define mi_uint5korr(A) ((ulonglong)(((uint32) ((
uchar) (A
)[4])) +\
(((uint32) ((uchar) (A
)[3])) << 8) +\
(((uint32) ((uchar) (A
)[2])) << 16) +\
(((uint32) ((uchar) (A
)[1])) << 24)) +\
(((ulonglong) ((uchar) (A
)[0])) << 32))
#define mi_uint6korr(A) ((ulonglong)(((uint32) ((
uchar) (A
)[5])) +\
(((uint32) ((uchar) (A
)[4])) << 8) +\
(((uint32) ((uchar) (A
)[3])) << 16) +\
(((uint32) ((uchar) (A
)[2])) << 24)) +\
(((ulonglong) (((uint32) ((uchar) (A
)[1])) +\
(((uint32) ((uchar) (A
)[0]) << 8)))) <<\
(((uint32) ((uchar*) (A)
)[0]) << 16) |\
(((uint32) ((uchar*) (A)
)[1]) << 8) | \
((uint32) ((uchar*) (A)
)[2])) : \
(((uint32) ((uchar*) (A)
)[0]) << 16) |\
(((uint32) ((uchar*) (A)
)[1]) << 8) | \
((uint32) ((uchar*) (A)
)[2])))
#define mi_sint4korr(A) (
(int32) (((int32) (((uchar*) (A)
)[3])) +\
((int32) (((uchar*) (A))[2]) << 8
) +\
((int32) (((uchar*) (A))[1]) << 16
) +\
((int32) ((int16) ((char*) (A)
)[0]) << 24)))
#define mi_sint8korr(A) (
(longlong) mi_uint8korr(A)
)
#define mi_uint2korr(A) (
(uint16) (((uint16) (((uchar*) (A)
)[1])) +\
((uint16) (((uchar*) (A))[0]) << 8)
))
#define mi_uint3korr(A) (
(uint32) (((uint32) (((uchar*) (A)
)[2])) +\
(((uint32) (((uchar*) (A)
)[1])) << 8) +\
(((uint32) (((uchar*) (A))[0])) << 16)
))
#define mi_uint4korr(A) (
(uint32) (((uint32) (((uchar*) (A)
)[3])) +\
(((uint32) (((uchar*) (A)
)[2])) << 8) +\
(((uint32) (((uchar*) (A)
)[1])) << 16) +\
(((uint32) (((uchar*) (A))[0])) << 24)
))
#define mi_uint5korr(A) ((ulonglong)(((uint32) ((
(uchar*) (A)
)[4])) +\
(((uint32) (((uchar*) (A)
)[3])) << 8) +\
(((uint32) (((uchar*) (A)
)[2])) << 16) +\
(((uint32) (((uchar*) (A)
)[1])) << 24)) +\
(((ulonglong) (((uchar*) (A)
)[0])) << 32))
#define mi_uint6korr(A) ((ulonglong)(((uint32) ((
(uchar*) (A)
)[5])) +\
(((uint32) (((uchar*) (A)
)[4])) << 8) +\
(((uint32) (((uchar*) (A)
)[3])) << 16) +\
(((uint32) (((uchar*) (A)
)[2])) << 24)) +\
(((ulonglong) (((uint32) (((uchar*) (A)
)[1])) +\
(((uint32) (((uchar*) (A)
)[0]) << 8)))) <<\
32))
#define mi_uint7korr(A) ((ulonglong)(((uint32) ((
uchar) (A
)[6])) +\
(((uint32) ((uchar) (A
)[5])) << 8) +\
(((uint32) ((uchar) (A
)[4])) << 16) +\
(((uint32) ((uchar) (A
)[3])) << 24)) +\
(((ulonglong) (((uint32) ((uchar) (A
)[2])) +\
(((uint32) ((uchar) (A
)[1])) << 8) +\
(((uint32) ((uchar) (A
)[0])) << 16))) <<\
#define mi_uint7korr(A) ((ulonglong)(((uint32) ((
(uchar*) (A)
)[6])) +\
(((uint32) (((uchar*) (A)
)[5])) << 8) +\
(((uint32) (((uchar*) (A)
)[4])) << 16) +\
(((uint32) (((uchar*) (A)
)[3])) << 24)) +\
(((ulonglong) (((uint32) (((uchar*) (A)
)[2])) +\
(((uint32) (((uchar*) (A)
)[1])) << 8) +\
(((uint32) (((uchar*) (A)
)[0])) << 16))) <<\
32))
#define mi_uint8korr(A) ((ulonglong)(((uint32) ((
uchar) (A
)[7])) +\
(((uint32) ((uchar) (A
)[6])) << 8) +\
(((uint32) ((uchar) (A
)[5])) << 16) +\
(((uint32) ((uchar) (A
)[4])) << 24)) +\
(((ulonglong) (((uint32) ((uchar) (A
)[3])) +\
(((uint32) ((uchar) (A
)[2])) << 8) +\
(((uint32) ((uchar) (A
)[1])) << 16) +\
(((uint32) ((uchar) (A
)[0])) << 24))) <<\
#define mi_uint8korr(A) ((ulonglong)(((uint32) ((
(uchar*) (A)
)[7])) +\
(((uint32) (((uchar*) (A)
)[6])) << 8) +\
(((uint32) (((uchar*) (A)
)[5])) << 16) +\
(((uint32) (((uchar*) (A)
)[4])) << 24)) +\
(((ulonglong) (((uint32) (((uchar*) (A)
)[3])) +\
(((uint32) (((uchar*) (A)
)[2])) << 8) +\
(((uint32) (((uchar*) (A)
)[1])) << 16) +\
(((uint32) (((uchar*) (A)
)[0])) << 24))) <<\
32))
/* This one is for uniformity */
#define mi_int1store(T,A) *((uchar*)(T))= (uchar) (A)
#define mi_int2store(T,A) { uint def_temp= (uint) (A) ;\
*((uchar*) ((T)+1))= (uchar)(def_temp);
\
*((uchar*) ((T)+0))= (uchar)
(def_temp >> 8); }
((uchar*) (T))[1]= (uchar) (def_temp);
\
((uchar*) (T))[0]= (uchar)
(def_temp >> 8); }
#define mi_int3store(T,A) {
/*lint -save -e734 */
\
ulong def_temp= (ulong) (A);\
*(((T)+2))=(
char) (def_temp);\
*((T)+1)= (
char) (def_temp >> 8);\
*((T)+0)= (
char) (def_temp >> 16);\
((uchar*) (T))[2]= (u
char) (def_temp);\
((uchar*) (T))[1]= (u
char) (def_temp >> 8);\
((uchar*) (T))[0]= (u
char) (def_temp >> 16);\
/*lint -restore */
}
#define mi_int4store(T,A) { ulong def_temp= (ulong) (A);\
*((T)+3)=(
char) (def_temp);\
*((T)+2)=(
char) (def_temp >> 8);\
*((T)+1)=(
char) (def_temp >> 16);\
*((T)+0)=(
char) (def_temp >> 24); }
((uchar*) (T))[3]= (u
char) (def_temp);\
((uchar*) (T))[2]= (u
char) (def_temp >> 8);\
((uchar*) (T))[1]= (u
char) (def_temp >> 16);\
((uchar*) (T))[0]= (u
char) (def_temp >> 24); }
#define mi_int5store(T,A) { ulong def_temp= (ulong) (A),\
def_temp2= (ulong) ((A) >> 32);\
*((T)+4)=(
char) (def_temp);\
*((T)+3)=(
char) (def_temp >> 8);\
*((T)+2)=(
char) (def_temp >> 16);\
*((T)+1)=(
char) (def_temp >> 24);\
*((T)+0)=(
char) (def_temp2); }
((uchar*) (T))[4]= (u
char) (def_temp);\
((uchar*) (T))[3]= (u
char) (def_temp >> 8);\
((uchar*) (T))[2]= (u
char) (def_temp >> 16);\
((uchar*) (T))[1]= (u
char) (def_temp >> 24);\
((uchar*) (T))[0]= (u
char) (def_temp2); }
#define mi_int6store(T,A) { ulong def_temp= (ulong) (A),\
def_temp2= (ulong) ((A) >> 32);\
*((T)+5)=(
char) (def_temp);\
*((T)+4)=(
char) (def_temp >> 8);\
*((T)+3)=(
char) (def_temp >> 16);\
*((T)+2)=(
char) (def_temp >> 24);\
*((T)+1)=(
char) (def_temp2);\
*((T)+0)=(
char) (def_temp2 >> 8); }
((uchar*) (T))[5]= (u
char) (def_temp);\
((uchar*) (T))[4]= (u
char) (def_temp >> 8);\
((uchar*) (T))[3]= (u
char) (def_temp >> 16);\
((uchar*) (T))[2]= (u
char) (def_temp >> 24);\
((uchar*) (T))[1]= (u
char) (def_temp2);\
((uchar*) (T))[0]= (u
char) (def_temp2 >> 8); }
#define mi_int7store(T,A) { ulong def_temp= (ulong) (A),\
def_temp2= (ulong) ((A) >> 32);\
*((T)+6)=(char) (def_temp);\
*((T)+5)=(char) (def_temp >> 8);\
*((T)+4)=(char) (def_temp >> 16);\
*((T)+3)=(char) (def_temp >> 24);\
*((T)+2)=(char) (def_temp2);\
*((T)+1)=(char) (def_temp2 >> 8);\
*((T)+0)=(char) (def_temp2 >> 16); }
#define mi_int8store(T,A) { ulong def_temp3= (ulong) (A), \
def_temp4= (ulong) ((A) >> 32); \
mi_int4store((T),def_temp4); \
mi_int4store((T+4),def_temp3); \
}
((uchar*) (T))[6]= (uchar) (def_temp);\
((uchar*) (T))[5]= (uchar) (def_temp >> 8);\
((uchar*) (T))[4]= (uchar) (def_temp >> 16);\
((uchar*) (T))[3]= (uchar) (def_temp >> 24);\
((uchar*) (T))[2]= (uchar) (def_temp2);\
((uchar*) (T))[1]= (uchar) (def_temp2 >> 8);\
((uchar*) (T))[0]= (uchar) (def_temp2 >> 16); }
#define mi_int8store(T,A) { ulong def_temp3= (ulong) (A),\
def_temp4= (ulong) ((A) >> 32);\
mi_int4store((uchar*) (T) + 0, def_temp4);\
mi_int4store((uchar*) (T) + 4, def_temp3); }
#ifdef WORDS_BIGENDIAN
#define mi_float4store(T,A)
{ *(T)= ((byte
*) &A)[0];\
*((T)+1)=(char) ((byte
*) &A)[1];\
*((T)+2)=(char) ((byte
*) &A)[2];\
*((T)+3)=(char) ((byte
*) &A)[3]; }
#define mi_float4store(T,A)
{ ((uchar*) (T))[0]= ((uchar
*) &A)[0];\
((uchar*) (T))[1]= ((uchar
*) &A)[1];\
((uchar*) (T))[2]= ((uchar
*) &A)[2];\
((uchar*) (T))[3]= ((uchar
*) &A)[3]; }
#define mi_float4get(V,M) { float def_temp;\
((byte*) &def_temp)[0]=(M
)[0];\
((byte*) &def_temp)[1]=(M
)[1];\
((byte*) &def_temp)[2]=(M
)[2];\
((byte*) &def_temp)[3]=(M
)[3];\
(V)=
def_temp; }
#define mi_float8store(T,V) {
*(T)= ((byte
*) &V)[0];\
*((T)+1)=(char) ((byte
*) &V)[1];\
*((T)+2)=(char) ((byte
*) &V)[2];\
*((T)+3)=(char) ((byte
*) &V)[3];\
*((T)+4)=(char) ((byte
*) &V)[4];\
*((T)+5)=(char) ((byte
*) &V)[5];\
*((T)+6)=(char) ((byte
*) &V)[6];\
*((T)+7)=(char) ((byte
*) &V)[7]; }
((uchar*) &def_temp)[0]= ((uchar*) (M)
)[0];\
((uchar*) &def_temp)[1]= ((uchar*) (M)
)[1];\
((uchar*) &def_temp)[2]= ((uchar*) (M)
)[2];\
((uchar*) &def_temp)[3]= ((uchar*) (M)
)[3];\
(V)=
def_temp; }
#define mi_float8store(T,V) {
((uchar*) (T))[0]= ((uchar
*) &V)[0];\
((uchar*) (T))[1]= ((uchar
*) &V)[1];\
((uchar*) (T))[2]= ((uchar
*) &V)[2];\
((uchar*) (T))[3]= ((uchar
*) &V)[3];\
((uchar*) (T))[4]= ((uchar
*) &V)[4];\
((uchar*) (T))[5]= ((uchar
*) &V)[5];\
((uchar*) (T))[6]= ((uchar
*) &V)[6];\
((uchar*) (T))[7]= ((uchar
*) &V)[7]; }
#define mi_float8get(V,M) { double def_temp;\
((byte*) &def_temp)[0]=(M
)[0];\
((byte*) &def_temp)[1]=(M
)[1];\
((byte*) &def_temp)[2]=(M
)[2];\
((byte*) &def_temp)[3]=(M
)[3];\
((byte*) &def_temp)[4]=(M
)[4];\
((byte*) &def_temp)[5]=(M
)[5];\
((byte*) &def_temp)[6]=(M
)[6];\
((byte*) &def_temp)[7]=(M
)[7]; \
(V)=
def_temp; }
((uchar*) &def_temp)[0]= ((uchar*) (M)
)[0];\
((uchar*) &def_temp)[1]= ((uchar*) (M)
)[1];\
((uchar*) &def_temp)[2]= ((uchar*) (M)
)[2];\
((uchar*) &def_temp)[3]= ((uchar*) (M)
)[3];\
((uchar*) &def_temp)[4]= ((uchar*) (M)
)[4];\
((uchar*) &def_temp)[5]= ((uchar*) (M)
)[5];\
((uchar*) &def_temp)[6]= ((uchar*) (M)
)[6];\
((uchar*) &def_temp)[7]= ((uchar*) (M)
)[7]; \
(V)=
def_temp; }
#else
#define mi_float4store(T,A)
{ *(T)= ((byte
*) &A)[3];\
*((T)+1)=(char) ((byte
*) &A)[2];\
*((T)+2)=(char) ((byte
*) &A)[1];\
*((T)+3)=(char) ((byte
*) &A)[0]; }
#define mi_float4store(T,A)
{ ((uchar*) (T))[0]= ((uchar
*) &A)[3];\
((uchar*) (T))[1]= ((uchar
*) &A)[2];\
((uchar*) (T))[2]= ((uchar
*) &A)[1];\
((uchar*) (T))[3]= ((uchar
*) &A)[0]; }
#define mi_float4get(V,M) { float def_temp;\
((byte*) &def_temp)[0]=(M
)[3];\
((byte*) &def_temp)[1]=(M
)[2];\
((byte*) &def_temp)[2]=(M
)[1];\
((byte*) &def_temp)[3]=(M
)[0];\
(V)=
def_temp; }
((uchar*) &def_temp)[0]= ((uchar*) (M)
)[3];\
((uchar*) &def_temp)[1]= ((uchar*) (M)
)[2];\
((uchar*) &def_temp)[2]= ((uchar*) (M)
)[1];\
((uchar*) &def_temp)[3]= ((uchar*) (M)
)[0];\
(V)=
def_temp; }
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#define mi_float8store(T,V) {
*(T)= ((byte
*) &V)[3];\
*((T)+1)=(char) ((byte
*) &V)[2];\
*((T)+2)=(char) ((byte
*) &V)[1];\
*((T)+3)=(char) ((byte
*) &V)[0];\
*((T)+4)=(char) ((byte
*) &V)[7];\
*((T)+5)=(char) ((byte
*) &V)[6];\
*((T)+6)=(char) ((byte
*) &V)[5];\
*((T)+7)=(char) ((byte
*) &V)[4];}
#define mi_float8store(T,V) {
((uchar*) (T))[0]= ((uchar
*) &V)[3];\
((uchar*) (T))[1]= ((uchar
*) &V)[2];\
((uchar*) (T))[2]= ((uchar
*) &V)[1];\
((uchar*) (T))[3]= ((uchar
*) &V)[0];\
((uchar*) (T))[4]= ((uchar
*) &V)[7];\
((uchar*) (T))[5]= ((uchar
*) &V)[6];\
((uchar*) (T))[6]= ((uchar
*) &V)[5];\
((uchar*) (T))[7]= ((uchar
*) &V)[4];}
#define mi_float8get(V,M) { double def_temp;\
((byte*) &def_temp)[0]=(M
)[3];\
((byte*) &def_temp)[1]=(M
)[2];\
((byte*) &def_temp)[2]=(M
)[1];\
((byte*) &def_temp)[3]=(M
)[0];\
((byte*) &def_temp)[4]=(M
)[7];\
((byte*) &def_temp)[5]=(M
)[6];\
((byte*) &def_temp)[6]=(M
)[5];\
((byte*) &def_temp)[7]=(M
)[4];\
(V)=
def_temp; }
((uchar*) &def_temp)[0]= ((uchar*) (M)
)[3];\
((uchar*) &def_temp)[1]= ((uchar*) (M)
)[2];\
((uchar*) &def_temp)[2]= ((uchar*) (M)
)[1];\
((uchar*) &def_temp)[3]= ((uchar*) (M)
)[0];\
((uchar*) &def_temp)[4]= ((uchar*) (M)
)[7];\
((uchar*) &def_temp)[5]= ((uchar*) (M)
)[6];\
((uchar*) &def_temp)[6]= ((uchar*) (M)
)[5];\
((uchar*) &def_temp)[7]= ((uchar*) (M)
)[4];\
(V)=
def_temp; }
#else
#define mi_float8store(T,V) {
*(T)= ((byte
*) &V)[7];\
*((T)+1)=(char) ((byte
*) &V)[6];\
*((T)+2)=(char) ((byte
*) &V)[5];\
*((T)+3)=(char) ((byte
*) &V)[4];\
*((T)+4)=(char) ((byte
*) &V)[3];\
*((T)+5)=(char) ((byte
*) &V)[2];\
*((T)+6)=(char) ((byte
*) &V)[1];\
*((T)+7)=(char) ((byte
*) &V)[0];}
#define mi_float8store(T,V) {
((uchar*) (T))[0]= ((uchar
*) &V)[7];\
((uchar*) (T))[1]= ((uchar
*) &V)[6];\
((uchar*) (T))[2]= ((uchar
*) &V)[5];\
((uchar*) (T))[3]= ((uchar
*) &V)[4];\
((uchar*) (T))[4]= ((uchar
*) &V)[3];\
((uchar*) (T))[5]= ((uchar
*) &V)[2];\
((uchar*) (T))[6]= ((uchar
*) &V)[1];\
((uchar*) (T))[7]= ((uchar
*) &V)[0];}
#define mi_float8get(V,M) { double def_temp;\
((byte*) &def_temp)[0]=(M
)[7];\
((byte*) &def_temp)[1]=(M
)[6];\
((byte*) &def_temp)[2]=(M
)[5];\
((byte*) &def_temp)[3]=(M
)[4];\
((byte*) &def_temp)[4]=(M
)[3];\
((byte*) &def_temp)[5]=(M
)[2];\
((byte*) &def_temp)[6]=(M
)[1];\
((byte*) &def_temp)[7]=(M
)[0];\
(V)=
def_temp; }
((uchar*) &def_temp)[0]= ((uchar*) (M)
)[7];\
((uchar*) &def_temp)[1]= ((uchar*) (M)
)[6];\
((uchar*) &def_temp)[2]= ((uchar*) (M)
)[5];\
((uchar*) &def_temp)[3]= ((uchar*) (M)
)[4];\
((uchar*) &def_temp)[4]= ((uchar*) (M)
)[3];\
((uchar*) &def_temp)[5]= ((uchar*) (M)
)[2];\
((uchar*) &def_temp)[6]= ((uchar*) (M)
)[1];\
((uchar*) &def_temp)[7]= ((uchar*) (M)
)[0];\
(V)=
def_temp; }
#endif
/* __FLOAT_WORD_ORDER */
#endif
/* WORDS_BIGENDIAN */
/* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */
#ifdef BIG_TABLES
#define mi_rowstore(T,A) mi_int8store(T,A)
#define mi_rowstore(T,A) mi_int8store(T,
A)
#define mi_rowkorr(T) mi_uint8korr(T)
#else
#define mi_rowstore(T,A) { mi_int4store(T,0); mi_int4store(((T)+4),A); }
#define mi_rowkorr(T) mi_uint4korr((T)+4)
#define mi_rowstore(T,A) { mi_int4store(T, 0);\
mi_int4store(((uchar*) (T) + 4), A); }
#define mi_rowkorr(T) mi_uint4korr((uchar*) (T) + 4)
#endif
#if SIZEOF_OFF_T > 4
#define mi_sizestore(T,A)
mi_int8store(T,
A)
#define mi_sizestore(T,A)
mi_int8store(T,
A)
#define mi_sizekorr(T) mi_uint8korr(T)
#else
#define mi_sizestore(T,A) { if ((A) == HA_OFFSET_ERROR) bfill((char*) (T),8,255); else { mi_int4store((T),0); mi_int4store(((T)+4),A); }}
#define mi_sizekorr(T) mi_uint4korr((T)+4)
#define mi_sizestore(T,A) { if ((A) == HA_OFFSET_ERROR)\
bfill((char*) (T), 8, 255);\
else { mi_int4store((T), 0);\
mi_int4store(((T) + 4), A); }}
#define mi_sizekorr(T) mi_uint4korr((uchar*) (T) + 4)
#endif
mysql-test/r/ndb_basic.result
View file @
9d615368
...
...
@@ -24,15 +24,15 @@ pk1 attr1 attr2 attr3
9410 1 NULL 9412
9411 9413 17 9413
UPDATE t1 SET pk1=2 WHERE attr1=1;
SELECT * FROM t1;
SELECT * FROM t1
ORDER BY pk1
;
pk1 attr1 attr2 attr3
2 1 NULL 9412
9411 9413 17 9413
UPDATE t1 SET pk1=pk1 + 1;
SELECT * FROM t1;
SELECT * FROM t1
ORDER BY pk1
;
pk1 attr1 attr2 attr3
9412 9413 17 9413
3 1 NULL 9412
9412 9413 17 9413
DELETE FROM t1;
SELECT * FROM t1;
pk1 attr1 attr2 attr3
...
...
mysql-test/r/ndb_lock.result
View file @
9d615368
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
create table t1 (x integer not null primary key, y varchar(32)) engine = ndb;
insert into t1 values (1,'one'), (2,'two');
select * from t1;
select * from t1
order by x
;
x y
2 two
1 one
select * from t1;
x y
2 two
select * from t1 order by x;
x y
1 one
2 two
start transaction;
insert into t1 values (3,'three');
start transaction;
select * from t1;
select * from t1
order by x
;
x y
2 two
1 one
2 two
commit;
select * from t1;
select * from t1
order by x
;
x y
1 one
2 two
3 three
1 one
commit;
mysql-test/t/ndb_basic.test
View file @
9d615368
...
...
@@ -31,9 +31,9 @@ SELECT * FROM t1;
# Update primary key
UPDATE
t1
SET
pk1
=
2
WHERE
attr1
=
1
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
UPDATE
t1
SET
pk1
=
pk1
+
1
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
ORDER
BY
pk1
;
# Delete the record
DELETE
FROM
t1
;
...
...
mysql-test/t/ndb_lock.test
View file @
9d615368
...
...
@@ -19,20 +19,20 @@ DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7;
connection
con1
;
create
table
t1
(
x
integer
not
null
primary
key
,
y
varchar
(
32
))
engine
=
ndb
;
insert
into
t1
values
(
1
,
'one'
),
(
2
,
'two'
);
select
*
from
t1
;
select
*
from
t1
order
by
x
;
connection
con2
;
select
*
from
t1
;
select
*
from
t1
order
by
x
;
connection
con1
;
start
transaction
;
insert
into
t1
values
(
3
,
'three'
);
connection
con2
;
start
transaction
;
select
*
from
t1
;
start
transaction
;
select
*
from
t1
order
by
x
;
connection
con1
;
commit
;
connection
con2
;
select
*
from
t1
;
select
*
from
t1
order
by
x
;
commit
;
ndb/src/common/util/ConfigValues.cpp
View file @
9d615368
...
...
@@ -261,9 +261,9 @@ directory(Uint32 sz){
ConfigValuesFactory
::
ConfigValuesFactory
(
Uint32
keys
,
Uint32
data
){
m_sectionCounter
=
(
1
<<
KP_SECTION_SHIFT
);
m_freeKeys
=
directory
(
keys
);
m_freeData
=
data
;
m_freeData
=
(
data
+
7
)
&
~
7
;
m_currentSection
=
0
;
m_cfg
=
create
(
m_freeKeys
,
d
ata
);
m_cfg
=
create
(
m_freeKeys
,
m_freeD
ata
);
}
ConfigValuesFactory
::
ConfigValuesFactory
(
ConfigValues
*
cfg
){
...
...
@@ -316,6 +316,7 @@ ConfigValuesFactory::expand(Uint32 fk, Uint32 fs){
m_freeKeys
=
(
m_freeKeys
>=
fk
?
m_cfg
->
m_size
:
fk
+
m_cfg
->
m_size
);
m_freeData
=
(
m_freeData
>=
fs
?
m_cfg
->
m_dataSize
:
fs
+
m_cfg
->
m_dataSize
);
m_freeKeys
=
directory
(
m_freeKeys
);
m_freeData
=
(
m_freeData
+
7
)
&
~
7
;
ConfigValues
*
m_tmp
=
m_cfg
;
m_cfg
=
create
(
m_freeKeys
,
m_freeData
);
...
...
@@ -333,6 +334,7 @@ ConfigValuesFactory::shrink(){
m_freeKeys
=
m_cfg
->
m_size
-
m_freeKeys
;
m_freeData
=
m_cfg
->
m_dataSize
-
m_freeData
;
m_freeKeys
=
directory
(
m_freeKeys
);
m_freeData
=
(
m_freeData
+
7
)
&
~
7
;
ConfigValues
*
m_tmp
=
m_cfg
;
m_cfg
=
create
(
m_freeKeys
,
m_freeData
);
...
...
ndb/src/mgmsrv/MgmtSrvr.hpp
View file @
9d615368
...
...
@@ -68,6 +68,9 @@ public:
virtual
void
println_statistics
(
const
BaseString
&
s
)
=
0
;
};
// some compilers need all of this
class
Allocated_resources
;
friend
class
Allocated_resources
;
class
Allocated_resources
{
public:
Allocated_resources
(
class
MgmtSrvr
&
m
);
...
...
sql/mysqld.cc
View file @
9d615368
...
...
@@ -5061,6 +5061,8 @@ struct show_var_st status_vars[]= {
{
"Com_create_function"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_CREATE_FUNCTION
),
SHOW_LONG
},
{
"Com_create_index"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_CREATE_INDEX
),
SHOW_LONG
},
{
"Com_create_table"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_CREATE_TABLE
),
SHOW_LONG
},
{
"Com_dealloc_sql"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DEALLOCATE_PREPARE
),
SHOW_LONG
},
{
"Com_delete"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DELETE
),
SHOW_LONG
},
{
"Com_delete_multi"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DELETE_MULTI
),
SHOW_LONG
},
{
"Com_do"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DO
),
SHOW_LONG
},
...
...
@@ -5069,6 +5071,8 @@ struct show_var_st status_vars[]= {
{
"Com_drop_index"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DROP_INDEX
),
SHOW_LONG
},
{
"Com_drop_table"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DROP_TABLE
),
SHOW_LONG
},
{
"Com_drop_user"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DROP_USER
),
SHOW_LONG
},
{
"Com_execute_sql"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_EXECUTE
),
SHOW_LONG
},
{
"Com_flush"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_FLUSH
),
SHOW_LONG
},
{
"Com_grant"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_GRANT
),
SHOW_LONG
},
{
"Com_ha_close"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_HA_CLOSE
),
SHOW_LONG
},
...
...
@@ -5084,6 +5088,8 @@ struct show_var_st status_vars[]= {
{
"Com_lock_tables"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_LOCK_TABLES
),
SHOW_LONG
},
{
"Com_optimize"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_OPTIMIZE
),
SHOW_LONG
},
{
"Com_preload_keys"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_PRELOAD_KEYS
),
SHOW_LONG
},
{
"Com_prepare_sql"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_PREPARE
),
SHOW_LONG
},
{
"Com_purge"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_PURGE
),
SHOW_LONG
},
{
"Com_purge_before_date"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_PURGE_BEFORE
),
SHOW_LONG
},
{
"Com_rename_table"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_RENAME_TABLE
),
SHOW_LONG
},
...
...
@@ -5130,12 +5136,6 @@ struct show_var_st status_vars[]= {
{
"Com_unlock_tables"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_UNLOCK_TABLES
),
SHOW_LONG
},
{
"Com_update"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_UPDATE
),
SHOW_LONG
},
{
"Com_update_multi"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_UPDATE_MULTI
),
SHOW_LONG
},
{
"Com_prepare_sql"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_PREPARE
),
SHOW_LONG
},
{
"Com_execute_sql"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_EXECUTE
),
SHOW_LONG
},
{
"Com_dealloc_sql"
,
(
char
*
)
(
com_stat
+
(
uint
)
SQLCOM_DEALLOCATE_PREPARE
),
SHOW_LONG
},
{
"Connections"
,
(
char
*
)
&
thread_id
,
SHOW_LONG_CONST
},
{
"Created_tmp_disk_tables"
,
(
char
*
)
&
created_tmp_disk_tables
,
SHOW_LONG
},
{
"Created_tmp_files"
,
(
char
*
)
&
my_tmp_file_created
,
SHOW_LONG
},
...
...
@@ -5146,6 +5146,7 @@ struct show_var_st status_vars[]= {
{
"Flush_commands"
,
(
char
*
)
&
refresh_version
,
SHOW_LONG_CONST
},
{
"Handler_commit"
,
(
char
*
)
&
ha_commit_count
,
SHOW_LONG
},
{
"Handler_delete"
,
(
char
*
)
&
ha_delete_count
,
SHOW_LONG
},
{
"Handler_discover"
,
(
char
*
)
&
ha_discover_count
,
SHOW_LONG
},
{
"Handler_read_first"
,
(
char
*
)
&
ha_read_first_count
,
SHOW_LONG
},
{
"Handler_read_key"
,
(
char
*
)
&
ha_read_key_count
,
SHOW_LONG
},
{
"Handler_read_next"
,
(
char
*
)
&
ha_read_next_count
,
SHOW_LONG
},
...
...
@@ -5155,13 +5156,12 @@ struct show_var_st status_vars[]= {
{
"Handler_rollback"
,
(
char
*
)
&
ha_rollback_count
,
SHOW_LONG
},
{
"Handler_update"
,
(
char
*
)
&
ha_update_count
,
SHOW_LONG
},
{
"Handler_write"
,
(
char
*
)
&
ha_write_count
,
SHOW_LONG
},
{
"Handler_discover"
,
(
char
*
)
&
ha_discover_count
,
SHOW_LONG
},
{
"Key_blocks_not_flushed"
,
(
char
*
)
&
dflt_key_cache_var
.
global_blocks_changed
,
SHOW_KEY_CACHE_LONG
},
{
"Key_blocks_used"
,
(
char
*
)
&
dflt_key_cache_var
.
blocks_used
,
SHOW_KEY_CACHE_CONST_LONG
},
{
"Key_blocks_unused"
,
(
char
*
)
&
dflt_key_cache_var
.
blocks_unused
,
SHOW_KEY_CACHE_CONST_LONG
},
{
"Key_blocks_used"
,
(
char
*
)
&
dflt_key_cache_var
.
blocks_used
,
SHOW_KEY_CACHE_CONST_LONG
},
{
"Key_read_requests"
,
(
char
*
)
&
dflt_key_cache_var
.
global_cache_r_requests
,
SHOW_KEY_CACHE_LONG
},
{
"Key_reads"
,
(
char
*
)
&
dflt_key_cache_var
.
global_cache_read
,
...
...
sql/set_var.cc
View file @
9d615368
...
...
@@ -611,8 +611,8 @@ struct show_var_st init_vars[]= {
#ifdef HAVE_BERKELEY_DB
{
"bdb_cache_size"
,
(
char
*
)
&
berkeley_cache_size
,
SHOW_LONG
},
{
"bdb_home"
,
(
char
*
)
&
berkeley_home
,
SHOW_CHAR_PTR
},
{
"bdb_logdir"
,
(
char
*
)
&
berkeley_logdir
,
SHOW_CHAR_PTR
},
{
"bdb_log_buffer_size"
,
(
char
*
)
&
berkeley_log_buffer_size
,
SHOW_LONG
},
{
"bdb_logdir"
,
(
char
*
)
&
berkeley_logdir
,
SHOW_CHAR_PTR
},
{
"bdb_max_lock"
,
(
char
*
)
&
berkeley_max_lock
,
SHOW_LONG
},
{
"bdb_shared_data"
,
(
char
*
)
&
berkeley_shared_data
,
SHOW_BOOL
},
{
"bdb_tmpdir"
,
(
char
*
)
&
berkeley_tmpdir
,
SHOW_CHAR_PTR
},
...
...
@@ -652,9 +652,9 @@ struct show_var_st init_vars[]= {
{
"have_bdb"
,
(
char
*
)
&
have_berkeley_db
,
SHOW_HAVE
},
{
"have_compress"
,
(
char
*
)
&
have_compress
,
SHOW_HAVE
},
{
"have_crypt"
,
(
char
*
)
&
have_crypt
,
SHOW_HAVE
},
{
"have_geometry"
,
(
char
*
)
&
have_geometry
,
SHOW_HAVE
},
{
"have_innodb"
,
(
char
*
)
&
have_innodb
,
SHOW_HAVE
},
{
"have_isam"
,
(
char
*
)
&
have_isam
,
SHOW_HAVE
},
{
"have_geometry"
,
(
char
*
)
&
have_geometry
,
SHOW_HAVE
},
{
"have_ndbcluster"
,
(
char
*
)
&
have_ndbcluster
,
SHOW_HAVE
},
{
"have_openssl"
,
(
char
*
)
&
have_openssl
,
SHOW_HAVE
},
{
"have_query_cache"
,
(
char
*
)
&
have_query_cache
,
SHOW_HAVE
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment