Commit 7e5be0fe authored by unknown's avatar unknown

Merge 5.0-ndb into local, resolve conflicts


ndb/src/kernel/main.cpp:
  Auto merged
ndb/src/kernel/vm/Configuration.hpp:
  Auto merged
ndb/src/mgmapi/mgmapi.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.cpp:
  Auto merged
ndb/src/mgmsrv/MgmtSrvr.hpp:
  Auto merged
ndb/src/mgmsrv/Services.cpp:
  Auto merged
ndb/src/mgmsrv/Services.hpp:
  Auto merged
ndb/include/transporter/TransporterRegistry.hpp:
  Resolve merge conflict (change of parameter name)
ndb/src/common/transporter/TransporterRegistry.cpp:
  Resolve merge conflict (change of parameter name)
parents 9035f5cf 3863b25c
...@@ -983,3 +983,6 @@ vio/test-ssl ...@@ -983,3 +983,6 @@ vio/test-ssl
vio/test-sslclient vio/test-sslclient
vio/test-sslserver vio/test-sslserver
vio/viotest-ssl vio/viotest-ssl
extra/mysqld_error.h
extra/sql_state.h
extra/created_include_files
...@@ -2,6 +2,7 @@ Administrador@light. ...@@ -2,6 +2,7 @@ Administrador@light.
Administrator@co3064164-a. Administrator@co3064164-a.
Administrator@co3064164-a.rochd1.qld.optushome.com.au Administrator@co3064164-a.rochd1.qld.optushome.com.au
Administrator@fred. Administrator@fred.
Administrator@w2k.
Greg@greg-laptop. Greg@greg-laptop.
Miguel@light.local Miguel@light.local
Sinisa@sinisa.nasamreza.org Sinisa@sinisa.nasamreza.org
...@@ -10,6 +11,7 @@ acurtis@pcgem.rdg.cyberkinetica.com ...@@ -10,6 +11,7 @@ acurtis@pcgem.rdg.cyberkinetica.com
administrador@light.hegel.local administrador@light.hegel.local
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
akishkin@work.mysql.com akishkin@work.mysql.com
anjuta@arthur.local
antony@ltantony.dsl-verizon.net antony@ltantony.dsl-verizon.net
antony@ltantony.rdg.cyberkinetica.com antony@ltantony.rdg.cyberkinetica.com
antony@ltantony.rdg.cyberkinetica.homeunix.net antony@ltantony.rdg.cyberkinetica.homeunix.net
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#AUTOMAKE_OPTIONS = nostdinc #AUTOMAKE_OPTIONS = nostdinc
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \ INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \
$(openssl_includes) $(openssl_includes) -I$(top_srcdir)/extra
LIBS = @CLIENT_LIBS@ LIBS = @CLIENT_LIBS@
DEPLIB= ../libmysql/libmysqlclient.la DEPLIB= ../libmysql/libmysqlclient.la
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(DEPLIB) LDADD = @CLIENT_EXTRA_LDFLAGS@ $(DEPLIB)
......
...@@ -748,7 +748,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \ ...@@ -748,7 +748,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \ strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \ sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \ unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
sys/ioctl.h malloc.h sys/malloc.h linux/config.h) sys/ioctl.h malloc.h sys/malloc.h linux/config.h sys/resource.h sys/param.h)
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Check for system libraries. Adds the library to $LIBS # Check for system libraries. Adds the library to $LIBS
...@@ -2724,6 +2724,7 @@ AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl ...@@ -2724,6 +2724,7 @@ AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl
ndb/test/ndbapi/bank/Makefile dnl ndb/test/ndbapi/bank/Makefile dnl
ndb/test/tools/Makefile dnl ndb/test/tools/Makefile dnl
ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl
ndb/include/ndb_version.h ndb/include/ndb_global.h dnl
) )
fi fi
......
...@@ -15,9 +15,26 @@ ...@@ -15,9 +15,26 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include \ INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include \
@ndbcluster_includes@ -I$(top_srcdir)/sql @ndbcluster_includes@ -I$(top_srcdir)/sql \
-I$(top_srcdir)/extra
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a ../dbug/libdbug.a ../strings/libmystrings.a
BUILT_SOURCES= mysqld_error.h sql_state.h
pkginclude_HEADERS= $(BUILT_SOURCES)
created_sources = created_include_files
CLEANFILES = $(created_sources)
SUPERCLEANFILES = $(BUILT_SOURCES)
all: $(created_sources)
# This will build mysqld_error.h and sql_state.h
mysqld_error.h: created_include_files
sql_state.h: created_include_files
created_include_files: comp_err
$(top_builddir)/extra/comp_err --charset=$(srcdir)/../sql/share/charsets --out-dir=$(top_builddir)/sql/share/ --header_file=$(top_builddir)/extra/mysqld_error.h --state_file=$(top_builddir)/extra/sql_state.h --in_file=$(srcdir)/../sql/share/errmsg.txt
touch created_include_files
bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \ bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \
resolve_stack_dump mysql_waitpid resolve_stack_dump mysql_waitpid
noinst_PROGRAMS = charset2html noinst_PROGRAMS = charset2html
......
This diff is collapsed.
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
BUILT_SOURCES = mysql_version.h m_ctype.h my_config.h BUILT_SOURCES = mysql_version.h m_ctype.h my_config.h
pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \ pkginclude_HEADERS = my_dbug.h m_string.h my_sys.h my_list.h my_xml.h \
mysql.h mysql_com.h mysqld_error.h mysql_embed.h \ mysql.h mysql_com.h mysql_embed.h \
my_semaphore.h my_pthread.h my_no_pthread.h raid.h \ my_semaphore.h my_pthread.h my_no_pthread.h raid.h \
errmsg.h my_global.h my_net.h my_alloc.h \ errmsg.h my_global.h my_net.h my_alloc.h \
my_getopt.h sslopt-longopts.h my_dir.h typelib.h \ my_getopt.h sslopt-longopts.h my_dir.h typelib.h \
sslopt-vars.h sslopt-case.h sql_common.h keycache.h \ sslopt-vars.h sslopt-case.h sql_common.h keycache.h \
sql_state.h mysql_time.h $(BUILT_SOURCES) mysql_time.h $(BUILT_SOURCES)
noinst_HEADERS = config-win.h config-os2.h config-netware.h \ noinst_HEADERS = config-win.h config-os2.h config-netware.h \
nisam.h heap.h merge.h my_bitmap.h\ nisam.h heap.h merge.h my_bitmap.h\
myisam.h myisampack.h myisammrg.h ft_global.h\ myisam.h myisampack.h myisammrg.h ft_global.h\
......
...@@ -661,6 +661,7 @@ typedef SOCKET_SIZE_TYPE size_socket; ...@@ -661,6 +661,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
#define UINT_MAX16 0xFFFF #define UINT_MAX16 0xFFFF
#define INT_MIN8 (~0x7F) #define INT_MIN8 (~0x7F)
#define INT_MAX8 0x7F #define INT_MAX8 0x7F
#define UINT_MAX8 0xFF
/* From limits.h instead */ /* From limits.h instead */
#ifndef DBL_MIN #ifndef DBL_MIN
......
...@@ -52,6 +52,13 @@ typedef long my_time_t; ...@@ -52,6 +52,13 @@ typedef long my_time_t;
enum enum_mysql_timestamp_type enum enum_mysql_timestamp_type
str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
uint flags, int *was_cut); uint flags, int *was_cut);
longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
my_bool fuzzy_date, int *was_cut);
ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *time);
ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *time);
ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *time);
ulonglong TIME_to_ulonglong(const MYSQL_TIME *time);
bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time, bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
int *was_cut); int *was_cut);
......
...@@ -537,26 +537,91 @@ enum enum_mysql_stmt_state ...@@ -537,26 +537,91 @@ enum enum_mysql_stmt_state
}; };
/* bind structure */ /*
This structure is used to define bind information, and
internally by the client library.
Public members with their descriptions are listed below
(conventionally `On input' refers to the binds given to
mysql_stmt_bind_param, `On output' refers to the binds given
to mysql_stmt_bind_result):
buffer_type - One of the MYSQL_* types, used to describe
the host language type of buffer.
On output: if column type is different from
buffer_type, column value is automatically converted
to buffer_type before it is stored in the buffer.
buffer - On input: points to the buffer with input data.
On output: points to the buffer capable to store
output data.
The type of memory pointed by buffer must correspond
to buffer_type. See the correspondence table in
the comment to mysql_stmt_bind_param.
The two above members are mandatory for any kind of bind.
buffer_length - the length of the buffer. You don't have to set
it for any fixed length buffer: float, double,
int, etc. It must be set however for variable-length
types, such as BLOBs or STRINGs.
length - On input: in case when lengths of input values
are different for each execute, you can set this to
point at a variable containining value length. This
way the value length can be different in each execute.
If length is not NULL, buffer_length is not used.
Note, length can even point at buffer_length if
you keep bind structures around while fetching:
this way you can change buffer_length before
each execution, everything will work ok.
On output: if length is set, mysql_stmt_fetch will
write column length into it.
is_null - On input: points to a boolean variable that should
be set to TRUE for NULL values.
This member is useful only if your data may be
NULL in some but not all cases.
If your data is never NULL, is_null should be set to 0.
If your data is always NULL, set buffer_type
to MYSQL_TYPE_NULL, and is_null will not be used.
is_unsigned - On input: used to signify that values provided for one
of numeric types are unsigned.
On output describes signedness of the output buffer.
If, taking into account is_unsigned flag, column data
is out of range of the output buffer, data for this column
is regarded truncated. Note that this has no correspondence
to the sign of result set column, if you need to find it out
use mysql_stmt_result_metadata.
error - where to write a truncation error if it is present.
possible error value is:
0 no truncation
1 value is out of range or buffer is too small
Please note that MYSQL_BIND also has internals members.
*/
typedef struct st_mysql_bind typedef struct st_mysql_bind
{ {
unsigned long *length; /* output length pointer */ unsigned long *length; /* output length pointer */
my_bool *is_null; /* Pointer to null indicator */ my_bool *is_null; /* Pointer to null indicator */
void *buffer; /* buffer to get/put data */ void *buffer; /* buffer to get/put data */
/* set this if you want to track data truncations happened during fetch */
my_bool *error;
enum enum_field_types buffer_type; /* buffer type */ enum enum_field_types buffer_type; /* buffer type */
unsigned long buffer_length; /* buffer length, must be set for str/binary */ /* output buffer length, must be set when fetching str/binary */
unsigned long buffer_length;
/* Following are for internal use. Set by mysql_stmt_bind_param */ unsigned char *row_ptr; /* for the current data position */
unsigned char *inter_buffer; /* for the current data position */
unsigned long offset; /* offset position for char/binary fetch */ unsigned long offset; /* offset position for char/binary fetch */
unsigned long internal_length; /* Used if length is 0 */ unsigned long length_value; /* Used if length is 0 */
unsigned int param_number; /* For null count and error messages */ unsigned int param_number; /* For null count and error messages */
unsigned int pack_length; /* Internal length for packed data */ unsigned int pack_length; /* Internal length for packed data */
my_bool error_value; /* used if error is 0 */
my_bool is_unsigned; /* set if integer type is unsigned */ my_bool is_unsigned; /* set if integer type is unsigned */
my_bool long_data_used; /* If used with mysql_send_long_data */ my_bool long_data_used; /* If used with mysql_send_long_data */
my_bool internal_is_null; /* Used if is_null is 0 */ my_bool is_null_value; /* Used if is_null is 0 */
void (*store_param_func)(NET *net, struct st_mysql_bind *param); void (*store_param_func)(NET *net, struct st_mysql_bind *param);
void (*fetch_result)(struct st_mysql_bind *, unsigned char **row); void (*fetch_result)(struct st_mysql_bind *, MYSQL_FIELD *,
unsigned char **row);
void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *, void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
unsigned char **row); unsigned char **row);
} MYSQL_BIND; } MYSQL_BIND;
...@@ -598,7 +663,7 @@ typedef struct st_mysql_stmt ...@@ -598,7 +663,7 @@ typedef struct st_mysql_stmt
/* Types of input parameters should be sent to server */ /* Types of input parameters should be sent to server */
my_bool send_types_to_server; my_bool send_types_to_server;
my_bool bind_param_done; /* input buffers were supplied */ my_bool bind_param_done; /* input buffers were supplied */
my_bool bind_result_done; /* output buffers were supplied */ unsigned char bind_result_done; /* output buffers were supplied */
/* mysql_stmt_close() had to cancel this result */ /* mysql_stmt_close() had to cancel this result */
my_bool unbuffered_fetch_cancelled; my_bool unbuffered_fetch_cancelled;
/* /*
...@@ -704,7 +769,8 @@ void STDCALL mysql_close(MYSQL *sock); ...@@ -704,7 +769,8 @@ void STDCALL mysql_close(MYSQL *sock);
/* status return codes */ /* status return codes */
#define MYSQL_NO_DATA 100 #define MYSQL_NO_DATA 100
#define MYSQL_DATA_TRUNCATED 101
#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT) #define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
......
This diff is collapsed.
/* Copyright (C) 2000-2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
/*
This file includes a mapping from mysql_errno.h to sql_state (as used by
MyODBC) and jdbc_state.
It's suitable to include into a C struct for further processing
The first column is the mysqld server error (declared in mysqld_error.h),
the second column is the ODBC state (which the 4.1 server sends out by
default) and the last is the state used by the JDBC driver.
If the last column is "" then it means that the JDBC driver is using the
ODBC state.
The errors in this file are sorted in the same order as in mysqld_error.h
to allow one to do binary searches for the sqlstate.
*/
ER_DUP_KEY, "23000", "",
ER_OUTOFMEMORY, "HY001", "S1001",
ER_OUT_OF_SORTMEMORY, "HY001", "S1001",
ER_CON_COUNT_ERROR, "08004", "",
ER_BAD_HOST_ERROR, "08S01", "",
ER_HANDSHAKE_ERROR, "08S01", "",
ER_DBACCESS_DENIED_ERROR, "42000", "",
ER_ACCESS_DENIED_ERROR, "28000", "",
ER_NO_DB_ERROR, "3D000", "",
ER_UNKNOWN_COM_ERROR, "08S01", "",
ER_BAD_NULL_ERROR, "23000", "",
ER_BAD_DB_ERROR, "42000", "",
ER_TABLE_EXISTS_ERROR, "42S01", "",
ER_BAD_TABLE_ERROR, "42S02", "",
ER_NON_UNIQ_ERROR, "23000", "",
ER_SERVER_SHUTDOWN, "08S01", "",
ER_BAD_FIELD_ERROR, "42S22", "S0022",
ER_WRONG_FIELD_WITH_GROUP, "42000", "S1009",
ER_WRONG_GROUP_FIELD, "42000", "S1009",
ER_WRONG_SUM_SELECT, "42000", "S1009",
ER_WRONG_VALUE_COUNT, "21S01", "",
ER_TOO_LONG_IDENT, "42000", "S1009",
ER_DUP_FIELDNAME, "42S21", "S1009",
ER_DUP_KEYNAME, "42000", "S1009",
ER_DUP_ENTRY, "23000", "S1009",
ER_WRONG_FIELD_SPEC, "42000", "S1009",
ER_PARSE_ERROR, "42000", "",
ER_EMPTY_QUERY, "42000" , "",
ER_NONUNIQ_TABLE, "42000", "S1009",
ER_INVALID_DEFAULT, "42000", "S1009",
ER_MULTIPLE_PRI_KEY, "42000", "S1009",
ER_TOO_MANY_KEYS, "42000", "S1009",
ER_TOO_MANY_KEY_PARTS, "42000", "S1009",
ER_TOO_LONG_KEY, "42000", "S1009",
ER_KEY_COLUMN_DOES_NOT_EXITS, "42000", "S1009",
ER_BLOB_USED_AS_KEY, "42000", "S1009",
ER_TOO_BIG_FIELDLENGTH, "42000", "S1009",
ER_WRONG_AUTO_KEY, "42000", "S1009",
ER_FORCING_CLOSE, "08S01", "",
ER_IPSOCK_ERROR, "08S01", "",
ER_NO_SUCH_INDEX, "42S12", "S1009",
ER_WRONG_FIELD_TERMINATORS, "42000", "S1009",
ER_BLOBS_AND_NO_TERMINATED, "42000", "S1009",
ER_CANT_REMOVE_ALL_FIELDS, "42000", "",
ER_CANT_DROP_FIELD_OR_KEY, "42000", "",
ER_BLOB_CANT_HAVE_DEFAULT, "42000", "",
ER_WRONG_DB_NAME, "42000", "",
ER_WRONG_TABLE_NAME, "42000", "",
ER_TOO_BIG_SELECT, "42000", "",
ER_UNKNOWN_PROCEDURE, "42000", "",
ER_WRONG_PARAMCOUNT_TO_PROCEDURE, "42000", "",
ER_UNKNOWN_TABLE, "42S02", "",
ER_FIELD_SPECIFIED_TWICE, "42000", "",
ER_UNSUPPORTED_EXTENSION, "42000", "",
ER_TABLE_MUST_HAVE_COLUMNS, "42000", "",
ER_UNKNOWN_CHARACTER_SET, "42000", "",
ER_TOO_BIG_ROWSIZE, "42000", "",
ER_WRONG_OUTER_JOIN, "42000", "",
ER_NULL_COLUMN_IN_INDEX, "42000", "",
ER_PASSWORD_ANONYMOUS_USER, "42000", "",
ER_PASSWORD_NOT_ALLOWED, "42000", "",
ER_PASSWORD_NO_MATCH, "42000", "",
ER_WRONG_VALUE_COUNT_ON_ROW, "21S01", "",
ER_INVALID_USE_OF_NULL, "22004", "",
ER_REGEXP_ERROR, "42000", "",
ER_MIX_OF_GROUP_FUNC_AND_FIELDS,"42000", "",
ER_NONEXISTING_GRANT, "42000", "",
ER_TABLEACCESS_DENIED_ERROR, "42000", "",
ER_COLUMNACCESS_DENIED_ERROR, "42000", "",
ER_ILLEGAL_GRANT_FOR_TABLE, "42000", "",
ER_GRANT_WRONG_HOST_OR_USER, "42000", "",
ER_NO_SUCH_TABLE, "42S02", "",
ER_NONEXISTING_TABLE_GRANT, "42000", "",
ER_NOT_ALLOWED_COMMAND, "42000", "",
ER_SYNTAX_ERROR, "42000", "",
ER_ABORTING_CONNECTION, "08S01", "",
ER_NET_PACKET_TOO_LARGE, "08S01", "",
ER_NET_READ_ERROR_FROM_PIPE, "08S01", "",
ER_NET_FCNTL_ERROR, "08S01", "",
ER_NET_PACKETS_OUT_OF_ORDER, "08S01", "",
ER_NET_UNCOMPRESS_ERROR, "08S01", "",
ER_NET_READ_ERROR, "08S01", "",
ER_NET_READ_INTERRUPTED, "08S01", "",
ER_NET_ERROR_ON_WRITE, "08S01", "",
ER_NET_WRITE_INTERRUPTED, "08S01", "",
ER_TOO_LONG_STRING, "42000", "",
ER_TABLE_CANT_HANDLE_BLOB, "42000", "",
ER_TABLE_CANT_HANDLE_AUTO_INCREMENT, "42000", "",
ER_WRONG_COLUMN_NAME, "42000", "",
ER_WRONG_KEY_COLUMN, "42000", "",
ER_DUP_UNIQUE, "23000", "",
ER_BLOB_KEY_WITHOUT_LENGTH, "42000", "",
ER_PRIMARY_CANT_HAVE_NULL, "42000", "",
ER_TOO_MANY_ROWS, "42000", "",
ER_REQUIRES_PRIMARY_KEY, "42000", "",
ER_CHECK_NO_SUCH_TABLE, "42000", "",
ER_CHECK_NOT_IMPLEMENTED, "42000", "",
ER_CANT_DO_THIS_DURING_AN_TRANSACTION, "25000", "",
ER_NEW_ABORTING_CONNECTION, "08S01", "",
ER_MASTER_NET_READ, "08S01", "",
ER_MASTER_NET_WRITE, "08S01", "",
ER_TOO_MANY_USER_CONNECTIONS, "42000", "",
ER_READ_ONLY_TRANSACTION, "25000", "",
ER_NO_PERMISSION_TO_CREATE_USER,"42000", "",
ER_LOCK_DEADLOCK, "40001", "",
ER_NO_REFERENCED_ROW, "23000", "",
ER_ROW_IS_REFERENCED, "23000", "",
ER_CONNECT_TO_MASTER, "08S01", "",
ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT,"21000", "",
ER_USER_LIMIT_REACHED, "42000", "",
ER_NO_DEFAULT, "42000", "",
ER_WRONG_VALUE_FOR_VAR, "42000", "",
ER_WRONG_TYPE_FOR_VAR, "42000", "",
ER_CANT_USE_OPTION_HERE, "42000", "",
ER_NOT_SUPPORTED_YET, "42000", "",
ER_WRONG_FK_DEF, "42000", "",
ER_OPERAND_COLUMNS, "21000", "",
ER_SUBQUERY_NO_1_ROW, "21000", "",
ER_ILLEGAL_REFERENCE, "42S22", "",
ER_DERIVED_MUST_HAVE_ALIAS, "42000", "",
ER_SELECT_REDUCED, "01000", "",
ER_TABLENAME_NOT_ALLOWED_HERE, "42000", "",
ER_NOT_SUPPORTED_AUTH_MODE, "08004", "",
ER_SPATIAL_CANT_HAVE_NULL, "42000", "",
ER_COLLATION_CHARSET_MISMATCH, "42000", "",
ER_WARN_TOO_FEW_RECORDS, "01000", "",
ER_WARN_TOO_MANY_RECORDS, "01000", "",
ER_WARN_NULL_TO_NOTNULL, "22004", "",
ER_WARN_DATA_OUT_OF_RANGE, "22003", "",
ER_WARN_DATA_TRUNCATED, "01000", "",
ER_WRONG_NAME_FOR_INDEX, "42000", "",
ER_WRONG_NAME_FOR_CATALOG, "42000", "",
ER_UNKNOWN_STORAGE_ENGINE, "42000", "",
ER_TRUNCATED_WRONG_VALUE, "22007", "",
/* 5.0 */
ER_SP_NO_RECURSIVE_CREATE, "2F003", "",
ER_SP_ALREADY_EXISTS, "42000", "",
ER_SP_DOES_NOT_EXIST, "42000", "",
/*ER_SP_DROP_FAILED*/
/*ER_SP_STORE_FAILED*/
ER_SP_LILABEL_MISMATCH, "42000", "",
ER_SP_LABEL_REDEFINE, "42000", "",
ER_SP_LABEL_MISMATCH, "42000", "",
ER_SP_UNINIT_VAR, "01000", "",
ER_SP_BADSELECT, "0A000", "",
ER_SP_BADRETURN, "42000", "",
ER_SP_BADSTATEMENT, "0A000", "",
ER_UPDATE_LOG_DEPRECATED_IGNORED, "42000", "",
ER_UPDATE_LOG_DEPRECATED_TRANSLATED, "42000", "",
ER_QUERY_INTERRUPTED, "70100", "",
ER_SP_WRONG_NO_OF_ARGS, "42000", "",
ER_SP_COND_MISMATCH, "42000", "",
ER_SP_NORETURN, "42000", "",
ER_SP_NORETURNEND, "2F005", "",
ER_SP_BAD_CURSOR_QUERY, "42000", "",
ER_SP_BAD_CURSOR_SELECT, "42000", "",
ER_SP_CURSOR_MISMATCH, "42000", "",
ER_SP_CURSOR_ALREADY_OPEN, "24000", "",
ER_SP_CURSOR_NOT_OPEN, "24000", "",
ER_SP_UNDECLARED_VAR, "42000", "",
/*ER_SP_WRONG_NO_OF_FETCH_ARGS*/
ER_SP_FETCH_NO_DATA, "02000", "",
ER_SP_DUP_PARAM, "42000", "",
ER_SP_DUP_VAR, "42000", "",
ER_SP_DUP_COND, "42000", "",
ER_SP_DUP_CURS, "42000", "",
/*ER_SP_CANT_ALTER*/
ER_SP_SUBSELECT_NYI, "0A000", "",
ER_SP_NO_USE, "42000", "",
ER_SP_VARCOND_AFTER_CURSHNDLR, "42000", "",
ER_SP_CURSOR_AFTER_HANDLER, "42000", "",
ER_SP_CASE_NOT_FOUND, "20000", "",
ER_DIVISION_BY_ZERO, "22012", "",
ER_ILLEGAL_VALUE_FOR_TYPE, "22007", "",
ER_SP_ACCESS_DENIED_ERROR, "42000", "",
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
target = libmysqlclient.la target = libmysqlclient.la
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@ target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
LIBS = @CLIENT_LIBS@ LIBS = @CLIENT_LIBS@
INCLUDES = -I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@ INCLUDES = -I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@ \
-I$(top_srcdir)/extra
include $(srcdir)/Makefile.shared include $(srcdir)/Makefile.shared
......
This diff is collapsed.
...@@ -25,8 +25,8 @@ target_defs = -DDONT_USE_RAID -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@ ...@@ -25,8 +25,8 @@ target_defs = -DDONT_USE_RAID -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
LIBS = @LIBS@ @openssl_libs@ LIBS = @LIBS@ @openssl_libs@
INCLUDES = @MT_INCLUDES@ \ INCLUDES = @MT_INCLUDES@ \
-I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@ \
-I$(top_srcdir)/extra
## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include ## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include
include $(top_srcdir)/libmysql/Makefile.shared include $(top_srcdir)/libmysql/Makefile.shared
......
...@@ -26,7 +26,9 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \ ...@@ -26,7 +26,9 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
-DDATADIR="\"$(MYSQLDATAdir)\"" \ -DDATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\"" -DSHAREDIR="\"$(MYSQLSHAREdir)\""
INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(top_srcdir)/include \ INCLUDES= @MT_INCLUDES@ @bdb_includes@ -I$(top_srcdir)/include \
-I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/regex \ -I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples \
-I$(top_srcdir)/regex \
-I$(top_srcdir)/extra \
$(openssl_includes) @ZLIB_INCLUDES@ $(openssl_includes) @ZLIB_INCLUDES@
noinst_LIBRARIES = libmysqld_int.a noinst_LIBRARIES = libmysqld_int.a
......
...@@ -15,7 +15,7 @@ link_sources: ...@@ -15,7 +15,7 @@ link_sources:
DEFS = -DEMBEDDED_LIBRARY DEFS = -DEMBEDDED_LIBRARY
INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) \ INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) \
-I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \ -I$(top_srcdir) -I$(top_srcdir)/client -I$(top_srcdir)/regex \
$(openssl_includes) -I$(top_srcdir)/extra $(openssl_includes)
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@ LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @LIBDL@ $(CXXLDFLAGS) LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @LIBDL@ $(CXXLDFLAGS)
......
...@@ -129,7 +129,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -129,7 +129,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
show status like 'Last_query_cost'; show status like 'Last_query_cost';
Variable_name Value Variable_name Value
Last_query_cost 821.838037 Last_query_cost 821.837037
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71; explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c12 = t2.c21 and t2.c22 = t3.c31 and t3.c32 = t4.c41 and t4.c42 = t5.c51 and t5.c52 = t6.c61 and t6.c62 = t7.c71;
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 t1 ALL NULL NULL NULL NULL 3 1 SIMPLE t1 ALL NULL NULL NULL NULL 3
...@@ -141,7 +141,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -141,7 +141,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t6.c62 1 Using index
show status like 'Last_query_cost'; show status like 'Last_query_cost';
Variable_name Value Variable_name Value
Last_query_cost 821.838037 Last_query_cost 821.837037
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
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 t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
...@@ -153,7 +153,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -153,7 +153,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
show status like 'Last_query_cost'; show status like 'Last_query_cost';
Variable_name Value Variable_name Value
Last_query_cost 794.838037 Last_query_cost 794.837037
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71; explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71;
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 t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
...@@ -165,7 +165,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -165,7 +165,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using index
show status like 'Last_query_cost'; show status like 'Last_query_cost';
Variable_name Value Variable_name Value
Last_query_cost 794.838037 Last_query_cost 794.837037
explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; explain select t1.c11 from t1, t2, t3, t4, t5, t6, t7 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
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 t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
...@@ -177,7 +177,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -177,7 +177,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
show status like 'Last_query_cost'; show status like 'Last_query_cost';
Variable_name Value Variable_name Value
Last_query_cost 794.838037 Last_query_cost 794.837037
explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76; explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and t1.c12 = t3.c31 and t1.c13 = t4.c41 and t1.c14 = t5.c51 and t1.c15 = t6.c61 and t1.c16 = t7.c71 and t2.c22 = t3.c32 and t2.c23 = t4.c42 and t2.c24 = t5.c52 and t2.c25 = t6.c62 and t2.c26 = t7.c72 and t3.c33 = t4.c43 and t3.c34 = t5.c53 and t3.c35 = t6.c63 and t3.c36 = t7.c73 and t4.c42 = t5.c54 and t4.c43 = t6.c64 and t4.c44 = t7.c74 and t5.c52 = t6.c65 and t5.c53 = t7.c75 and t6.c62 = t7.c76;
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 t1 ALL PRIMARY NULL NULL NULL 3 1 SIMPLE t1 ALL PRIMARY NULL NULL NULL 3
...@@ -189,7 +189,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -189,7 +189,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where 1 SIMPLE t7 eq_ref PRIMARY PRIMARY 4 test.t1.c16 1 Using where
show status like 'Last_query_cost'; show status like 'Last_query_cost';
Variable_name Value Variable_name Value
Last_query_cost 794.838037 Last_query_cost 794.837037
set optimizer_prune_level=0; set optimizer_prune_level=0;
select @@optimizer_prune_level; select @@optimizer_prune_level;
@@optimizer_prune_level @@optimizer_prune_level
......
...@@ -156,14 +156,14 @@ drop tables testtets.t4, testtets.t1, t2, t3; ...@@ -156,14 +156,14 @@ drop tables testtets.t4, testtets.t1, t2, t3;
drop database testtets; drop database testtets;
select * from information_schema.CHARACTER_SETS select * from information_schema.CHARACTER_SETS
where CHARACTER_SET_NAME like 'latin1%'; where CHARACTER_SET_NAME like 'latin1%';
CHARACTER_SET_NAME DESCRIPTION DEFAULT_COLLATE_NAME MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 latin1_swedish_ci ISO 8859-1 West European 1
SHOW CHARACTER SET LIKE 'latin1%'; SHOW CHARACTER SET LIKE 'latin1%';
Charset Description Default collation Maxlen Charset Description Default collation Maxlen
latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 ISO 8859-1 West European latin1_swedish_ci 1
SHOW CHARACTER SET * LIKE 'latin1%'; SHOW CHARACTER SET * LIKE 'latin1%';
CHARACTER_SET_NAME DESCRIPTION DEFAULT_COLLATE_NAME MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 latin1_swedish_ci ISO 8859-1 West European 1
SHOW CHARACTER SET WHERE CHARACTER_SET_NAME like 'latin1%'; SHOW CHARACTER SET WHERE CHARACTER_SET_NAME like 'latin1%';
Charset Description Default collation Maxlen Charset Description Default collation Maxlen
latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 ISO 8859-1 West European latin1_swedish_ci 1
...@@ -171,8 +171,8 @@ SHOW CHARACTER SET CHARACTER_SET_NAME WHERE CHARACTER_SET_NAME like 'latin1%'; ...@@ -171,8 +171,8 @@ SHOW CHARACTER SET CHARACTER_SET_NAME WHERE CHARACTER_SET_NAME like 'latin1%';
CHARACTER_SET_NAME CHARACTER_SET_NAME
latin1 latin1
SHOW CHARACTER SET * WHERE CHARACTER_SET_NAME like 'latin1%'; SHOW CHARACTER SET * WHERE CHARACTER_SET_NAME like 'latin1%';
CHARACTER_SET_NAME DESCRIPTION DEFAULT_COLLATE_NAME MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 latin1_swedish_ci ISO 8859-1 West European 1
select * from information_schema.COLLATIONS select * from information_schema.COLLATIONS
where COLLATION_NAME like 'latin1%'; where COLLATION_NAME like 'latin1%';
COLLATION_NAME CHARSET ID DEFAULT COMPILED SORTLEN COLLATION_NAME CHARSET ID DEFAULT COMPILED SORTLEN
...@@ -252,6 +252,11 @@ begin ...@@ -252,6 +252,11 @@ begin
select * from t1; select * from t1;
select * from t2; select * from t2;
end| end|
select parameter_style, sql_data_access, dtd_identifier
from information_schema.routines;
parameter_style sql_data_access dtd_identifier
SQL CONTAINS SQL NULL
SQL CONTAINS SQL int
show procedure status; show procedure status;
Db Name Type Definer Modified Created Security_type Comment Db Name Type Definer Modified Created Security_type Comment
test sel2 PROCEDURE root@localhost # # DEFINER test sel2 PROCEDURE root@localhost # # DEFINER
...@@ -385,11 +390,11 @@ NULL test key_1 test t1 UNIQUE ...@@ -385,11 +390,11 @@ NULL test key_1 test t1 UNIQUE
NULL test key_2 test t1 UNIQUE NULL test key_2 test t1 UNIQUE
select * from information_schema.KEY_COLUMN_USAGE where select * from information_schema.KEY_COLUMN_USAGE where
TABLE_SCHEMA= "test"; TABLE_SCHEMA= "test";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT
NULL test PRIMARY NULL test t1 a 1 NULL NULL NULL NULL NULL test PRIMARY NULL test t1 a 1 NULL
NULL test constraint_1 NULL test t1 a 1 NULL NULL NULL NULL NULL test constraint_1 NULL test t1 a 1 NULL
NULL test key_1 NULL test t1 a 1 NULL NULL NULL NULL NULL test key_1 NULL test t1 a 1 NULL
NULL test key_2 NULL test t1 a 1 NULL NULL NULL NULL NULL test key_2 NULL test t1 a 1 NULL
select table_name from information_schema.TABLES where table_schema like "test%"; select table_name from information_schema.TABLES where table_schema like "test%";
table_name table_name
t1 t1
...@@ -410,9 +415,9 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION; ...@@ -410,9 +415,9 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION;
create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION; create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION;
select * from information_schema.views; select * from information_schema.views;
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE
NULL test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` WITH CASCADED CHECK OPTION YES NULL test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES
NULL test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` WITH LOCAL CHECK OPTION YES NULL test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES
NULL test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` WITH CASCADED CHECK OPTION YES NULL test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES
grant select (a) on test.t1 to joe@localhost with grant option; grant select (a) on test.t1 to joe@localhost with grant option;
select * from INFORMATION_SCHEMA.COLUMN_PRIVILEGES; select * from INFORMATION_SCHEMA.COLUMN_PRIVILEGES;
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRANTABLE
...@@ -466,8 +471,8 @@ SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; ...@@ -466,8 +471,8 @@ SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
Table Create Table Table Create Table
character_sets CREATE TEMPORARY TABLE `character_sets` ( character_sets CREATE TEMPORARY TABLE `character_sets` (
`CHARACTER_SET_NAME` varchar(30) NOT NULL default '', `CHARACTER_SET_NAME` varchar(30) NOT NULL default '',
`DESCRIPTION` varchar(60) NOT NULL default '',
`DEFAULT_COLLATE_NAME` varchar(60) NOT NULL default '', `DEFAULT_COLLATE_NAME` varchar(60) NOT NULL default '',
`DESCRIPTION` varchar(60) NOT NULL default '',
`MAXLEN` bigint(3) NOT NULL default '0' `MAXLEN` bigint(3) NOT NULL default '0'
) ENGINE=HEAP DEFAULT CHARSET=utf8 MAX_ROWS=2252 ) ENGINE=HEAP DEFAULT CHARSET=utf8 MAX_ROWS=2252
set names latin2; set names latin2;
...@@ -475,23 +480,23 @@ SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets; ...@@ -475,23 +480,23 @@ SHOW CREATE TABLE INFORMATION_SCHEMA.character_sets;
Table Create Table Table Create Table
character_sets CREATE TEMPORARY TABLE `character_sets` ( character_sets CREATE TEMPORARY TABLE `character_sets` (
`CHARACTER_SET_NAME` varchar(30) NOT NULL default '', `CHARACTER_SET_NAME` varchar(30) NOT NULL default '',
`DESCRIPTION` varchar(60) NOT NULL default '',
`DEFAULT_COLLATE_NAME` varchar(60) NOT NULL default '', `DEFAULT_COLLATE_NAME` varchar(60) NOT NULL default '',
`DESCRIPTION` varchar(60) NOT NULL default '',
`MAXLEN` bigint(3) NOT NULL default '0' `MAXLEN` bigint(3) NOT NULL default '0'
) ENGINE=HEAP DEFAULT CHARSET=utf8 MAX_ROWS=2252 ) ENGINE=HEAP DEFAULT CHARSET=utf8 MAX_ROWS=2252
set names latin1; set names latin1;
create table t1 select * from information_schema.CHARACTER_SETS create table t1 select * from information_schema.CHARACTER_SETS
where CHARACTER_SET_NAME like "latin1"; where CHARACTER_SET_NAME like "latin1";
select * from t1; select * from t1;
CHARACTER_SET_NAME DESCRIPTION DEFAULT_COLLATE_NAME MAXLEN CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 latin1_swedish_ci ISO 8859-1 West European 1
alter table t1 default character set utf8; alter table t1 default character set utf8;
show create table t1; show create table t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
`CHARACTER_SET_NAME` varchar(30) NOT NULL default '', `CHARACTER_SET_NAME` varchar(30) NOT NULL default '',
`DESCRIPTION` varchar(60) NOT NULL default '',
`DEFAULT_COLLATE_NAME` varchar(60) NOT NULL default '', `DEFAULT_COLLATE_NAME` varchar(60) NOT NULL default '',
`DESCRIPTION` varchar(60) NOT NULL default '',
`MAXLEN` bigint(3) NOT NULL default '0' `MAXLEN` bigint(3) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
drop table t1; drop table t1;
...@@ -554,7 +559,7 @@ TABLE_NAME= "vo"; ...@@ -554,7 +559,7 @@ TABLE_NAME= "vo";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
select * from information_schema.KEY_COLUMN_USAGE where select * from information_schema.KEY_COLUMN_USAGE where
TABLE_NAME= "vo"; TABLE_NAME= "vo";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT
drop view vo; drop view vo;
select TABLE_NAME,TABLE_TYPE,ENGINE select TABLE_NAME,TABLE_TYPE,ENGINE
from information_schema.tables from information_schema.tables
...@@ -585,3 +590,40 @@ TABLES ...@@ -585,3 +590,40 @@ TABLES
TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_CONSTRAINTS TABLE_CONSTRAINTS
TABLE_NAMES TABLE_NAMES
use test;
create function sub1(i int) returns int
return i+1;
create table t1(f1 int);
create view t2 (c) as select f1 from t1;
create view t3 (c) as select sub1(1);
create table t4(f1 int, KEY f1_key (f1));
drop table t1;
drop function sub1;
select table_name from information_schema.views
where table_schema='test';
table_name
Warnings:
Warning 1356 View 'test.t2' references invalid table(s) or column(s) or function(s)
Warning 1356 View 'test.t3' references invalid table(s) or column(s) or function(s)
select table_name from information_schema.views
where table_schema='test';
table_name
Warnings:
Warning 1356 View 'test.t2' references invalid table(s) or column(s) or function(s)
Warning 1356 View 'test.t3' references invalid table(s) or column(s) or function(s)
select column_name from information_schema.columns
where table_schema='test';
column_name
f1
Warnings:
Warning 1356 View 'test.t2' references invalid table(s) or column(s) or function(s)
Warning 1356 View 'test.t3' references invalid table(s) or column(s) or function(s)
select index_name from information_schema.statistics where table_schema='test';
index_name
f1_key
select constraint_name from information_schema.table_constraints
where table_schema='test';
constraint_name
drop view t2;
drop view t3;
drop table t4;
...@@ -11,9 +11,9 @@ NULL test t2_ibfk_1 test t2 FOREIGN KEY ...@@ -11,9 +11,9 @@ NULL test t2_ibfk_1 test t2 FOREIGN KEY
NULL test t2_ibfk_2 test t2 FOREIGN KEY NULL test t2_ibfk_2 test t2 FOREIGN KEY
select * from information_schema.KEY_COLUMN_USAGE where select * from information_schema.KEY_COLUMN_USAGE where
TABLE_SCHEMA= "test"; TABLE_SCHEMA= "test";
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT
NULL test PRIMARY NULL test t1 id 1 NULL NULL NULL NULL NULL test PRIMARY NULL test t1 id 1 NULL
NULL test PRIMARY NULL test t2 id 1 NULL NULL NULL NULL NULL test PRIMARY NULL test t2 id 1 NULL
NULL test t2_ibfk_1 NULL test t2 t1_id 1 1 test t1 id NULL test t2_ibfk_1 NULL test t2 t1_id 1 1
NULL test t2_ibfk_2 NULL test t2 t1_id 1 1 test t1 id NULL test t2_ibfk_2 NULL test t2 t1_id 1 1
drop table t2, t1; drop table t2, t1;
...@@ -12,7 +12,7 @@ set GLOBAL init_connect=DEFAULT; ...@@ -12,7 +12,7 @@ set GLOBAL init_connect=DEFAULT;
select @a; select @a;
@a @a
NULL NULL
set global init_connect="create table t1(a char(10));\ set global init_connect="drop table if exists t1; create table t1(a char(10));\
insert into t1 values ('\0');insert into t1 values('abc')"; insert into t1 values ('\0');insert into t1 values('abc')";
select hex(a) from t1; select hex(a) from t1;
hex(a) hex(a)
......
...@@ -983,10 +983,10 @@ create view v1 as select * from t1; ...@@ -983,10 +983,10 @@ create view v1 as select * from t1;
drop table t1; drop table t1;
create table t1 (col1 char(5),newcol2 char(5)); create table t1 (col1 char(5),newcol2 char(5));
insert into v1 values('a','aa'); insert into v1 values('a','aa');
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s)
drop table t1; drop table t1;
select * from v1; select * from v1;
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s)
drop view v1; drop view v1;
create view v1 (a,a) as select 'a','a'; create view v1 (a,a) as select 'a','a';
ERROR 42S21: Duplicate column name 'a' ERROR 42S21: Duplicate column name 'a'
...@@ -1217,11 +1217,11 @@ create table t1 (s1 int); ...@@ -1217,11 +1217,11 @@ create table t1 (s1 int);
create view v1 as select x1() from t1; create view v1 as select x1() from t1;
drop function x1; drop function x1;
select * from v1; select * from v1;
ERROR 42000: FUNCTION test.x1 does not exist ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s)
show table status; show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t1 MyISAM 9 Fixed 0 0 0 21474836479 1024 0 NULL # # NULL latin1_swedish_ci NULL t1 MyISAM 9 Fixed 0 0 0 21474836479 1024 0 NULL # # NULL latin1_swedish_ci NULL
v1 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL # # NULL NULL NULL NULL FUNCTION test.x1 does not exist v1 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL # # NULL NULL NULL NULL View 'test.v1' references invalid table(s) or column(s) or function(s)
drop view v1; drop view v1;
drop table t1; drop table t1;
create view v1 as select 99999999999999999999999999999999999999999999999999999 as col1; create view v1 as select 99999999999999999999999999999999999999999999999999999 as col1;
...@@ -1655,7 +1655,7 @@ test.t1 check status OK ...@@ -1655,7 +1655,7 @@ test.t1 check status OK
drop table t1; drop table t1;
check table v1; check table v1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.v1 check error View 'test.v1' references invalid table(s) or column(s) test.v1 check error View 'test.v1' references invalid table(s) or column(s) or function(s)
drop view v1; drop view v1;
create table t1 (a int); create table t1 (a int);
create table t2 (a int); create table t2 (a int);
......
--debug=d,make_global_read_lock_block_commit_loop --loose-debug=d,make_global_read_lock_block_commit_loop
...@@ -92,6 +92,12 @@ begin ...@@ -92,6 +92,12 @@ begin
end| end|
delimiter ;| delimiter ;|
#
# Bug#7222 information_schema: errors in "routines"
#
select parameter_style, sql_data_access, dtd_identifier
from information_schema.routines;
--replace_column 5 # 6 # --replace_column 5 # 6 #
show procedure status; show procedure status;
--replace_column 5 # 6 # --replace_column 5 # 6 #
...@@ -286,3 +292,29 @@ use test; ...@@ -286,3 +292,29 @@ use test;
show tables; show tables;
use information_schema; use information_schema;
show tables like "T%"; show tables like "T%";
#
# Bug#7212: information_schema: "Can't find file" errors if storage engine gone
# Bug#7211: information_schema: crash if bad view
#
use test;
create function sub1(i int) returns int
return i+1;
create table t1(f1 int);
create view t2 (c) as select f1 from t1;
create view t3 (c) as select sub1(1);
create table t4(f1 int, KEY f1_key (f1));
drop table t1;
drop function sub1;
select table_name from information_schema.views
where table_schema='test';
select table_name from information_schema.views
where table_schema='test';
select column_name from information_schema.columns
where table_schema='test';
select index_name from information_schema.statistics where table_schema='test';
select constraint_name from information_schema.table_constraints
where table_schema='test';
drop view t2;
drop view t3;
drop table t4;
...@@ -19,7 +19,7 @@ connect (con3,localhost,user_1,,); ...@@ -19,7 +19,7 @@ connect (con3,localhost,user_1,,);
connection con3; connection con3;
select @a; select @a;
connection con0; connection con0;
set global init_connect="create table t1(a char(10));\ set global init_connect="drop table if exists t1; create table t1(a char(10));\
insert into t1 values ('\0');insert into t1 values('abc')"; insert into t1 values ('\0');insert into t1 values('abc')";
connect (con4,localhost,user_1,,); connect (con4,localhost,user_1,,);
connection con4; connection con4;
......
...@@ -1169,7 +1169,7 @@ create function x1 () returns int return 5; ...@@ -1169,7 +1169,7 @@ create function x1 () returns int return 5;
create table t1 (s1 int); create table t1 (s1 int);
create view v1 as select x1() from t1; create view v1 as select x1() from t1;
drop function x1; drop function x1;
-- error 1305 -- error 1356
select * from v1; select * from v1;
--replace_column 12 # 13 # --replace_column 12 # 13 #
--replace_result "2147483647 " "21474836479 " --replace_result "2147483647 " "21474836479 "
......
...@@ -17,3 +17,13 @@ dist-hook: ...@@ -17,3 +17,13 @@ dist-hook:
done; \ done; \
fi; \ fi; \
done done
windoze:
for i in `find . -name 'Makefile.am'`; do make -C `dirname $$i` windoze-dsp; done
windoze-dsp:
all-windoze-dsp: windoze
find . -name '*.dsp' | grep -v SCCS | xargs unix2dos
$(top_srcdir)/ndb/config/make-win-dsw.sh | unix2dos > ndb.dsw
tar cvfz ndb-win-dsp.tar.gz ndb.dsw `find . -name '*.dsp' | grep -v SCCS`
cat <<EOF
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
EOF
for i in `find . -name '*.dsp' | grep -v SCCS`
do
name=`basename $i | sed 's/\.dsp//'`
cat<<EOF
Project: "$name"="`echo $i | sed 's/\//\\\/g'`" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
EOF
done
cat<<EOF
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
EOF
#!/bin/sh
dst=$1
shift
out=`echo $* | sed 's/-I\([^ ]*\)/\/I "\1"/g'`
sed -e "s!@includes@!$out!g" $dst > /tmp/$dst.$$
mv /tmp/$dst.$$ $dst
# Microsoft Developer Studio Project File - Name="@name@" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=@name@ - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "@name@.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "@name@.mak" CFG="@name@ - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "@name@ - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "@name@ - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "@name@ - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "release"
# PROP Intermediate_Dir "release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /D "WIN32" /D "DBUG_OFF" /D "_WINDOWS" /D "NDEBUG" /FD /c
# ADD BASE CPP @includes@
# ADD CPP @includes@
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:".\lib_release\@name@.lib"
@release_libs@
!ELSEIF "$(CFG)" == "@name@ - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "debug"
# PROP Intermediate_Dir "debug"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /D "WIN32" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /FD /c
# ADD BASE CPP @includes@
# ADD CPP @includes@
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x409
# ADD RSC /l 0x409
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=xilink6.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:".\lib_debug\@name@.lib"
@debug_libs@
!ENDIF
# Begin Target
# Name "@name@ - Win32 Release"
# Name "@name@ - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
@sources@
# End Group
# End Target
# End Project
#!/bin/sh
dst=$1
shift
type=$1
shift
add_lib(){
echo `dirname $2`/$1/`basename $2 | sed "s/\.[l]*a/$3.lib/g"`
}
out_rel=
out_deb=
out_tls_rel=
out_tls_deb=
for i in $*
do
# mysql VC++ project files have for some unknown reason
# choosen NOT to put libdbug.lib in $(topdir)./dbug but rather in $(topdir)
# the same goes for mysys and strings
lib=$i
case $i in
*libdbug.a | *libmysys.a | *libmystrings.a)
lib=`echo $i | sed s'!dbug\/lib!!' | sed 's!mysys\/lib!!' | sed 's!strings\/libmy!!'`
echo "Changing from $i to $lib"
;;
esac
if [ `echo $i | grep -c gcc` -eq 0 ]
then
out_rel="${out_rel} `add_lib lib_release $lib`"
out_deb="${out_deb} `add_lib lib_debug $lib`"
out_tls_rel="${out_tls_rel} `add_lib lib_release $lib _tls`"
out_tls_deb="${out_tls_deb} `add_lib lib_debug $lib _tls`"
fi
done
fix(){
echo "# ADD BASE ${type}32 $*\n# ADD ${type}32 $*\n"
}
if [ "$out_rel" ]
then
out_rel=`fix $out_rel`
out_deb=`fix $out_deb`
out_tls_rel=`fix $out_tls_rel`
out_tls_deb=`fix $out_tls_deb`
fi
sed -e "s!@release_libs@!$out_rel!g" \
-e "s!@debug_libs@!$out_deb!g" \
-e "s!@tls_release_libs@!$out_tls_rel!g" \
-e "s!@tls_debug_libs@!$out_tls_deb!g" \
$dst > !tmp!$dst.$$
mv !tmp!$dst.$$ $dst
#!/bin/sh
dst=$1
shift
sed -e "s/@name@/`echo $1 | sed 's/\.[l]*a//g'`/g" $dst > /tmp/$dst.$$
mv /tmp/$dst.$$ $dst
# Microsoft Developer Studio Project File - Name="mysqld" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=@name@ - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "@name@.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "@name@.mak" CFG="@name@ - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "@name@ - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "@name@ - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=xicl6.exe
RSC=rc.exe
!IF "$(CFG)" == "@name@ - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "release"
# PROP Intermediate_Dir "release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDB_WIN32" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MT /W3 /O2 /D "NDB_WIN32" /I "../zlib" /I "../include" /I "../regex" /D "NDEBUG" /D "DBUG_OFF" /D "HAVE_INNOBASE_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /c
# ADD BASE CPP @includes@
# ADD CPP @includes@
# SUBTRACT CPP /YX
# ADD BASE RSC /l 0x410 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=xilink6.exe
@release_libs@
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"release/@name@-opt.exe"
# SUBTRACT LINK32 /debug
!ELSEIF "$(CFG)" == "@name@ - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "debug"
# PROP Intermediate_Dir "debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "NDB_WIN32" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /D "NDB_WIN32" /I "../bdb/build_win32" /I "../include" /I "../regex" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "HAVE_INNOBASE_DB" /D "HAVE_BERKELEY_DB" /D "MYSQL_SERVER" /D "_WINDOWS" /D "_CONSOLE" /D "_MBCS" /D "HAVE_DLOPEN" /FD /c
# ADD BASE CPP @includes@
# ADD CPP @includes@
# SUBTRACT CPP /Fr /YX
# ADD BASE RSC /l 0x410 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=xilink6.exe
@debug_libs@
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"debug/@name@.exe" /pdbtype:sept
!ENDIF
# Begin Target
# Name "@name@ - Win32 Release"
# Name "@name@ - Win32 Debug"
@sources@
# End Target
# End Project
#!/bin/sh
dst=$1
shift
out=`echo $* | sed 's!\([^ ]*\)!# Begin Source File\\\nSOURCE=\1\\\n# End Source File\\\n!g'`
sed -e "s!@sources@!$out!g" $dst > /tmp/$dst.$$
mv /tmp/$dst.$$ $dst
...@@ -100,3 +100,5 @@ odbcdoc: DUMMY ...@@ -100,3 +100,5 @@ odbcdoc: DUMMY
testdoc: DUMMY testdoc: DUMMY
mkdir -p $(OUTDIR) mkdir -p $(OUTDIR)
cd $(top_srcdir)/ndb ; $(DOXYGEN) $(DOXYDIR)/Doxyfile.test cd $(top_srcdir)/ndb ; $(DOXYGEN) $(DOXYDIR)/Doxyfile.test
windoze-dsp:
...@@ -41,3 +41,5 @@ portlib transporter util ...@@ -41,3 +41,5 @@ portlib transporter util
dist-hook: dist-hook:
-rm -rf `find $(distdir) -type d -name SCCS` -rm -rf `find $(distdir) -type d -name SCCS`
windoze-dsp:
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
*/ */
class GrepError { class GrepError {
public: public:
enum Code { enum GE_Code {
NO_ERROR = 0, GE_NO_ERROR = 0,
SUBSCRIPTION_ID_NOMEM = 1, SUBSCRIPTION_ID_NOMEM = 1,
SUBSCRIPTION_ID_NOT_FOUND = 2, SUBSCRIPTION_ID_NOT_FOUND = 2,
SUBSCRIPTION_ID_NOT_UNIQUE = 3, SUBSCRIPTION_ID_NOT_UNIQUE = 3,
...@@ -82,12 +82,12 @@ public: ...@@ -82,12 +82,12 @@ public:
}; };
struct ErrorDescription { struct ErrorDescription {
Code errCode; GE_Code errCode;
const char * name; const char * name;
}; };
static const ErrorDescription errorDescriptions[]; static const ErrorDescription errorDescriptions[];
static const Uint32 noOfErrorDescs; static const Uint32 noOfErrorDescs;
static const char * getErrorDesc(GrepError::Code err); static const char * getErrorDesc(GrepError::GE_Code err);
}; };
......
...@@ -30,7 +30,6 @@ private: ...@@ -30,7 +30,6 @@ private:
static void setArray(Uint32 &, Uint32 arraySize); static void setArray(Uint32 &, Uint32 arraySize);
static void setOriginal(Uint32 &, Uint32 original); static void setOriginal(Uint32 &, Uint32 original);
static void setNullable(Uint32 &, Uint32 nullable); static void setNullable(Uint32 &, Uint32 nullable);
static void setDGroup(Uint32 &, Uint32 dgroup);
static void setDKey(Uint32 &, Uint32 dkey); static void setDKey(Uint32 &, Uint32 dkey);
static void setPrimaryKey(Uint32 &, Uint32 dkey); static void setPrimaryKey(Uint32 &, Uint32 dkey);
static void setDynamic(Uint32 &, Uint32 dynamicInd); static void setDynamic(Uint32 &, Uint32 dynamicInd);
......
...@@ -89,7 +89,7 @@ public: ...@@ -89,7 +89,7 @@ public:
return memcmp(this, &l, sizeof(* this)) == 0; return memcmp(this, &l, sizeof(* this)) == 0;
} }
LogLevel& operator=(const class EventSubscribeReq & req); LogLevel& operator=(const struct EventSubscribeReq & req);
private: private:
/** /**
......
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
**/ **/
#define MAX_TUPLES_PER_PAGE 8191 #define MAX_TUPLES_PER_PAGE 8191
#define MAX_TUPLES_BITS 13 /* 13 bits = 8191 tuples per page */ #define MAX_TUPLES_BITS 13 /* 13 bits = 8191 tuples per page */
/*#define MAX_NO_OF_TUPLEKEY 16 Not currently used */
#define MAX_TABLES 1600 #define MAX_TABLES 1600
#define MAX_TAB_NAME_SIZE 128 #define MAX_TAB_NAME_SIZE 128
#define MAX_ATTR_NAME_SIZE 32 #define MAX_ATTR_NAME_SIZE 32
...@@ -58,7 +57,6 @@ ...@@ -58,7 +57,6 @@
#define MAX_ATTRIBUTES_IN_TABLE 128 #define MAX_ATTRIBUTES_IN_TABLE 128
#define MAX_ATTRIBUTES_IN_INDEX 32 #define MAX_ATTRIBUTES_IN_INDEX 32
#define MAX_TUPLE_SIZE_IN_WORDS 2013 #define MAX_TUPLE_SIZE_IN_WORDS 2013
#define MAX_FIXED_KEY_LENGTH_IN_WORDS 8
#define MAX_KEY_SIZE_IN_WORDS 1023 #define MAX_KEY_SIZE_IN_WORDS 1023
#define MAX_FRM_DATA_SIZE 6000 #define MAX_FRM_DATA_SIZE 6000
#define MAX_NULL_BITS 4096 #define MAX_NULL_BITS 4096
......
...@@ -52,9 +52,11 @@ private: ...@@ -52,9 +52,11 @@ private:
*/ */
static Uint32 getLockMode(const Uint32 & requestInfo); static Uint32 getLockMode(const Uint32 & requestInfo);
static Uint32 getReadCommittedFlag(const Uint32 & requestInfo); static Uint32 getReadCommittedFlag(const Uint32 & requestInfo);
static Uint32 getDescendingFlag(const Uint32 & requestInfo);
static void setLockMode(Uint32 & requestInfo, Uint32 lockMode); static void setLockMode(Uint32 & requestInfo, Uint32 lockMode);
static void setReadCommittedFlag(Uint32 & requestInfo, Uint32 readCommitted); static void setReadCommittedFlag(Uint32 & requestInfo, Uint32 readCommitted);
static void setDescendingFlag(Uint32 & requestInfo, Uint32 descending);
}; };
/** /**
...@@ -62,14 +64,16 @@ private: ...@@ -62,14 +64,16 @@ private:
* *
* l = Lock Mode - 1 Bit 2 * l = Lock Mode - 1 Bit 2
* h = Read Committed - 1 Bit 5 * h = Read Committed - 1 Bit 5
* z = Descending (TUX) - 1 Bit 6
* *
* 1111111111222222222233 * 1111111111222222222233
* 01234567890123456789012345678901 * 01234567890123456789012345678901
* l h * l hz
*/ */
#define AS_LOCK_MODE_SHIFT (2) #define AS_LOCK_MODE_SHIFT (2)
#define AS_LOCK_MODE_MASK (1) #define AS_LOCK_MODE_MASK (1)
#define AS_READ_COMMITTED_SHIFT (5) #define AS_READ_COMMITTED_SHIFT (5)
#define AS_DESCENDING_SHIFT (6)
inline inline
Uint32 Uint32
...@@ -83,6 +87,12 @@ AccScanReq::getReadCommittedFlag(const Uint32 & requestInfo){ ...@@ -83,6 +87,12 @@ AccScanReq::getReadCommittedFlag(const Uint32 & requestInfo){
return (requestInfo >> AS_READ_COMMITTED_SHIFT) & 1; return (requestInfo >> AS_READ_COMMITTED_SHIFT) & 1;
} }
inline
Uint32
AccScanReq::getDescendingFlag(const Uint32 & requestInfo){
return (requestInfo >> AS_DESCENDING_SHIFT) & 1;
}
inline inline
void void
AccScanReq::setLockMode(UintR & requestInfo, UintR val){ AccScanReq::setLockMode(UintR & requestInfo, UintR val){
...@@ -97,6 +107,13 @@ AccScanReq::setReadCommittedFlag(UintR & requestInfo, UintR val){ ...@@ -97,6 +107,13 @@ AccScanReq::setReadCommittedFlag(UintR & requestInfo, UintR val){
requestInfo |= (val << AS_READ_COMMITTED_SHIFT); requestInfo |= (val << AS_READ_COMMITTED_SHIFT);
} }
inline
void
AccScanReq::setDescendingFlag(UintR & requestInfo, UintR val){
ASSERT_BOOL(val, "AccScanReq::setDescendingFlag");
requestInfo |= (val << AS_DESCENDING_SHIFT);
}
class AccScanConf { class AccScanConf {
/** /**
* Sender(s) * Sender(s)
......
...@@ -75,7 +75,7 @@ inline ...@@ -75,7 +75,7 @@ inline
void void
FsCloseReq::setRemoveFileFlag(UintR & fileflag, bool removefile){ FsCloseReq::setRemoveFileFlag(UintR & fileflag, bool removefile){
// ASSERT_BOOL(removefile, "FsCloseReq::setRemoveFileFlag"); // ASSERT_BOOL(removefile, "FsCloseReq::setRemoveFileFlag");
if (removefile == true) if (removefile)
fileflag = 1; fileflag = 1;
else else
fileflag = 0; fileflag = 0;
......
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
Uint32 subscriptionId; Uint32 subscriptionId;
Uint32 subscriptionKey; Uint32 subscriptionKey;
Uint32 senderNodeId; Uint32 senderNodeId;
GrepError::Code err; GrepError::GE_Code err;
}; };
class RepGetGciReq class RepGetGciReq
...@@ -151,7 +151,7 @@ public: ...@@ -151,7 +151,7 @@ public:
Uint32 lastPSGCI; Uint32 lastPSGCI;
Uint32 firstSSGCI; Uint32 firstSSGCI;
Uint32 lastSSGCI; Uint32 lastSSGCI;
GrepError::Code err; GrepError::GE_Code err;
}; };
class RepGetGciBufferReq { class RepGetGciBufferReq {
...@@ -213,7 +213,7 @@ public: ...@@ -213,7 +213,7 @@ public:
Uint32 lastSSGCI; Uint32 lastSSGCI;
Uint32 currentGCIBuffer; Uint32 currentGCIBuffer;
Uint32 nodeGrp; Uint32 nodeGrp;
GrepError::Code err; GrepError::GE_Code err;
}; };
class RepInsertGciBufferReq class RepInsertGciBufferReq
...@@ -252,7 +252,7 @@ public: ...@@ -252,7 +252,7 @@ public:
Uint32 nodeGrp; Uint32 nodeGrp;
Uint32 tableId; Uint32 tableId;
Uint32 force; Uint32 force;
GrepError::Code err; GrepError::GE_Code err;
}; };
class RepInsertGciBufferConf class RepInsertGciBufferConf
...@@ -310,7 +310,7 @@ public: ...@@ -310,7 +310,7 @@ public:
Uint32 lastGCI; Uint32 lastGCI;
Uint32 currentGCI; Uint32 currentGCI;
Uint32 nodeGrp; Uint32 nodeGrp;
GrepError::Code err; GrepError::GE_Code err;
}; };
class RepClearPSGciBufferConf class RepClearPSGciBufferConf
...@@ -367,7 +367,7 @@ public: ...@@ -367,7 +367,7 @@ public:
Uint32 lastGCI; Uint32 lastGCI;
Uint32 currentGCI; Uint32 currentGCI;
Uint32 nodeGrp; Uint32 nodeGrp;
GrepError::Code err; GrepError::GE_Code err;
}; };
class RepClearSSGciBufferConf class RepClearSSGciBufferConf
......
...@@ -56,6 +56,7 @@ public: ...@@ -56,6 +56,7 @@ public:
static Uint32 getKeyinfoFlag(const Uint32 & requestInfo); static Uint32 getKeyinfoFlag(const Uint32 & requestInfo);
static Uint32 getReadCommittedFlag(const Uint32 & requestInfo); static Uint32 getReadCommittedFlag(const Uint32 & requestInfo);
static Uint32 getRangeScanFlag(const Uint32 & requestInfo); static Uint32 getRangeScanFlag(const Uint32 & requestInfo);
static Uint32 getDescendingFlag(const Uint32 & requestInfo);
static Uint32 getAttrLen(const Uint32 & requestInfo); static Uint32 getAttrLen(const Uint32 & requestInfo);
static Uint32 getScanPrio(const Uint32 & requestInfo); static Uint32 getScanPrio(const Uint32 & requestInfo);
...@@ -64,6 +65,7 @@ public: ...@@ -64,6 +65,7 @@ public:
static void setKeyinfoFlag(Uint32 & requestInfo, Uint32 keyinfo); static void setKeyinfoFlag(Uint32 & requestInfo, Uint32 keyinfo);
static void setReadCommittedFlag(Uint32 & requestInfo, Uint32 readCommitted); static void setReadCommittedFlag(Uint32 & requestInfo, Uint32 readCommitted);
static void setRangeScanFlag(Uint32 & requestInfo, Uint32 rangeScan); static void setRangeScanFlag(Uint32 & requestInfo, Uint32 rangeScan);
static void setDescendingFlag(Uint32 & requestInfo, Uint32 descending);
static void setAttrLen(Uint32 & requestInfo, Uint32 attrLen); static void setAttrLen(Uint32 & requestInfo, Uint32 attrLen);
static void setScanPrio(Uint32& requestInfo, Uint32 prio); static void setScanPrio(Uint32& requestInfo, Uint32 prio);
}; };
...@@ -197,11 +199,12 @@ public: ...@@ -197,11 +199,12 @@ public:
* k = Keyinfo - 1 Bit 8 * k = Keyinfo - 1 Bit 8
* r = read committed - 1 Bit 9 * r = read committed - 1 Bit 9
* x = range scan - 1 Bit 6 * x = range scan - 1 Bit 6
* z = descending - 1 Bit 10
* p = Scan prio - 4 Bits (12-15) -> max 15 * p = Scan prio - 4 Bits (12-15) -> max 15
* *
* 1111111111222222222233 * 1111111111222222222233
* 01234567890123456789012345678901 * 01234567890123456789012345678901
* lxhkr ppppaaaaaaaaaaaaaaaa * lxhkrz ppppaaaaaaaaaaaaaaaa
*/ */
#define SF_LOCK_MODE_SHIFT (5) #define SF_LOCK_MODE_SHIFT (5)
#define SF_LOCK_MODE_MASK (1) #define SF_LOCK_MODE_MASK (1)
...@@ -210,6 +213,7 @@ public: ...@@ -210,6 +213,7 @@ public:
#define SF_KEYINFO_SHIFT (8) #define SF_KEYINFO_SHIFT (8)
#define SF_READ_COMMITTED_SHIFT (9) #define SF_READ_COMMITTED_SHIFT (9)
#define SF_RANGE_SCAN_SHIFT (6) #define SF_RANGE_SCAN_SHIFT (6)
#define SF_DESCENDING_SHIFT (10)
#define SF_ATTR_LEN_SHIFT (16) #define SF_ATTR_LEN_SHIFT (16)
#define SF_ATTR_LEN_MASK (65535) #define SF_ATTR_LEN_MASK (65535)
...@@ -241,6 +245,12 @@ ScanFragReq::getRangeScanFlag(const Uint32 & requestInfo){ ...@@ -241,6 +245,12 @@ ScanFragReq::getRangeScanFlag(const Uint32 & requestInfo){
return (requestInfo >> SF_RANGE_SCAN_SHIFT) & 1; return (requestInfo >> SF_RANGE_SCAN_SHIFT) & 1;
} }
inline
Uint32
ScanFragReq::getDescendingFlag(const Uint32 & requestInfo){
return (requestInfo >> SF_DESCENDING_SHIFT) & 1;
}
inline inline
Uint32 Uint32
ScanFragReq::getReadCommittedFlag(const Uint32 & requestInfo){ ScanFragReq::getReadCommittedFlag(const Uint32 & requestInfo){
...@@ -301,6 +311,13 @@ ScanFragReq::setRangeScanFlag(UintR & requestInfo, UintR val){ ...@@ -301,6 +311,13 @@ ScanFragReq::setRangeScanFlag(UintR & requestInfo, UintR val){
requestInfo |= (val << SF_RANGE_SCAN_SHIFT); requestInfo |= (val << SF_RANGE_SCAN_SHIFT);
} }
inline
void
ScanFragReq::setDescendingFlag(UintR & requestInfo, UintR val){
ASSERT_BOOL(val, "ScanFragReq::setDescendingFlag");
requestInfo |= (val << SF_DESCENDING_SHIFT);
}
inline inline
void void
ScanFragReq::setAttrLen(UintR & requestInfo, UintR val){ ScanFragReq::setAttrLen(UintR & requestInfo, UintR val){
......
...@@ -34,7 +34,8 @@ class ScanTabReq { ...@@ -34,7 +34,8 @@ class ScanTabReq {
* Sender(s) * Sender(s)
*/ */
friend class NdbConnection; friend class NdbConnection;
friend class NdbScanOperation; friend class NdbScanOperation;
friend class NdbIndexScanOperation;
/** /**
* For printing * For printing
...@@ -79,6 +80,7 @@ private: ...@@ -79,6 +80,7 @@ private:
static Uint8 getHoldLockFlag(const UintR & requestInfo); static Uint8 getHoldLockFlag(const UintR & requestInfo);
static Uint8 getReadCommittedFlag(const UintR & requestInfo); static Uint8 getReadCommittedFlag(const UintR & requestInfo);
static Uint8 getRangeScanFlag(const UintR & requestInfo); static Uint8 getRangeScanFlag(const UintR & requestInfo);
static Uint8 getDescendingFlag(const UintR & requestInfo);
static Uint8 getKeyinfoFlag(const UintR & requestInfo); static Uint8 getKeyinfoFlag(const UintR & requestInfo);
static Uint16 getScanBatch(const UintR & requestInfo); static Uint16 getScanBatch(const UintR & requestInfo);
static Uint8 getDistributionKeyFlag(const UintR & requestInfo); static Uint8 getDistributionKeyFlag(const UintR & requestInfo);
...@@ -92,6 +94,7 @@ private: ...@@ -92,6 +94,7 @@ private:
static void setHoldLockFlag(UintR & requestInfo, Uint32 flag); static void setHoldLockFlag(UintR & requestInfo, Uint32 flag);
static void setReadCommittedFlag(UintR & requestInfo, Uint32 flag); static void setReadCommittedFlag(UintR & requestInfo, Uint32 flag);
static void setRangeScanFlag(UintR & requestInfo, Uint32 flag); static void setRangeScanFlag(UintR & requestInfo, Uint32 flag);
static void setDescendingFlag(UintR & requestInfo, Uint32 flag);
static void setKeyinfoFlag(UintR & requestInfo, Uint32 flag); static void setKeyinfoFlag(UintR & requestInfo, Uint32 flag);
static void setScanBatch(Uint32& requestInfo, Uint32 sz); static void setScanBatch(Uint32& requestInfo, Uint32 sz);
static void setDistributionKeyFlag(Uint32& requestInfo, Uint32 flag); static void setDistributionKeyFlag(Uint32& requestInfo, Uint32 flag);
...@@ -105,13 +108,14 @@ private: ...@@ -105,13 +108,14 @@ private:
h = Hold lock mode - 1 Bit 10 h = Hold lock mode - 1 Bit 10
c = Read Committed - 1 Bit 11 c = Read Committed - 1 Bit 11
k = Keyinfo - 1 Bit 12 k = Keyinfo - 1 Bit 12
z = Descending (TUX) - 1 Bit 14
x = Range Scan (TUX) - 1 Bit 15 x = Range Scan (TUX) - 1 Bit 15
b = Scan batch - 10 Bit 16-25 (max 1023) b = Scan batch - 10 Bit 16-25 (max 1023)
d = Distribution key flag d = Distribution key flag
1111111111222222222233 1111111111222222222233
01234567890123456789012345678901 01234567890123456789012345678901
ppppppppl hck xbbbbbbbbbb ppppppppl hck zxbbbbbbbbbb
*/ */
#define PARALLELL_SHIFT (0) #define PARALLELL_SHIFT (0)
...@@ -132,6 +136,9 @@ private: ...@@ -132,6 +136,9 @@ private:
#define RANGE_SCAN_SHIFT (15) #define RANGE_SCAN_SHIFT (15)
#define RANGE_SCAN_MASK (1) #define RANGE_SCAN_MASK (1)
#define DESCENDING_SHIFT (14)
#define DESCENDING_MASK (1)
#define SCAN_BATCH_SHIFT (16) #define SCAN_BATCH_SHIFT (16)
#define SCAN_BATCH_MASK (1023) #define SCAN_BATCH_MASK (1023)
...@@ -167,6 +174,12 @@ ScanTabReq::getRangeScanFlag(const UintR & requestInfo){ ...@@ -167,6 +174,12 @@ ScanTabReq::getRangeScanFlag(const UintR & requestInfo){
return (Uint8)((requestInfo >> RANGE_SCAN_SHIFT) & RANGE_SCAN_MASK); return (Uint8)((requestInfo >> RANGE_SCAN_SHIFT) & RANGE_SCAN_MASK);
} }
inline
Uint8
ScanTabReq::getDescendingFlag(const UintR & requestInfo){
return (Uint8)((requestInfo >> DESCENDING_SHIFT) & DESCENDING_MASK);
}
inline inline
Uint16 Uint16
ScanTabReq::getScanBatch(const Uint32 & requestInfo){ ScanTabReq::getScanBatch(const Uint32 & requestInfo){
...@@ -214,6 +227,13 @@ ScanTabReq::setRangeScanFlag(UintR & requestInfo, Uint32 flag){ ...@@ -214,6 +227,13 @@ ScanTabReq::setRangeScanFlag(UintR & requestInfo, Uint32 flag){
requestInfo |= (flag << RANGE_SCAN_SHIFT); requestInfo |= (flag << RANGE_SCAN_SHIFT);
} }
inline
void
ScanTabReq::setDescendingFlag(UintR & requestInfo, Uint32 flag){
ASSERT_BOOL(flag, "ScanTabReq::setDescendingFlag");
requestInfo |= (flag << DESCENDING_SHIFT);
}
inline inline
void void
ScanTabReq::setScanBatch(Uint32 & requestInfo, Uint32 flag){ ScanTabReq::setScanBatch(Uint32 & requestInfo, Uint32 flag){
......
...@@ -104,9 +104,9 @@ public: ...@@ -104,9 +104,9 @@ public:
STATIC_CONST( SignalLength = 2 ); STATIC_CONST( SignalLength = 2 );
enum ErrorCode { enum ErrorCode {
NoError = 0, NoError = 0,
InvalidRequest = 800, InvalidRequest = 903,
NoFreeFragment = 604, NoFreeFragment = 904,
NoFreeAttributes = 827 NoFreeAttributes = 905
}; };
private: private:
Uint32 userPtr; Uint32 userPtr;
...@@ -186,9 +186,9 @@ public: ...@@ -186,9 +186,9 @@ public:
STATIC_CONST( SignalLength = 2 ); STATIC_CONST( SignalLength = 2 );
enum ErrorCode { enum ErrorCode {
NoError = 0, NoError = 0,
InvalidAttributeType = 742, InvalidAttributeType = 906,
InvalidCharset = 743, InvalidCharset = 907,
InvalidNodeSize = 832 InvalidNodeSize = 908
}; };
private: private:
Uint32 userPtr; Uint32 userPtr;
......
...@@ -36,8 +36,8 @@ public: ...@@ -36,8 +36,8 @@ public:
}; };
enum ErrorCode { enum ErrorCode {
NoError = 0, // must be zero NoError = 0, // must be zero
SearchError = 895, // add + found or remove + not found SearchError = 901, // add + found or remove + not found
NoMemError = 827 NoMemError = 902
}; };
STATIC_CONST( SignalLength = 8 ); STATIC_CONST( SignalLength = 8 );
private: private:
......
...@@ -39,7 +39,7 @@ public: ...@@ -39,7 +39,7 @@ public:
enum RequestInfo { enum RequestInfo {
TryLock = 1 TryLock = 1
}; };
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -63,7 +63,7 @@ class UtilLockConf { ...@@ -63,7 +63,7 @@ class UtilLockConf {
public: public:
STATIC_CONST( SignalLength = 4 ); STATIC_CONST( SignalLength = 4 );
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -95,7 +95,7 @@ public: ...@@ -95,7 +95,7 @@ public:
LockAlreadyHeld = 4 LockAlreadyHeld = 4
}; };
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -119,7 +119,7 @@ class UtilUnlockReq { ...@@ -119,7 +119,7 @@ class UtilUnlockReq {
public: public:
STATIC_CONST( SignalLength = 4 ); STATIC_CONST( SignalLength = 4 );
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -143,7 +143,7 @@ class UtilUnlockConf { ...@@ -143,7 +143,7 @@ class UtilUnlockConf {
public: public:
STATIC_CONST( SignalLength = 3 ); STATIC_CONST( SignalLength = 3 );
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -171,7 +171,7 @@ public: ...@@ -171,7 +171,7 @@ public:
NoSuchLock = 1, NoSuchLock = 1,
NotLockOwner = 2 NotLockOwner = 2
}; };
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -200,7 +200,7 @@ public: ...@@ -200,7 +200,7 @@ public:
STATIC_CONST( SignalLength = 4 ); STATIC_CONST( SignalLength = 4 );
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -229,7 +229,7 @@ public: ...@@ -229,7 +229,7 @@ public:
STATIC_CONST( SignalLength = 4 ); STATIC_CONST( SignalLength = 4 );
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -251,7 +251,7 @@ class UtilCreateLockConf { ...@@ -251,7 +251,7 @@ class UtilCreateLockConf {
public: public:
STATIC_CONST( SignalLength = 3 ); STATIC_CONST( SignalLength = 3 );
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -275,7 +275,7 @@ class UtilDestroyLockReq { ...@@ -275,7 +275,7 @@ class UtilDestroyLockReq {
public: public:
STATIC_CONST( SignalLength = 4 ); STATIC_CONST( SignalLength = 4 );
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -303,7 +303,7 @@ public: ...@@ -303,7 +303,7 @@ public:
STATIC_CONST( SignalLength = 4 ); STATIC_CONST( SignalLength = 4 );
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
...@@ -325,7 +325,7 @@ class UtilDestroyLockConf { ...@@ -325,7 +325,7 @@ class UtilDestroyLockConf {
public: public:
STATIC_CONST( SignalLength = 3 ); STATIC_CONST( SignalLength = 3 );
private: public:
Uint32 senderData; Uint32 senderData;
Uint32 senderRef; Uint32 senderRef;
Uint32 lockId; Uint32 lockId;
......
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
#define SYSLOGHANDLER_H #define SYSLOGHANDLER_H
#include "LogHandler.hpp" #include "LogHandler.hpp"
#ifndef NDB_WIN32
#include <syslog.h> #include <syslog.h>
#endif
/** /**
* Logs messages to syslog. The default identity is 'NDB'. * Logs messages to syslog. The default identity is 'NDB'.
...@@ -62,7 +64,7 @@ public: ...@@ -62,7 +64,7 @@ public:
* @param pIdentity a syslog identity. * @param pIdentity a syslog identity.
* @param facility syslog facility, defaults to LOG_USER * @param facility syslog facility, defaults to LOG_USER
*/ */
SysLogHandler(const char* pIdentity, int facility = LOG_USER); SysLogHandler(const char* pIdentity, int facility);
/** /**
* Destructor. * Destructor.
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
* @{ * @{
*/ */
#include <ndb_types.h>
#include "mgmapi_config_parameters.h" #include "mgmapi_config_parameters.h"
#ifdef __cplusplus #ifdef __cplusplus
...@@ -743,7 +744,7 @@ extern "C" { ...@@ -743,7 +744,7 @@ extern "C" {
int ndb_mgm_get_int_parameter(const ndb_mgm_configuration_iterator*, int ndb_mgm_get_int_parameter(const ndb_mgm_configuration_iterator*,
int param, unsigned * value); int param, unsigned * value);
int ndb_mgm_get_int64_parameter(const ndb_mgm_configuration_iterator*, int ndb_mgm_get_int64_parameter(const ndb_mgm_configuration_iterator*,
int param, unsigned long long * value); int param, Uint64 * value);
int ndb_mgm_get_string_parameter(const ndb_mgm_configuration_iterator*, int ndb_mgm_get_string_parameter(const ndb_mgm_configuration_iterator*,
int param, const char ** value); int param, const char ** value);
int ndb_mgm_purge_stale_sessions(NdbMgmHandle handle, char **); int ndb_mgm_purge_stale_sessions(NdbMgmHandle handle, char **);
......
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
void print() const { props->print(); } void print() const { props->print(); }
static Uint32 configureTransporters(Uint32 nodeId, static Uint32 configureTransporters(Uint32 nodeId,
const class ndb_mgm_configuration &, const struct ndb_mgm_configuration &,
class TransporterRegistry &); class TransporterRegistry &);
private: private:
......
...@@ -2,34 +2,51 @@ ...@@ -2,34 +2,51 @@
#ifndef NDBGLOBAL_H #ifndef NDBGLOBAL_H
#define NDBGLOBAL_H #define NDBGLOBAL_H
#include <my_global.h> #include <ndb_types.h>
/** signal & SIG_PIPE */ #define NDB_PORT "@ndb_port@"
#include <my_alarm.h> #define NDB_TCP_BASE_PORT "@ndb_port_base@"
#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32) #if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
#define NDB_WIN32 #define NDB_WIN32
#include <winsock2.h>
#define PATH_MAX 256
#define DIR_SEPARATOR "\\"
#define MYSQLCLUSTERDIR "c:\\mysql\\mysql-cluster"
#define HAVE_STRCASECMP
#define strcasecmp _strcmpi
#pragma warning(disable: 4503 4786)
#else #else
#undef NDB_WIN32 #undef NDB_WIN32
#define DIR_SEPARATOR "/"
#endif #endif
#include <my_global.h>
#include <my_alarm.h>
#ifdef _AIX #ifdef _AIX
#undef _H_STRINGS #undef _H_STRINGS
#endif #endif
#include <m_string.h> #include <m_string.h>
#include <m_ctype.h> #include <m_ctype.h>
#include <ndb_types.h>
#include <ctype.h> #include <ctype.h>
#ifdef HAVE_STDARG_H #ifdef HAVE_STDARG_H
#include <stdarg.h> #include <stdarg.h>
#endif #endif
#ifdef TIME_WITH_SYS_TIME #ifdef TIME_WITH_SYS_TIME
#include <time.h> #include <time.h>
#endif #endif
#ifdef HAVE_FCNTL_H #ifdef HAVE_FCNTL_H
#include <fcntl.h> #include <fcntl.h>
#endif #endif
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> #include <sys/param.h>
#endif
#ifdef HAVE_SYS_STAT_H #ifdef HAVE_SYS_STAT_H
#if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T) && defined(_INCLUDE_AES_SOURCE) #if defined(__cplusplus) && defined(_APP32_64BIT_OFF_T) && defined(_INCLUDE_AES_SOURCE)
#undef _INCLUDE_AES_SOURCE #undef _INCLUDE_AES_SOURCE
...@@ -39,31 +56,31 @@ ...@@ -39,31 +56,31 @@
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
#endif #endif
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h> #include <sys/resource.h>
#endif
#ifdef HAVE_SYS_WAIT_H #ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h> #include <sys/wait.h>
#endif #endif
#ifdef HAVE_SYS_MMAN_H #ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h> #include <sys/mman.h>
#endif #endif
#ifdef NDB_WIN32 #ifndef HAVE_STRDUP
#include <winsock2.h> extern char * strdup(const char *s);
#include <ws2tcpip.h> #endif
#define DIR_SEPARATOR "\\"
#define PATH_MAX 256
#pragma warning(disable: 4503 4786)
#else
#define DIR_SEPARATOR "/"
#ifndef HAVE_STRCASECMP
extern int strcasecmp(const char *s1, const char *s2);
extern int strncasecmp(const char *s1, const char *s2, size_t n);
#endif #endif
static const char table_name_separator = '/'; static const char table_name_separator = '/';
#if defined(_AIX) || defined(NDB_VC98) #if defined(_AIX) || defined(WIN32) || defined(NDB_VC98)
#define STATIC_CONST(x) enum { x } #define STATIC_CONST(x) enum { x }
#else #else
#define STATIC_CONST(x) static const Uint32 x #define STATIC_CONST(x) static const Uint32 x
...@@ -84,13 +101,8 @@ extern int ndb_init(void); ...@@ -84,13 +101,8 @@ extern int ndb_init(void);
extern void ndb_end(int); extern void ndb_end(int);
#define NDB_INIT(prog_name) {my_progname=(prog_name); ndb_init();} #define NDB_INIT(prog_name) {my_progname=(prog_name); ndb_init();}
#ifndef HAVE_STRDUP #ifdef __cplusplus
extern char * strdup(const char *s); }
#endif
#ifndef HAVE_STRCASECMP
extern int strcasecmp(const char *s1, const char *s2);
extern int strncasecmp(const char *s1, const char *s2, size_t n);
#endif #endif
#ifdef SCO #ifdef SCO
...@@ -101,8 +113,4 @@ extern int strncasecmp(const char *s1, const char *s2, size_t n); ...@@ -101,8 +113,4 @@ extern int strncasecmp(const char *s1, const char *s2, size_t n);
#endif /* SCO */ #endif /* SCO */
#ifdef __cplusplus
}
#endif
#endif #endif
...@@ -40,15 +40,21 @@ typedef __SIZE_TYPE__ UintPtr; ...@@ -40,15 +40,21 @@ typedef __SIZE_TYPE__ UintPtr;
#ifdef HAVE_INTTYPES_H #ifdef HAVE_INTTYPES_H
#include <inttypes.h> #include <inttypes.h>
#endif #endif
#if defined(WIN32) || defined(NDB_WIN32)
typedef Uint32 UintPtr;
#else
typedef uintptr_t UintPtr; typedef uintptr_t UintPtr;
#endif #endif
#endif
#if defined(WIN32) || defined(NDB_WIN32) #if defined(WIN32) || defined(NDB_WIN32)
typedef unsigned __int64 Uint64; typedef unsigned __int64 Uint64;
typedef signed __int64 Int64; typedef signed __int64 Int64;
typedef UintPtr ssize_t;
#else #else
typedef unsigned long long Uint64; typedef unsigned long long Uint64;
typedef signed long long Int64; typedef signed long long Int64;
#endif #endif
#endif #endif
...@@ -20,14 +20,25 @@ ...@@ -20,14 +20,25 @@
#include <ndb_global.h> #include <ndb_global.h>
#include <version.h> #include <version.h>
/* NDB build version */
#define NDB_VERSION_BUILD @NDB_VERSION_BUILD@
/* NDB major version */
#define NDB_VERSION_MAJOR @NDB_VERSION_MAJOR@
/* NDB minor version */
#define NDB_VERSION_MINOR @NDB_VERSION_MINOR@
/* NDB status version */
#define NDB_VERSION_STATUS "@NDB_VERSION_STATUS@"
#define MAKE_VERSION(A,B,C) (((A) << 16) | ((B) << 8) | ((C) << 0)) #define MAKE_VERSION(A,B,C) (((A) << 16) | ((B) << 8) | ((C) << 0))
#define NDB_VERSION_D MAKE_VERSION(NDB_VERSION_MAJOR, NDB_VERSION_MINOR, NDB_VERSION_BUILD) #define NDB_VERSION_D MAKE_VERSION(NDB_VERSION_MAJOR, NDB_VERSION_MINOR, NDB_VERSION_BUILD)
#define NDB_VERSION_STRING (getVersionString(NDB_VERSION, NDB_VERSION_STATUS)) #define NDB_VERSION_STRING (getVersionString(NDB_VERSION, NDB_VERSION_STATUS))
#define NDB_VERSION_TAG_STRING "$Name: $"
#define NDB_VERSION ndbGetOwnVersion() #define NDB_VERSION ndbGetOwnVersion()
/** /**
......
...@@ -202,7 +202,7 @@ public: ...@@ -202,7 +202,7 @@ public:
// "Error in blob head update forced rollback of transaction" // "Error in blob head update forced rollback of transaction"
STATIC_CONST( ErrAbort = 4268 ); STATIC_CONST( ErrAbort = 4268 );
// "Unknown blob error" // "Unknown blob error"
STATIC_CONST( ErrUnknown = 4269 ); STATIC_CONST( ErrUnknown = 4270 );
/** /**
* Return info about all blobs in this operation. * Return info about all blobs in this operation.
*/ */
......
...@@ -50,7 +50,7 @@ enum AbortOption { ...@@ -50,7 +50,7 @@ enum AbortOption {
TryCommit = 0, ///< <i>Missing explanation</i> TryCommit = 0, ///< <i>Missing explanation</i>
#endif #endif
AbortOnError = 0, ///< Abort transaction on failed operation AbortOnError = 0, ///< Abort transaction on failed operation
IgnoreError = 2 ///< Transaction continues on failed operation AO_IgnoreError = 2 ///< Transaction continues on failed operation
}; };
typedef AbortOption CommitType; typedef AbortOption CommitType;
......
...@@ -703,7 +703,7 @@ public: ...@@ -703,7 +703,7 @@ public:
/** /**
* Get a specific column in the index * Get a specific column in the index
*/ */
const NdbDictionary::Column * getColumn(unsigned no) const ; const Column * getColumn(unsigned no) const ;
/** /**
* Get a specific column name in the index * Get a specific column name in the index
......
...@@ -39,6 +39,7 @@ public: ...@@ -39,6 +39,7 @@ public:
* @param batch No of rows to fetch from each fragment at a time * @param batch No of rows to fetch from each fragment at a time
* @param LockMode Scan lock handling * @param LockMode Scan lock handling
* @param order_by Order result set in index order * @param order_by Order result set in index order
* @param order_desc Order descending, ignored unless order_by
* @returns NdbResultSet. * @returns NdbResultSet.
* @see NdbScanOperation::readTuples * @see NdbScanOperation::readTuples
*/ */
...@@ -46,6 +47,7 @@ public: ...@@ -46,6 +47,7 @@ public:
Uint32 batch = 0, Uint32 batch = 0,
Uint32 parallel = 0, Uint32 parallel = 0,
bool order_by = false, bool order_by = false,
bool order_desc = false,
bool read_range_no = false); bool read_range_no = false);
inline int readTuples(int parallell){ inline int readTuples(int parallell){
...@@ -128,6 +130,7 @@ public: ...@@ -128,6 +130,7 @@ public:
int get_range_no(); int get_range_no();
bool getSorted() const { return m_ordered; } bool getSorted() const { return m_ordered; }
bool getDescending() const { return m_descending; }
private: private:
NdbIndexScanOperation(Ndb* aNdb); NdbIndexScanOperation(Ndb* aNdb);
virtual ~NdbIndexScanOperation(); virtual ~NdbIndexScanOperation();
......
...@@ -232,7 +232,8 @@ protected: ...@@ -232,7 +232,8 @@ protected:
int getKeyFromKEYINFO20(Uint32* data, unsigned size); int getKeyFromKEYINFO20(Uint32* data, unsigned size);
NdbOperation* takeOverScanOp(OperationType opType, NdbConnection*); NdbOperation* takeOverScanOp(OperationType opType, NdbConnection*);
Uint32 m_ordered; bool m_ordered;
bool m_descending;
Uint32 m_read_range_no; Uint32 m_read_range_no;
}; };
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
class TransporterFacade; class TransporterFacade;
class ConfigRetriever; class ConfigRetriever;
class NdbThread; struct NdbThread;
extern "C" { extern "C" {
void* run_ndb_cluster_connection_connect_thread(void*); void* run_ndb_cluster_connection_connect_thread(void*);
......
...@@ -40,7 +40,7 @@ typedef int socklen_t; ...@@ -40,7 +40,7 @@ typedef int socklen_t;
#define InetErrno (* inet_errno()) #define InetErrno (* inet_errno())
#elif NDB_WIN32 #elif defined NDB_WIN32
/** /**
* Include files needed * Include files needed
......
...@@ -22,55 +22,12 @@ ...@@ -22,55 +22,12 @@
$Id: PortDefs.h,v 1.5 2003/10/07 07:59:59 mikael Exp $ $Id: PortDefs.h,v 1.5 2003/10/07 07:59:59 mikael Exp $
*/ */
#ifdef NDB_WIN32
#include <time.h>
struct tms
{
time_t tms_utime; /* user time */
time_t tms_stime; /* system time */
time_t tms_cutime; /* user time of children */
time_t tms_cstime; /* system time of children */
};
struct timespec
{
long tv_sec; /* Seconds */
long tv_nsec; /* Nanoseconds */
};
#define strcasecmp(a,b) _strcmpi(a,b)
/* Exports a WIN32 getopt function */
extern int optind;
extern char *optarg;
int getopt(int, char **, char *opts);
#endif /* NDB_WIN32 */
#ifdef NDB_ALPHA #ifdef NDB_ALPHA
#ifdef NDB_GCC /* only for NDB_ALPHA */ #ifdef NDB_GCC /* only for NDB_ALPHA */
extern int gnuShouldNotUseRPCC(); extern int gnuShouldNotUseRPCC();
#define RPCC() gnuShouldNotUseRPCC(); #define RPCC() gnuShouldNotUseRPCC();
#else #else
#ifdef NDB_WIN32
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
u_int64 __asm(char *, ...);
double __dasm(char *, ...);
float __fasm(char *, ...);
void _AcquireSpinLock(long *);
void _ReleaseSpinLock(long *);
int __ADD_ATOMIC_LONG2(void *, int);
#ifdef __cplusplus
};
#endif /* __cplusplus */
#pragma intrinsic (__asm, __dasm, __fasm)
#pragma intrinsic(_ReleaseSpinLock, _AcquireSpinLock)
#pragma intrinsic(__ADD_ATOMIC_LONG2)
#endif /* NDB_WIN32 */
#define RPCC() ((int)__asm(" rpcc v0;")) #define RPCC() ((int)__asm(" rpcc v0;"))
#define MB() __asm(" mb;"); #define MB() __asm(" mb;");
#define WMB() __asm(" wmb;"); #define WMB() __asm(" wmb;");
......
...@@ -226,8 +226,8 @@ public: ...@@ -226,8 +226,8 @@ public:
const char *m_interface; const char *m_interface;
}; };
Vector<Transporter_interface> m_transporter_interface; Vector<Transporter_interface> m_transporter_interface;
void add_transporter_interface(NodeId remoteNodeId, void add_transporter_interface(NodeId remoteNodeId, const char *interf,
const char *interface, unsigned short port); unsigned short port);
Transporter* get_transporter(NodeId nodeId); Transporter* get_transporter(NodeId nodeId);
NodeId get_localNodeId() { return localNodeId; }; NodeId get_localNodeId() { return localNodeId; };
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "NdbOut.hpp" #include "NdbOut.hpp"
class ParserImpl; class ParserImpl;
template<class T> class ParserRow; template<class T> struct ParserRow;
//#define PARSER_DEBUG //#define PARSER_DEBUG
#ifdef PARSER_DEBUG #ifdef PARSER_DEBUG
...@@ -130,11 +130,11 @@ public: ...@@ -130,11 +130,11 @@ public:
* The void* equivalent implementation * The void* equivalent implementation
*/ */
class ParserImpl { class ParserImpl {
public:
class Dummy {}; class Dummy {};
typedef ParserRow<Dummy> DummyRow; typedef ParserRow<Dummy> DummyRow;
typedef Parser<Dummy>::Context Context; typedef Parser<Dummy>::Context Context;
template<class T> friend class Parser;
private:
ParserImpl(const DummyRow rows[], class InputStream & in, ParserImpl(const DummyRow rows[], class InputStream & in,
bool b_cmd, bool b_empty, bool b_iarg); bool b_cmd, bool b_empty, bool b_iarg);
......
...@@ -38,20 +38,20 @@ public: ...@@ -38,20 +38,20 @@ public:
/** /**
* Value types * Value types
*/ */
enum ValueType { enum ValueType {
Uint32Value = 0, Uint32Value = 0,
StringValue = 1, StringValue = 1,
BinaryValue = 2, BinaryValue = 2,
InvalidValue = 3 InvalidValue = 3
}; };
/** /**
* Struct for defining mapping to be used with unpack * Struct for defining mapping to be used with unpack
*/ */
struct SP2StructMapping { struct SP2StructMapping {
Uint16 Key; Uint16 Key;
Uint32 Offset; Uint32 Offset;
SimpleProperties::ValueType Type; ValueType Type;
Uint32 minValue; Uint32 minValue;
Uint32 maxValue; Uint32 maxValue;
Uint32 Length_Offset; // Offset used for looking up length of Uint32 Length_Offset; // Offset used for looking up length of
...@@ -233,7 +233,7 @@ private: ...@@ -233,7 +233,7 @@ private:
*/ */
class SimplePropertiesSectionReader : public SimpleProperties::Reader { class SimplePropertiesSectionReader : public SimpleProperties::Reader {
public: public:
SimplePropertiesSectionReader(class SegmentedSectionPtr &, SimplePropertiesSectionReader(struct SegmentedSectionPtr &,
class SectionSegmentPool &); class SectionSegmentPool &);
virtual void reset(); virtual void reset();
...@@ -248,8 +248,8 @@ private: ...@@ -248,8 +248,8 @@ private:
Uint32 m_pos; Uint32 m_pos;
Uint32 m_len; Uint32 m_len;
class SectionSegmentPool & m_pool; class SectionSegmentPool & m_pool;
class SectionSegment * m_head; struct SectionSegment * m_head;
class SectionSegment * m_currentSegment; struct SectionSegment * m_currentSegment;
}; };
inline inline
...@@ -275,15 +275,15 @@ public: ...@@ -275,15 +275,15 @@ public:
/** /**
* This "unlinks" the writer from the memory * This "unlinks" the writer from the memory
*/ */
void getPtr(class SegmentedSectionPtr & dst); void getPtr(struct SegmentedSectionPtr & dst);
private: private:
Int32 m_pos; Int32 m_pos;
Uint32 m_sz; Uint32 m_sz;
class SectionSegmentPool & m_pool; class SectionSegmentPool & m_pool;
class SectionSegment * m_head; struct SectionSegment * m_head;
Uint32 m_prevPtrI; // Prev to m_currentSegment Uint32 m_prevPtrI; // Prev to m_currentSegment
class SectionSegment * m_currentSegment; struct SectionSegment * m_currentSegment;
}; };
#endif #endif
...@@ -98,7 +98,7 @@ public: ...@@ -98,7 +98,7 @@ public:
*/ */
void stopSessions(bool wait = false); void stopSessions(bool wait = false);
void foreachSession(void (*f)(SocketServer::Session*, void*), void *data); void foreachSession(void (*f)(Session*, void*), void *data);
private: private:
struct SessionInstance { struct SessionInstance {
......
...@@ -16,3 +16,18 @@ libndbclient_la_LIBADD = \ ...@@ -16,3 +16,18 @@ libndbclient_la_LIBADD = \
common/logger/liblogger.la \ common/logger/liblogger.la \
common/portlib/libportlib.la \ common/portlib/libportlib.la \
common/util/libgeneral.la common/util/libgeneral.la
windoze-dsp: libndbclient.dsp
libndbclient.dsp: Makefile \
$(top_srcdir)/ndb/config/win-lib.am \
$(top_srcdir)/ndb/config/win-name \
$(top_srcdir)/ndb/config/win-includes \
$(top_srcdir)/ndb/config/win-sources \
$(top_srcdir)/ndb/config/win-libraries
cat $(top_srcdir)/ndb/config/win-lib.am > $@
@$(top_srcdir)/ndb/config/win-name $@ $(ndblib_LTLIBRARIES)
@$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/ndb/config/win-sources $@ dummy.cpp
@$(top_srcdir)/ndb/config/win-libraries $@ LIB $(libndbclient_la_LIBADD)
@touch dummy.cpp
...@@ -11,3 +11,5 @@ libcommon_la_LIBADD = \ ...@@ -11,3 +11,5 @@ libcommon_la_LIBADD = \
portlib/libportlib.la \ portlib/libportlib.la \
logger/liblogger.la \ logger/liblogger.la \
util/libgeneral.la util/libgeneral.la
windoze-dsp:
...@@ -1033,7 +1033,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1033,7 +1033,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
"Grep::SSCoord:Error code: %d Error message: %s" "Grep::SSCoord:Error code: %d Error message: %s"
" (subId=%d,SubKey=%d)", " (subId=%d,SubKey=%d)",
err, err,
GrepError::getErrorDesc((GrepError::Code)err), GrepError::getErrorDesc((GrepError::GE_Code)err),
subId, subId,
subKey); subKey);
break; break;
...@@ -1050,7 +1050,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1050,7 +1050,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepSS_SubStartMetaRef: case GrepEvent::GrepSS_SubStartMetaRef:
...@@ -1066,7 +1066,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1066,7 +1066,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepSS_SubStartDataRef: case GrepEvent::GrepSS_SubStartDataRef:
...@@ -1081,7 +1081,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1081,7 +1081,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepSS_SubSyncMetaRef: case GrepEvent::GrepSS_SubSyncMetaRef:
...@@ -1096,7 +1096,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1096,7 +1096,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepSS_SubSyncDataRef: case GrepEvent::GrepSS_SubSyncDataRef:
...@@ -1113,7 +1113,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1113,7 +1113,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subKey, subKey,
gci, gci,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepSS_SubRemoveRef: case GrepEvent::GrepSS_SubRemoveRef:
...@@ -1128,7 +1128,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1128,7 +1128,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err) GrepError::getErrorDesc((GrepError::GE_Code)err)
); );
break; break;
} }
...@@ -1142,7 +1142,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1142,7 +1142,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
"Grep::PSCoord: Error code: %d Error Message: %s" "Grep::PSCoord: Error code: %d Error Message: %s"
" (subId=%d,SubKey=%d)", " (subId=%d,SubKey=%d)",
err, err,
GrepError::getErrorDesc((GrepError::Code)err), GrepError::getErrorDesc((GrepError::GE_Code)err),
subId, subId,
subKey); subKey);
break; break;
...@@ -1159,7 +1159,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1159,7 +1159,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepPS_SubStartMetaRef: case GrepEvent::GrepPS_SubStartMetaRef:
...@@ -1175,7 +1175,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1175,7 +1175,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepPS_SubStartDataRef: case GrepEvent::GrepPS_SubStartDataRef:
...@@ -1190,7 +1190,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1190,7 +1190,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepPS_SubSyncMetaRef: case GrepEvent::GrepPS_SubSyncMetaRef:
...@@ -1205,7 +1205,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1205,7 +1205,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepPS_SubSyncDataRef: case GrepEvent::GrepPS_SubSyncDataRef:
...@@ -1222,7 +1222,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1222,7 +1222,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subKey, subKey,
gci, gci,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::GrepPS_SubRemoveRef: case GrepEvent::GrepPS_SubRemoveRef:
...@@ -1237,7 +1237,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1237,7 +1237,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
subId, subId,
subKey, subKey,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
case GrepEvent::Rep_Disconnect: case GrepEvent::Rep_Disconnect:
...@@ -1249,7 +1249,7 @@ EventLogger::getText(char * m_text, size_t m_text_len, ...@@ -1249,7 +1249,7 @@ EventLogger::getText(char * m_text, size_t m_text_len,
" Error code: %d Error Message: %s", " Error code: %d Error Message: %s",
nodeId, nodeId,
err, err,
GrepError::getErrorDesc((GrepError::Code)err)); GrepError::getErrorDesc((GrepError::GE_Code)err));
break; break;
} }
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
*/ */
const GrepError::ErrorDescription GrepError::errorDescriptions[] = { const GrepError::ErrorDescription GrepError::errorDescriptions[] = {
{ GrepError::NO_ERROR, { GrepError::GE_NO_ERROR,
"No error" }, "No error" },
{ GrepError::SUBSCRIPTION_ID_NOMEM, { GrepError::SUBSCRIPTION_ID_NOMEM,
"Not enough resources to allocate the subscription" }, "Not enough resources to allocate the subscription" },
...@@ -119,7 +119,7 @@ GrepError::noOfErrorDescs = sizeof(GrepError::errorDescriptions) / ...@@ -119,7 +119,7 @@ GrepError::noOfErrorDescs = sizeof(GrepError::errorDescriptions) /
* gets the corresponding error message to an err code * gets the corresponding error message to an err code
*/ */
const char * const char *
GrepError::getErrorDesc(GrepError::Code err) { GrepError::getErrorDesc(GrepError::GE_Code err) {
for(Uint32 i = 0; i<noOfErrorDescs; i++){ for(Uint32 i = 0; i<noOfErrorDescs; i++){
if(err == errorDescriptions[i].errCode){ if(err == errorDescriptions[i].errCode){
......
...@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am ...@@ -9,3 +9,17 @@ include $(top_srcdir)/ndb/config/type_kernel.mk.am
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
windoze-dsp: libtrace.dsp
libtrace.dsp: Makefile \
$(top_srcdir)/ndb/config/win-lib.am \
$(top_srcdir)/ndb/config/win-name \
$(top_srcdir)/ndb/config/win-includes \
$(top_srcdir)/ndb/config/win-sources \
$(top_srcdir)/ndb/config/win-libraries
cat $(top_srcdir)/ndb/config/win-lib.am > $@
@$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
@$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/ndb/config/win-sources $@ $(libtrace_la_SOURCES)
@$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
...@@ -31,7 +31,7 @@ printFSCLOSEREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiv ...@@ -31,7 +31,7 @@ printFSCLOSEREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiv
sig->userReference); sig->userReference);
fprintf(output, " Flags: H\'%.8x, ", sig->fileFlag); fprintf(output, " Flags: H\'%.8x, ", sig->fileFlag);
if (sig->getRemoveFileFlag(sig->fileFlag) == true) if (sig->getRemoveFileFlag(sig->fileFlag))
fprintf(output, "Remove file"); fprintf(output, "Remove file");
else else
fprintf(output, "Don't remove file"); fprintf(output, "Don't remove file");
......
...@@ -31,7 +31,7 @@ printFSREADWRITEREQ(FILE * output, const Uint32 * theData, ...@@ -31,7 +31,7 @@ printFSREADWRITEREQ(FILE * output, const Uint32 * theData,
fprintf(output, " UserReference: H\'%.8x", sig->userReference); fprintf(output, " UserReference: H\'%.8x", sig->userReference);
fprintf(output, " Operation flag: H\'%.8x (", sig->operationFlag); fprintf(output, " Operation flag: H\'%.8x (", sig->operationFlag);
if (sig->getSyncFlag(sig->operationFlag) == true) if (sig->getSyncFlag(sig->operationFlag))
fprintf(output, "Sync,"); fprintf(output, "Sync,");
else else
fprintf(output, "No sync,"); fprintf(output, "No sync,");
......
...@@ -32,3 +32,16 @@ include $(top_srcdir)/ndb/config/type_ndbapi.mk.am ...@@ -32,3 +32,16 @@ include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
windoze-dsp: libsignaldataprint.dsp
libsignaldataprint.dsp: Makefile \
$(top_srcdir)/ndb/config/win-lib.am \
$(top_srcdir)/ndb/config/win-name \
$(top_srcdir)/ndb/config/win-includes \
$(top_srcdir)/ndb/config/win-sources \
$(top_srcdir)/ndb/config/win-libraries
cat $(top_srcdir)/ndb/config/win-lib.am > $@
@$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
@$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/ndb/config/win-sources $@ $(libsignaldataprint_la_SOURCES)
@$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
...@@ -30,13 +30,14 @@ printSCANTABREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiv ...@@ -30,13 +30,14 @@ printSCANTABREQ(FILE * output, const Uint32 * theData, Uint32 len, Uint16 receiv
fprintf(output, " apiConnectPtr: H\'%.8x", fprintf(output, " apiConnectPtr: H\'%.8x",
sig->apiConnectPtr); sig->apiConnectPtr);
fprintf(output, " requestInfo: H\'%.8x:\n", requestInfo); fprintf(output, " requestInfo: H\'%.8x:\n", requestInfo);
fprintf(output, " Parallellism: %u, Batch: %u LockMode: %u, Keyinfo: %u Holdlock: %u, RangeScan: %u ReadCommitted: %u\n DistributionKeyFlag: %u", fprintf(output, " Parallellism: %u, Batch: %u LockMode: %u Keyinfo: %u Holdlock: %u RangeScan: %u Descending: %u ReadCommitted: %u\n DistributionKeyFlag: %u",
sig->getParallelism(requestInfo), sig->getParallelism(requestInfo),
sig->getScanBatch(requestInfo), sig->getScanBatch(requestInfo),
sig->getLockMode(requestInfo), sig->getLockMode(requestInfo),
sig->getKeyinfoFlag(requestInfo), sig->getKeyinfoFlag(requestInfo),
sig->getHoldLockFlag(requestInfo), sig->getHoldLockFlag(requestInfo),
sig->getRangeScanFlag(requestInfo), sig->getRangeScanFlag(requestInfo),
sig->getDescendingFlag(requestInfo),
sig->getReadCommittedFlag(requestInfo), sig->getReadCommittedFlag(requestInfo),
sig->getDistributionKeyFlag(requestInfo)); sig->getDistributionKeyFlag(requestInfo));
......
...@@ -206,9 +206,9 @@ FileLogHandler::setMaxSize(const BaseString &size) { ...@@ -206,9 +206,9 @@ FileLogHandler::setMaxSize(const BaseString &size) {
long val = strtol(size.c_str(), &end, 0); /* XXX */ long val = strtol(size.c_str(), &end, 0); /* XXX */
if(size.c_str() == end) if(size.c_str() == end)
return false; return false;
if(strncasecmp("M", end, 1) == 0) if(end[0] == 'M')
val *= 1024*1024; val *= 1024*1024;
if(strncasecmp("k", end, 1) == 0) if(end[0] == 'k')
val *= 1024; val *= 1024;
m_maxFileSize = val; m_maxFileSize = val;
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#define LOGHANDLERLIST_H #define LOGHANDLERLIST_H
class LogHandler; class LogHandler;
#include <ndb_global.h>
/** /**
* Provides a simple linked list of log handlers. * Provides a simple linked list of log handlers.
......
...@@ -186,13 +186,17 @@ Logger::addHandler(const BaseString &logstring) { ...@@ -186,13 +186,17 @@ Logger::addHandler(const BaseString &logstring) {
LogHandler *handler = NULL; LogHandler *handler = NULL;
if(type == "SYSLOG") { #ifndef NDB_WIN32
if(type == "SYSLOG")
{
handler = new SysLogHandler(); handler = new SysLogHandler();
} else if(type == "FILE") } else
#endif
if(type == "FILE")
handler = new FileLogHandler(); handler = new FileLogHandler();
else if(type == "CONSOLE") else if(type == "CONSOLE")
handler = new ConsoleLogHandler(); handler = new ConsoleLogHandler();
if(handler == NULL) if(handler == NULL)
DBUG_RETURN(false); DBUG_RETURN(false);
if(!handler->parseParams(params)) if(!handler->parseParams(params))
......
noinst_LTLIBRARIES = liblogger.la noinst_LTLIBRARIES = liblogger.la
liblogger_la_SOURCES = Logger.cpp LogHandlerList.cpp LogHandler.cpp \ SOURCE_WIN = Logger.cpp LogHandlerList.cpp LogHandler.cpp \
ConsoleLogHandler.cpp FileLogHandler.cpp SysLogHandler.cpp ConsoleLogHandler.cpp FileLogHandler.cpp
liblogger_la_SOURCES = $(SOURCE_WIN) SysLogHandler.cpp
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
include $(top_srcdir)/ndb/config/type_ndbapi.mk.am include $(top_srcdir)/ndb/config/type_ndbapi.mk.am
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
windoze-dsp: liblogger.dsp
liblogger.dsp: Makefile \
$(top_srcdir)/ndb/config/win-lib.am \
$(top_srcdir)/ndb/config/win-name \
$(top_srcdir)/ndb/config/win-includes \
$(top_srcdir)/ndb/config/win-sources \
$(top_srcdir)/ndb/config/win-libraries
cat $(top_srcdir)/ndb/config/win-lib.am > $@
@$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
@$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/ndb/config/win-sources $@ $(SOURCE_WIN)
@$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
...@@ -141,9 +141,10 @@ ConfigRetriever::getConfig(NdbMgmHandle m_handle){ ...@@ -141,9 +141,10 @@ ConfigRetriever::getConfig(NdbMgmHandle m_handle){
return conf; return conf;
} }
ndb_mgm_configuration * ndb_mgm_configuration *
ConfigRetriever::getConfig(const char * filename){ ConfigRetriever::getConfig(const char * filename){
#ifndef NDB_WIN32
struct stat sbuf; struct stat sbuf;
const int res = stat(filename, &sbuf); const int res = stat(filename, &sbuf);
...@@ -180,8 +181,10 @@ ConfigRetriever::getConfig(const char * filename){ ...@@ -180,8 +181,10 @@ ConfigRetriever::getConfig(const char * filename){
return 0; return 0;
} }
delete [] buf2; delete [] buf2;
return (ndb_mgm_configuration*)cvf.m_cfg; return (ndb_mgm_configuration*)cvf.m_cfg;
#else
return 0;
#endif
} }
void void
......
...@@ -12,3 +12,17 @@ include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am ...@@ -12,3 +12,17 @@ include $(top_srcdir)/ndb/config/type_mgmapiclient.mk.am
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
windoze-dsp: libmgmsrvcommon.dsp
libmgmsrvcommon.dsp: Makefile \
$(top_srcdir)/ndb/config/win-lib.am \
$(top_srcdir)/ndb/config/win-name \
$(top_srcdir)/ndb/config/win-includes \
$(top_srcdir)/ndb/config/win-sources \
$(top_srcdir)/ndb/config/win-libraries
cat $(top_srcdir)/ndb/config/win-lib.am > $@
@$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
@$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/ndb/config/win-sources $@ $(libmgmsrvcommon_la_SOURCES)
@$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
...@@ -17,3 +17,27 @@ PortLibTest_SOURCES = NdbPortLibTest.cpp ...@@ -17,3 +17,27 @@ PortLibTest_SOURCES = NdbPortLibTest.cpp
munmaptest_SOURCES = munmaptest.cpp munmaptest_SOURCES = munmaptest.cpp
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
WIN_src = win32/NdbCondition.c \
win32/NdbDaemon.c \
win32/NdbEnv.c \
win32/NdbHost.c \
win32/NdbMem.c \
win32/NdbMutex.c \
win32/NdbSleep.c \
win32/NdbTCP.c \
win32/NdbThread.c \
win32/NdbTick.c
windoze-dsp: libportlib.dsp
libportlib.dsp: Makefile \
$(top_srcdir)/ndb/config/win-lib.am \
$(top_srcdir)/ndb/config/win-name \
$(top_srcdir)/ndb/config/win-includes \
$(top_srcdir)/ndb/config/win-sources \
$(top_srcdir)/ndb/config/win-libraries
cat $(top_srcdir)/ndb/config/win-lib.am > $@
@$(top_srcdir)/ndb/config/win-name $@ $(noinst_LTLIBRARIES)
@$(top_srcdir)/ndb/config/win-includes $@ $(INCLUDES)
@$(top_srcdir)/ndb/config/win-sources $@ $(WIN_src)
@$(top_srcdir)/ndb/config/win-libraries $@ LIB $(LDADD)
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <NdbConfig.h> #include <NdbConfig.h>
#include <NdbEnv.h> #include <NdbEnv.h>
#include <NdbMem.h> #include <NdbMem.h>
#include <basestring_vsnprintf.h>
static const char *datadir_path= 0; static const char *datadir_path= 0;
...@@ -48,7 +49,7 @@ NdbConfig_AllocHomePath(int _len) ...@@ -48,7 +49,7 @@ NdbConfig_AllocHomePath(int _len)
const char *path= NdbConfig_get_path(&path_len); const char *path= NdbConfig_get_path(&path_len);
int len= _len+path_len; int len= _len+path_len;
char *buf= NdbMem_Allocate(len); char *buf= NdbMem_Allocate(len);
snprintf(buf, len, "%s%s", path, DIR_SEPARATOR); basestring_snprintf(buf, len, "%s%s", path, DIR_SEPARATOR);
return buf; return buf;
} }
...@@ -67,7 +68,7 @@ NdbConfig_NdbCfgName(int with_ndb_home){ ...@@ -67,7 +68,7 @@ NdbConfig_NdbCfgName(int with_ndb_home){
len= strlen(buf); len= strlen(buf);
} else } else
buf= NdbMem_Allocate(128); buf= NdbMem_Allocate(128);
snprintf(buf+len, 128, "Ndb.cfg"); basestring_snprintf(buf+len, 128, "Ndb.cfg");
return buf; return buf;
} }
...@@ -77,9 +78,9 @@ char *get_prefix_buf(int len, int node_id) ...@@ -77,9 +78,9 @@ char *get_prefix_buf(int len, int node_id)
char tmp_buf[sizeof("ndb_pid#############")+1]; char tmp_buf[sizeof("ndb_pid#############")+1];
char *buf; char *buf;
if (node_id > 0) if (node_id > 0)
snprintf(tmp_buf, sizeof(tmp_buf), "ndb_%u", node_id); basestring_snprintf(tmp_buf, sizeof(tmp_buf), "ndb_%u", node_id);
else else
snprintf(tmp_buf, sizeof(tmp_buf), "ndb_pid%u", getpid()); basestring_snprintf(tmp_buf, sizeof(tmp_buf), "ndb_pid%u", getpid());
tmp_buf[sizeof(tmp_buf)-1]= 0; tmp_buf[sizeof(tmp_buf)-1]= 0;
buf= NdbConfig_AllocHomePath(len+strlen(tmp_buf)); buf= NdbConfig_AllocHomePath(len+strlen(tmp_buf));
...@@ -91,7 +92,7 @@ char* ...@@ -91,7 +92,7 @@ char*
NdbConfig_ErrorFileName(int node_id){ NdbConfig_ErrorFileName(int node_id){
char *buf= get_prefix_buf(128, node_id); char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf); int len= strlen(buf);
snprintf(buf+len, 128, "_error.log"); basestring_snprintf(buf+len, 128, "_error.log");
return buf; return buf;
} }
...@@ -99,7 +100,7 @@ char* ...@@ -99,7 +100,7 @@ char*
NdbConfig_ClusterLogFileName(int node_id){ NdbConfig_ClusterLogFileName(int node_id){
char *buf= get_prefix_buf(128, node_id); char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf); int len= strlen(buf);
snprintf(buf+len, 128, "_cluster.log"); basestring_snprintf(buf+len, 128, "_cluster.log");
return buf; return buf;
} }
...@@ -107,7 +108,7 @@ char* ...@@ -107,7 +108,7 @@ char*
NdbConfig_SignalLogFileName(int node_id){ NdbConfig_SignalLogFileName(int node_id){
char *buf= get_prefix_buf(128, node_id); char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf); int len= strlen(buf);
snprintf(buf+len, 128, "_signal.log"); basestring_snprintf(buf+len, 128, "_signal.log");
return buf; return buf;
} }
...@@ -115,7 +116,7 @@ char* ...@@ -115,7 +116,7 @@ char*
NdbConfig_TraceFileName(int node_id, int file_no){ NdbConfig_TraceFileName(int node_id, int file_no){
char *buf= get_prefix_buf(128, node_id); char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf); int len= strlen(buf);
snprintf(buf+len, 128, "_trace.log.%u", file_no); basestring_snprintf(buf+len, 128, "_trace.log.%u", file_no);
return buf; return buf;
} }
...@@ -123,7 +124,7 @@ char* ...@@ -123,7 +124,7 @@ char*
NdbConfig_NextTraceFileName(int node_id){ NdbConfig_NextTraceFileName(int node_id){
char *buf= get_prefix_buf(128, node_id); char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf); int len= strlen(buf);
snprintf(buf+len, 128, "_trace.log.next"); basestring_snprintf(buf+len, 128, "_trace.log.next");
return buf; return buf;
} }
...@@ -131,7 +132,7 @@ char* ...@@ -131,7 +132,7 @@ char*
NdbConfig_PidFileName(int node_id){ NdbConfig_PidFileName(int node_id){
char *buf= get_prefix_buf(128, node_id); char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf); int len= strlen(buf);
snprintf(buf+len, 128, ".pid"); basestring_snprintf(buf+len, 128, ".pid");
return buf; return buf;
} }
...@@ -139,6 +140,6 @@ char* ...@@ -139,6 +140,6 @@ char*
NdbConfig_StdoutFileName(int node_id){ NdbConfig_StdoutFileName(int node_id){
char *buf= get_prefix_buf(128, node_id); char *buf= get_prefix_buf(128, node_id);
int len= strlen(buf); int len= strlen(buf);
snprintf(buf+len, 128, "_out.log"); basestring_snprintf(buf+len, 128, "_out.log");
return buf; return buf;
} }
This diff is collapsed.
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "NdbDaemon.h"
#define NdbDaemon_ErrorSize 500
long NdbDaemon_DaemonPid;
int NdbDaemon_ErrorCode;
char NdbDaemon_ErrorText[NdbDaemon_ErrorSize];
int
NdbDaemon_Make(const char* lockfile, const char* logfile, unsigned flags)
{
// XXX do something
return 0;
}
#ifdef NDB_DAEMON_TEST
int
main()
{
if (NdbDaemon_Make("test.pid", "test.log", 0) == -1) {
fprintf(stderr, "NdbDaemon_Make: %s\n", NdbDaemon_ErrorText);
return 1;
}
sleep(10);
return 0;
}
#endif
/* Copyright (C) 2003 MySQL AB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include <ndb_global.h>
#include "NdbEnv.h"
const char* NdbEnv_GetEnv(const char* name, char * buf, int buflen)
{
char* p = NULL;
p = getenv(name);
if (p != NULL && buf != NULL){
strncpy(buf, p, buflen);
buf[buflen-1] = 0;
}
return p;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -95,7 +95,7 @@ Transporter::connect_client() { ...@@ -95,7 +95,7 @@ Transporter::connect_client() {
return true; return true;
NDB_SOCKET_TYPE sockfd = m_socket_client->connect(); NDB_SOCKET_TYPE sockfd = m_socket_client->connect();
if (sockfd < 0) if (sockfd == NDB_INVALID_SOCKET)
return false; return false;
// send info about own id // send info about own id
......
This diff is collapsed.
This diff is collapsed.
...@@ -881,7 +881,7 @@ PropertiesImpl::unpack(const Uint32 * buf, Uint32 &bufLen, Properties * top, ...@@ -881,7 +881,7 @@ PropertiesImpl::unpack(const Uint32 * buf, Uint32 &bufLen, Properties * top,
case PropertiesType_Properties: case PropertiesType_Properties:
assert(0); assert(0);
} }
if(res3 != true){ if(!res3){
return false; return false;
} }
_items--; _items--;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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