mirror of
https://github.com/MariaDB/server.git
synced 2025-10-12 12:25:37 +03:00
Merge mysql.com:/home/jonas/src/mysql-5.0
into mysql.com:/home/jonas/src/mysql-5.0-ndb
This commit is contained in:
@@ -1052,3 +1052,6 @@ vio/test-ssl
|
|||||||
vio/test-sslclient
|
vio/test-sslclient
|
||||||
vio/test-sslserver
|
vio/test-sslserver
|
||||||
vio/viotest-ssl
|
vio/viotest-ssl
|
||||||
|
include/mysqld_ername.h
|
||||||
|
include/mysqld_error.h
|
||||||
|
include/sql_state.h
|
||||||
|
@@ -241,6 +241,7 @@ tonu@x153.internalnet
|
|||||||
tonu@x3.internalnet
|
tonu@x3.internalnet
|
||||||
tsmith@build.mysql.com
|
tsmith@build.mysql.com
|
||||||
tulin@build.mysql.com
|
tulin@build.mysql.com
|
||||||
|
tulin@mysql.com
|
||||||
ulli@morbus.(none)
|
ulli@morbus.(none)
|
||||||
venu@hundin.mysql.fi
|
venu@hundin.mysql.fi
|
||||||
venu@myvenu.com
|
venu@myvenu.com
|
||||||
|
@@ -27,9 +27,5 @@ EXTRA_DIST =
|
|||||||
all:
|
all:
|
||||||
:
|
:
|
||||||
|
|
||||||
# Nothing to cleanup in this dummy directory.
|
|
||||||
clean:
|
|
||||||
:
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
%::SCCS/s.%
|
%::SCCS/s.%
|
||||||
|
@@ -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) -I$(top_srcdir)/extra
|
$(openssl_includes) -I$(top_builddir)/include
|
||||||
LIBS = @CLIENT_LIBS@
|
LIBS = @CLIENT_LIBS@
|
||||||
LDADD= @CLIENT_EXTRA_LDFLAGS@ \
|
LDADD= @CLIENT_EXTRA_LDFLAGS@ \
|
||||||
$(top_builddir)/libmysql/libmysqlclient.la
|
$(top_builddir)/libmysql/libmysqlclient.la
|
||||||
|
@@ -1674,8 +1674,8 @@ then
|
|||||||
elif test "$with_debug" = "full"
|
elif test "$with_debug" = "full"
|
||||||
then
|
then
|
||||||
# Full debug. Very slow in some cases
|
# Full debug. Very slow in some cases
|
||||||
CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC -DUNIV_DEBUG $CFLAGS"
|
CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
|
||||||
CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC -DUNIV_DEBUG $CXXFLAGS"
|
CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
|
||||||
else
|
else
|
||||||
# Optimized version. No debug
|
# Optimized version. No debug
|
||||||
CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
|
CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
|
||||||
|
@@ -26,6 +26,7 @@ EXTRA_DIST = example1.c example2.c example3.c \
|
|||||||
NROFF_INC = example1.r example2.r example3.r main.r \
|
NROFF_INC = example1.r example2.r example3.r main.r \
|
||||||
factorial.r output1.r output2.r output3.r \
|
factorial.r output1.r output2.r output3.r \
|
||||||
output4.r output5.r
|
output4.r output5.r
|
||||||
|
CLEANFILES = $(NROFF_INC) user.t user.ps
|
||||||
|
|
||||||
|
|
||||||
# Must be linked with libs that are not compiled yet
|
# Must be linked with libs that are not compiled yet
|
||||||
@@ -59,8 +60,5 @@ output5.r: factorial
|
|||||||
@RM@ -f $@
|
@RM@ -f $@
|
||||||
@SED@ -e 's!\\!\\\\!g' $< > $@
|
@SED@ -e 's!\\!\\\\!g' $< > $@
|
||||||
|
|
||||||
clean:
|
|
||||||
@RM@ -f $(NROFF_INC) user.t user.ps
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
%::SCCS/s.%
|
%::SCCS/s.%
|
||||||
|
@@ -16,25 +16,26 @@
|
|||||||
|
|
||||||
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
|
-I$(top_builddir)/include
|
||||||
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 mysqld_ername.h
|
BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \
|
||||||
|
$(top_builddir)/include/sql_state.h \
|
||||||
|
$(top_builddir)/include/mysqld_ername.h
|
||||||
pkginclude_HEADERS= $(BUILT_SOURCES)
|
pkginclude_HEADERS= $(BUILT_SOURCES)
|
||||||
created_sources = created_include_files
|
CLEANFILES = $(BUILT_SOURCES)
|
||||||
CLEANFILES = $(created_sources)
|
|
||||||
SUPERCLEANFILES = $(BUILT_SOURCES)
|
|
||||||
|
|
||||||
all: $(created_sources)
|
|
||||||
|
|
||||||
# This will build mysqld_error.h and sql_state.h
|
# This will build mysqld_error.h and sql_state.h
|
||||||
mysqld_error.h: created_include_files
|
$(top_builddir)/include/mysqld_error.h: comp_err
|
||||||
mysqld_ername.h: created_include_files
|
$(top_builddir)/extra/comp_err \
|
||||||
sql_state.h: created_include_files
|
--charset=$(top_srcdir)/sql/share/charsets \
|
||||||
|
--out-dir=$(top_builddir)/sql/share/ \
|
||||||
created_include_files: comp_err
|
--header_file=$(top_builddir)/include/mysqld_error.h \
|
||||||
$(top_builddir)/extra/comp_err --charset=$(srcdir)/../sql/share/charsets --out-dir=$(top_builddir)/sql/share/ --header_file=$(top_builddir)/extra/mysqld_error.h --name_file=$(top_builddir)/extra/mysqld_ername.h --state_file=$(top_builddir)/extra/sql_state.h --in_file=$(srcdir)/../sql/share/errmsg.txt
|
--name_file=$(top_builddir)/include/mysqld_ername.h \
|
||||||
touch created_include_files
|
--state_file=$(top_builddir)/include/sql_state.h \
|
||||||
|
--in_file=$(top_srcdir)/sql/share/errmsg.txt
|
||||||
|
$(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
|
||||||
|
$(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
|
||||||
|
|
||||||
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
|
||||||
|
@@ -33,15 +33,10 @@ noinst_HEADERS = config-win.h config-os2.h config-netware.h \
|
|||||||
mysql_version.h.in my_handler.h my_time.h decimal.h
|
mysql_version.h.in my_handler.h my_time.h decimal.h
|
||||||
|
|
||||||
# mysql_version.h are generated
|
# mysql_version.h are generated
|
||||||
SUPERCLEANFILES = mysql_version.h my_config.h
|
CLEANFILES = mysql_version.h my_config.h readline
|
||||||
|
|
||||||
# Some include files that may be moved and patched by configure
|
# Some include files that may be moved and patched by configure
|
||||||
DISTCLEANFILES = sched.h $(SUPERCLEANFILES)
|
DISTCLEANFILES = sched.h $(CLEANFILES)
|
||||||
|
|
||||||
clean:
|
|
||||||
$(RM) -fr readline
|
|
||||||
distclean:
|
|
||||||
$(RM) -fr readline
|
|
||||||
|
|
||||||
all-local: my_config.h
|
all-local: my_config.h
|
||||||
|
|
||||||
|
@@ -526,7 +526,7 @@ bits of a record. (Only compact records have status bits.) */
|
|||||||
UNIV_INLINE
|
UNIV_INLINE
|
||||||
ulint
|
ulint
|
||||||
rec_get_info_and_status_bits(
|
rec_get_info_and_status_bits(
|
||||||
/*==============*/
|
/*=========================*/
|
||||||
/* out: info bits */
|
/* out: info bits */
|
||||||
rec_t* rec, /* in: physical record */
|
rec_t* rec, /* in: physical record */
|
||||||
ibool comp) /* in: TRUE=compact page format */
|
ibool comp) /* in: TRUE=compact page format */
|
||||||
@@ -550,7 +550,7 @@ bits of a record. (Only compact records have status bits.) */
|
|||||||
UNIV_INLINE
|
UNIV_INLINE
|
||||||
void
|
void
|
||||||
rec_set_info_and_status_bits(
|
rec_set_info_and_status_bits(
|
||||||
/*==============*/
|
/*=========================*/
|
||||||
rec_t* rec, /* in: physical record */
|
rec_t* rec, /* in: physical record */
|
||||||
ibool comp, /* in: TRUE=compact page format */
|
ibool comp, /* in: TRUE=compact page format */
|
||||||
ulint bits) /* in: info bits */
|
ulint bits) /* in: info bits */
|
||||||
|
@@ -383,7 +383,9 @@ struct trx_struct{
|
|||||||
dulint commit_lsn; /* lsn at the time of the commit */
|
dulint commit_lsn; /* lsn at the time of the commit */
|
||||||
ibool dict_operation; /* TRUE if the trx is used to create
|
ibool dict_operation; /* TRUE if the trx is used to create
|
||||||
a table, create an index, or drop a
|
a table, create an index, or drop a
|
||||||
table */
|
table. This is a hint that the table
|
||||||
|
may need to be dropped in crash
|
||||||
|
recovery. */
|
||||||
dulint table_id; /* table id if the preceding field is
|
dulint table_id; /* table id if the preceding field is
|
||||||
TRUE */
|
TRUE */
|
||||||
/*------------------------------*/
|
/*------------------------------*/
|
||||||
|
@@ -2561,17 +2561,6 @@ do not allow the TRUNCATE. We also reserve the data dictionary latch. */
|
|||||||
goto funct_exit;
|
goto funct_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (table->n_mysql_handles_opened > 1) {
|
|
||||||
ut_print_timestamp(stderr);
|
|
||||||
fputs(" InnoDB: Warning: MySQL is trying to truncate table ", stderr);
|
|
||||||
ut_print_name(stderr, trx, table->name);
|
|
||||||
fputs("\n"
|
|
||||||
"InnoDB: though there are still open handles to it.\n", stderr);
|
|
||||||
err = DB_ERROR;
|
|
||||||
|
|
||||||
goto funct_exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* TODO: could we replace the counter n_foreign_key_checks_running
|
/* TODO: could we replace the counter n_foreign_key_checks_running
|
||||||
with lock checks on the table? Acquire here an exclusive lock on the
|
with lock checks on the table? Acquire here an exclusive lock on the
|
||||||
table, and rewrite lock0lock.c and the lock wait in srv0srv.c so that
|
table, and rewrite lock0lock.c and the lock wait in srv0srv.c so that
|
||||||
@@ -2594,7 +2583,6 @@ fputs(" InnoDB: Warning: MySQL is trying to truncate table ", stderr);
|
|||||||
|
|
||||||
lock_reset_all_on_table(table);
|
lock_reset_all_on_table(table);
|
||||||
|
|
||||||
trx->dict_operation = TRUE;
|
|
||||||
trx->table_id = table->id;
|
trx->table_id = table->id;
|
||||||
|
|
||||||
/* scan SYS_INDEXES for all indexes of the table */
|
/* scan SYS_INDEXES for all indexes of the table */
|
||||||
|
@@ -24,7 +24,7 @@ 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
|
-I$(top_builddir)/include
|
||||||
|
|
||||||
include $(srcdir)/Makefile.shared
|
include $(srcdir)/Makefile.shared
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ LIBS = @LIBS@ @ZLIB_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
|
-I$(top_builddir)/include
|
||||||
## 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
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
|
|||||||
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)/sql -I$(top_srcdir)/sql/examples \
|
||||||
-I$(top_srcdir)/regex \
|
-I$(top_srcdir)/regex \
|
||||||
-I$(top_srcdir)/extra \
|
-I$(top_builddir)/include \
|
||||||
$(openssl_includes) @ZLIB_INCLUDES@
|
$(openssl_includes) @ZLIB_INCLUDES@
|
||||||
|
|
||||||
noinst_LIBRARIES = libmysqld_int.a
|
noinst_LIBRARIES = libmysqld_int.a
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
noinst_PROGRAMS = mysql
|
noinst_PROGRAMS = mysql
|
||||||
bin_PROGRAMS = mysqltest_embedded mysql_client_test_embedded
|
bin_PROGRAMS = mysqltest_embedded mysql_client_test_embedded
|
||||||
client_sources = $(mysqltest_embedded_SOURCES) $(mysql_SOURCES)
|
client_sources = $(mysqltest_embedded_SOURCES) $(mysql_SOURCES)
|
||||||
tests_sources= $(mysql_client_test_embedded_SOURCES)
|
tests_sources = $(mysql_client_test_embedded_SOURCES)
|
||||||
|
CLEANFILES = $(client_sources) $(tests_sources)
|
||||||
|
|
||||||
link_sources:
|
link_sources:
|
||||||
for f in $(client_sources); do \
|
for f in $(client_sources); do \
|
||||||
@@ -16,7 +17,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 \
|
||||||
-I$(top_srcdir)/extra $(openssl_includes)
|
-I$(top_builddir)/include $(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)
|
||||||
|
|
||||||
@@ -31,9 +32,5 @@ mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD)
|
|||||||
mysql_client_test_embedded_LINK = $(CXXLINK)
|
mysql_client_test_embedded_LINK = $(CXXLINK)
|
||||||
mysql_client_test_embedded_SOURCES = mysql_client_test.c
|
mysql_client_test_embedded_SOURCES = mysql_client_test.c
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(client_sources)
|
|
||||||
rm -f $(tests_sources)
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
%::SCCS/s.%
|
%::SCCS/s.%
|
||||||
|
@@ -432,16 +432,16 @@ index(ye),
|
|||||||
index(ti),
|
index(ti),
|
||||||
index(ts)
|
index(ts)
|
||||||
) engine=ndb;
|
) engine=ndb;
|
||||||
insert into t1 (pk,dt,da,ye,ti) values
|
insert into t1 (pk,dt,da,ye,ti,ts) values
|
||||||
(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59'),
|
(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'),
|
||||||
(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59'),
|
(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'),
|
||||||
(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00'),
|
(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'),
|
||||||
(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00'),
|
(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'),
|
||||||
(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06'),
|
(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'),
|
||||||
(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06'),
|
(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'),
|
||||||
(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10'),
|
(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'),
|
||||||
(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11'),
|
(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'),
|
||||||
(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59');
|
(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59');
|
||||||
select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00';
|
select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00';
|
||||||
count(*)-9
|
count(*)-9
|
||||||
0
|
0
|
||||||
@@ -529,6 +529,30 @@ count(*)-8
|
|||||||
select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
|
select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
|
||||||
count(*)-9
|
count(*)-9
|
||||||
0
|
0
|
||||||
|
select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00';
|
||||||
|
count(*)-9
|
||||||
|
0
|
||||||
|
select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00';
|
||||||
|
count(*)-7
|
||||||
|
0
|
||||||
|
select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05';
|
||||||
|
count(*)-7
|
||||||
|
0
|
||||||
|
select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06';
|
||||||
|
count(*)-5
|
||||||
|
0
|
||||||
|
select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11';
|
||||||
|
count(*)-5
|
||||||
|
0
|
||||||
|
select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11';
|
||||||
|
count(*)-6
|
||||||
|
0
|
||||||
|
select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59';
|
||||||
|
count(*)-8
|
||||||
|
0
|
||||||
|
select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59';
|
||||||
|
count(*)-9
|
||||||
|
0
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1(a int primary key, b int not null, index(b));
|
create table t1(a int primary key, b int not null, index(b));
|
||||||
insert into t1 values (1,1), (2,2);
|
insert into t1 values (1,1), (2,2);
|
||||||
|
@@ -220,16 +220,16 @@ create table t1 (
|
|||||||
index(ts)
|
index(ts)
|
||||||
) engine=ndb;
|
) engine=ndb;
|
||||||
|
|
||||||
insert into t1 (pk,dt,da,ye,ti) values
|
insert into t1 (pk,dt,da,ye,ti,ts) values
|
||||||
(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59'),
|
(1, '1901-05-05 23:00:59', '1901-05-05', '1901', '23:00:59', '2001-01-01 23:00:59'),
|
||||||
(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59'),
|
(2, '1912-09-05 13:00:59', '1912-09-05', '1912', '13:00:59', '2001-01-01 13:00:59'),
|
||||||
(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00'),
|
(3, '1945-12-31 00:00:00', '1945-12-31', '1945', '00:00:00', '2001-01-01 00:00:00'),
|
||||||
(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00'),
|
(4, '1955-12-31 00:00:00', '1955-12-31', '1955', '00:00:00', '2001-01-01 00:00:00'),
|
||||||
(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06'),
|
(5, '1963-06-06 06:06:06', '1963-06-06', '1963', '06:06:06', '2001-01-01 06:06:06'),
|
||||||
(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06'),
|
(6, '1993-06-06 06:06:06', '1993-06-06', '1993', '06:06:06', '2001-01-01 06:06:06'),
|
||||||
(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10'),
|
(7, '2001-01-01 10:11:10', '2001-01-01', '2001', '10:11:10', '2001-01-01 10:11:10'),
|
||||||
(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11'),
|
(8, '2001-01-01 10:11:11', '2001-01-01', '2001', '10:11:11', '2001-01-01 10:11:11'),
|
||||||
(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59');
|
(9, '2005-01-31 23:59:59', '2005-01-31', '2005', '23:59:59', '2001-01-01 23:59:59');
|
||||||
|
|
||||||
# datetime
|
# datetime
|
||||||
select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00';
|
select count(*)-9 from t1 use index (dt) where dt > '1900-01-01 00:00:00';
|
||||||
@@ -268,6 +268,16 @@ select count(*)-6 from t1 use index (ti) where ti <= '10:11:11';
|
|||||||
select count(*)-8 from t1 use index (ti) where ti < '23:59:59';
|
select count(*)-8 from t1 use index (ti) where ti < '23:59:59';
|
||||||
select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
|
select count(*)-9 from t1 use index (ti) where ti <= '23:59:59';
|
||||||
|
|
||||||
|
# timestamp
|
||||||
|
select count(*)-9 from t1 use index (ts) where ts >= '2001-01-01 00:00:00';
|
||||||
|
select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 00:00:00';
|
||||||
|
select count(*)-7 from t1 use index (ts) where ts > '2001-01-01 05:05:05';
|
||||||
|
select count(*)-5 from t1 use index (ts) where ts > '2001-01-01 06:06:06';
|
||||||
|
select count(*)-5 from t1 use index (ts) where ts < '2001-01-01 10:11:11';
|
||||||
|
select count(*)-6 from t1 use index (ts) where ts <= '2001-01-01 10:11:11';
|
||||||
|
select count(*)-8 from t1 use index (ts) where ts < '2001-01-01 23:59:59';
|
||||||
|
select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59';
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
# bug#7798
|
# bug#7798
|
||||||
|
@@ -9,7 +9,7 @@ DOXYOUT = .doxyout
|
|||||||
|
|
||||||
NDB_RELEASE = @NDB_VERSION_MAJOR@.@NDB_VERSION_MINOR@.@NDB_VERSION_BUILD@-@NDB_VERSION_STATUS@
|
NDB_RELEASE = @NDB_VERSION_MAJOR@.@NDB_VERSION_MINOR@.@NDB_VERSION_BUILD@-@NDB_VERSION_STATUS@
|
||||||
|
|
||||||
clean:
|
clean-local:
|
||||||
rm -rf ndbapi.pdf ndbapi.html mgmapi.pdf mgmapi.html
|
rm -rf ndbapi.pdf ndbapi.html mgmapi.pdf mgmapi.html
|
||||||
rm -rf $(DOXYTMP) $(DOXYOUT)
|
rm -rf $(DOXYTMP) $(DOXYOUT)
|
||||||
|
|
||||||
|
@@ -276,7 +276,9 @@ public:
|
|||||||
ExtBit = NdbSqlUtil::Type::Bit,
|
ExtBit = NdbSqlUtil::Type::Bit,
|
||||||
ExtLongvarchar = NdbSqlUtil::Type::Longvarchar,
|
ExtLongvarchar = NdbSqlUtil::Type::Longvarchar,
|
||||||
ExtLongvarbinary = NdbSqlUtil::Type::Longvarbinary,
|
ExtLongvarbinary = NdbSqlUtil::Type::Longvarbinary,
|
||||||
ExtTime = NdbSqlUtil::Type::Time
|
ExtTime = NdbSqlUtil::Type::Time,
|
||||||
|
ExtYear = NdbSqlUtil::Type::Year,
|
||||||
|
ExtTimestamp = NdbSqlUtil::Type::Timestamp
|
||||||
};
|
};
|
||||||
|
|
||||||
// Attribute data interpretation
|
// Attribute data interpretation
|
||||||
@@ -389,6 +391,14 @@ public:
|
|||||||
AttributeSize = DictTabInfo::an8Bit;
|
AttributeSize = DictTabInfo::an8Bit;
|
||||||
AttributeArraySize = 3 * AttributeExtLength;
|
AttributeArraySize = 3 * AttributeExtLength;
|
||||||
break;
|
break;
|
||||||
|
case DictTabInfo::ExtYear:
|
||||||
|
AttributeSize = DictTabInfo::an8Bit;
|
||||||
|
AttributeArraySize = 1 * AttributeExtLength;
|
||||||
|
break;
|
||||||
|
case DictTabInfo::ExtTimestamp:
|
||||||
|
AttributeSize = DictTabInfo::an8Bit;
|
||||||
|
AttributeArraySize = 4 * AttributeExtLength;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
@@ -61,7 +61,9 @@
|
|||||||
#define NDB_TYPE_LONG_VARCHAR 23
|
#define NDB_TYPE_LONG_VARCHAR 23
|
||||||
#define NDB_TYPE_LONG_VARBINARY 24
|
#define NDB_TYPE_LONG_VARBINARY 24
|
||||||
#define NDB_TYPE_TIME 25
|
#define NDB_TYPE_TIME 25
|
||||||
|
#define NDB_TYPE_YEAR 26
|
||||||
|
#define NDB_TYPE_TIMESTAMP 27
|
||||||
|
|
||||||
#define NDB_TYPE_MAX 26
|
#define NDB_TYPE_MAX 28
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -196,7 +196,9 @@ public:
|
|||||||
Bit = NDB_TYPE_BIT, ///< Bit, length specifies no of bits
|
Bit = NDB_TYPE_BIT, ///< Bit, length specifies no of bits
|
||||||
Longvarchar = NDB_TYPE_LONG_VARCHAR, ///< Length bytes: 2, little-endian
|
Longvarchar = NDB_TYPE_LONG_VARCHAR, ///< Length bytes: 2, little-endian
|
||||||
Longvarbinary = NDB_TYPE_LONG_VARBINARY, ///< Length bytes: 2, little-endian
|
Longvarbinary = NDB_TYPE_LONG_VARBINARY, ///< Length bytes: 2, little-endian
|
||||||
Time = NDB_TYPE_TIME ///< Time without date
|
Time = NDB_TYPE_TIME, ///< Time without date
|
||||||
|
Year = NDB_TYPE_YEAR, ///< Year 1901-2155 (1 byte)
|
||||||
|
Timestamp = NDB_TYPE_TIMESTAMP ///< Unix time
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -53,7 +53,7 @@ public:
|
|||||||
COND_GE = 2, ///< upper bound
|
COND_GE = 2, ///< upper bound
|
||||||
COND_GT = 3, ///< upper bound, strict
|
COND_GT = 3, ///< upper bound, strict
|
||||||
COND_EQ = 4, ///< equality
|
COND_EQ = 4, ///< equality
|
||||||
COND_NE = 5
|
COND_NE = 5 ///< not equal
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -17,11 +17,7 @@
|
|||||||
#ifndef NDB_OPT_DEFAULTS_H
|
#ifndef NDB_OPT_DEFAULTS_H
|
||||||
#define NDB_OPT_DEFAULTS_H
|
#define NDB_OPT_DEFAULTS_H
|
||||||
|
|
||||||
#ifdef SIGRTMIN
|
|
||||||
#define OPT_NDB_SHM_SIGNUM_DEFAULT SIGRTMIN+2
|
|
||||||
#else
|
|
||||||
#define OPT_NDB_SHM_SIGNUM_DEFAULT 0
|
#define OPT_NDB_SHM_SIGNUM_DEFAULT 0
|
||||||
#endif
|
|
||||||
#define OPT_NDB_SHM_DEFAULT 0
|
#define OPT_NDB_SHM_DEFAULT 0
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -92,7 +92,9 @@ public:
|
|||||||
Bit = NDB_TYPE_BIT,
|
Bit = NDB_TYPE_BIT,
|
||||||
Longvarchar = NDB_TYPE_LONG_VARCHAR,
|
Longvarchar = NDB_TYPE_LONG_VARCHAR,
|
||||||
Longvarbinary = NDB_TYPE_LONG_VARBINARY,
|
Longvarbinary = NDB_TYPE_LONG_VARBINARY,
|
||||||
Time = NDB_TYPE_TIME
|
Time = NDB_TYPE_TIME,
|
||||||
|
Year = NDB_TYPE_YEAR,
|
||||||
|
Timestamp = NDB_TYPE_TIMESTAMP
|
||||||
};
|
};
|
||||||
Enum m_typeId; // redundant
|
Enum m_typeId; // redundant
|
||||||
Cmp* m_cmp; // comparison method
|
Cmp* m_cmp; // comparison method
|
||||||
@@ -161,6 +163,8 @@ private:
|
|||||||
static Cmp cmpLongvarchar;
|
static Cmp cmpLongvarchar;
|
||||||
static Cmp cmpLongvarbinary;
|
static Cmp cmpLongvarbinary;
|
||||||
static Cmp cmpTime;
|
static Cmp cmpTime;
|
||||||
|
static Cmp cmpYear;
|
||||||
|
static Cmp cmpTimestamp;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -179,6 +179,14 @@ NdbSqlUtil::m_typeList[] = {
|
|||||||
{
|
{
|
||||||
Type::Time,
|
Type::Time,
|
||||||
cmpTime
|
cmpTime
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Type::Year,
|
||||||
|
cmpYear
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Type::Timestamp,
|
||||||
|
cmpTimestamp
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -670,6 +678,40 @@ NdbSqlUtil::cmpLongvarbinary(const void* info, const void* p1, unsigned n1, cons
|
|||||||
return CmpUnknown;
|
return CmpUnknown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
NdbSqlUtil::cmpYear(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
|
||||||
|
{
|
||||||
|
if (n2 >= sizeof(Uint8)) {
|
||||||
|
Uint8 v1, v2;
|
||||||
|
memcpy(&v1, p1, sizeof(Uint8));
|
||||||
|
memcpy(&v2, p2, sizeof(Uint8));
|
||||||
|
if (v1 < v2)
|
||||||
|
return -1;
|
||||||
|
if (v1 > v2)
|
||||||
|
return +1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
assert(! full);
|
||||||
|
return CmpUnknown;
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
NdbSqlUtil::cmpTimestamp(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
|
||||||
|
{
|
||||||
|
if (n2 >= sizeof(Uint32)) {
|
||||||
|
Uint32 v1, v2;
|
||||||
|
memcpy(&v1, p1, sizeof(Uint32));
|
||||||
|
memcpy(&v2, p2, sizeof(Uint32));
|
||||||
|
if (v1 < v2)
|
||||||
|
return -1;
|
||||||
|
if (v1 > v2)
|
||||||
|
return +1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
assert(! full);
|
||||||
|
return CmpUnknown;
|
||||||
|
}
|
||||||
|
|
||||||
// check charset
|
// check charset
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
@@ -980,6 +980,12 @@ operator<<(NdbOut& out, const NdbDictionary::Column& col)
|
|||||||
case NdbDictionary::Column::Time:
|
case NdbDictionary::Column::Time:
|
||||||
out << "Time";
|
out << "Time";
|
||||||
break;
|
break;
|
||||||
|
case NdbDictionary::Column::Year:
|
||||||
|
out << "Year";
|
||||||
|
break;
|
||||||
|
case NdbDictionary::Column::Timestamp:
|
||||||
|
out << "Timestamp";
|
||||||
|
break;
|
||||||
case NdbDictionary::Column::Undefined:
|
case NdbDictionary::Column::Undefined:
|
||||||
out << "Undefined";
|
out << "Undefined";
|
||||||
break;
|
break;
|
||||||
|
@@ -144,6 +144,8 @@ NdbColumnImpl::init(Type t)
|
|||||||
m_cs = default_cs;
|
m_cs = default_cs;
|
||||||
break;
|
break;
|
||||||
case Time:
|
case Time:
|
||||||
|
case Year:
|
||||||
|
case Timestamp:
|
||||||
m_precision = 0;
|
m_precision = 0;
|
||||||
m_scale = 0;
|
m_scale = 0;
|
||||||
m_length = 1;
|
m_length = 1;
|
||||||
|
@@ -178,10 +178,11 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r.arraySize() > 1)
|
uint length = r.getColumn()->getLength();
|
||||||
|
if (length > 1)
|
||||||
out << "[";
|
out << "[";
|
||||||
|
|
||||||
for (Uint32 j = 0; j < r.arraySize(); j++)
|
for (Uint32 j = 0; j < length; j++)
|
||||||
{
|
{
|
||||||
if (j > 0)
|
if (j > 0)
|
||||||
out << " ";
|
out << " ";
|
||||||
@@ -221,13 +222,13 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
|
|||||||
break;
|
break;
|
||||||
case NdbDictionary::Column::Char:
|
case NdbDictionary::Column::Char:
|
||||||
ndbrecattr_print_string(out,"Char",r.aRef(),r.arraySize());
|
ndbrecattr_print_string(out,"Char",r.aRef(),r.arraySize());
|
||||||
j = r.arraySize();
|
j = length;
|
||||||
break;
|
break;
|
||||||
case NdbDictionary::Column::Varchar:
|
case NdbDictionary::Column::Varchar:
|
||||||
{
|
{
|
||||||
unsigned len = *(const unsigned char*)r.aRef();
|
unsigned len = *(const unsigned char*)r.aRef();
|
||||||
ndbrecattr_print_string(out,"Varchar", r.aRef()+1,len);
|
ndbrecattr_print_string(out,"Varchar", r.aRef()+1,len);
|
||||||
j = r.arraySize();
|
j = length;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NdbDictionary::Column::Float:
|
case NdbDictionary::Column::Float:
|
||||||
@@ -236,6 +237,86 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
|
|||||||
case NdbDictionary::Column::Double:
|
case NdbDictionary::Column::Double:
|
||||||
out << r.double_value();
|
out << r.double_value();
|
||||||
break;
|
break;
|
||||||
|
// for dates cut-and-paste from field.cc
|
||||||
|
case NdbDictionary::Column::Datetime:
|
||||||
|
{
|
||||||
|
ulonglong tmp=r.u_64_value();
|
||||||
|
long part1,part2,part3;
|
||||||
|
part1=(long) (tmp/LL(1000000));
|
||||||
|
part2=(long) (tmp - (ulonglong) part1*LL(1000000));
|
||||||
|
char buf[40];
|
||||||
|
char* pos=(char*) buf+19;
|
||||||
|
*pos--=0;
|
||||||
|
*pos--= (char) ('0'+(char) (part2%10)); part2/=10;
|
||||||
|
*pos--= (char) ('0'+(char) (part2%10)); part3= (int) (part2 / 10);
|
||||||
|
*pos--= ':';
|
||||||
|
*pos--= (char) ('0'+(char) (part3%10)); part3/=10;
|
||||||
|
*pos--= (char) ('0'+(char) (part3%10)); part3/=10;
|
||||||
|
*pos--= ':';
|
||||||
|
*pos--= (char) ('0'+(char) (part3%10)); part3/=10;
|
||||||
|
*pos--= (char) ('0'+(char) part3);
|
||||||
|
*pos--= '/';
|
||||||
|
*pos--= (char) ('0'+(char) (part1%10)); part1/=10;
|
||||||
|
*pos--= (char) ('0'+(char) (part1%10)); part1/=10;
|
||||||
|
*pos--= '-';
|
||||||
|
*pos--= (char) ('0'+(char) (part1%10)); part1/=10;
|
||||||
|
*pos--= (char) ('0'+(char) (part1%10)); part3= (int) (part1/10);
|
||||||
|
*pos--= '-';
|
||||||
|
*pos--= (char) ('0'+(char) (part3%10)); part3/=10;
|
||||||
|
*pos--= (char) ('0'+(char) (part3%10)); part3/=10;
|
||||||
|
*pos--= (char) ('0'+(char) (part3%10)); part3/=10;
|
||||||
|
*pos=(char) ('0'+(char) part3);
|
||||||
|
out << buf;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NdbDictionary::Column::Date:
|
||||||
|
{
|
||||||
|
uint32 tmp=(uint32) uint3korr(r.aRef());
|
||||||
|
int part;
|
||||||
|
char buf[40];
|
||||||
|
char *pos=(char*) buf+10;
|
||||||
|
*pos--=0;
|
||||||
|
part=(int) (tmp & 31);
|
||||||
|
*pos--= (char) ('0'+part%10);
|
||||||
|
*pos--= (char) ('0'+part/10);
|
||||||
|
*pos--= '-';
|
||||||
|
part=(int) (tmp >> 5 & 15);
|
||||||
|
*pos--= (char) ('0'+part%10);
|
||||||
|
*pos--= (char) ('0'+part/10);
|
||||||
|
*pos--= '-';
|
||||||
|
part=(int) (tmp >> 9);
|
||||||
|
*pos--= (char) ('0'+part%10); part/=10;
|
||||||
|
*pos--= (char) ('0'+part%10); part/=10;
|
||||||
|
*pos--= (char) ('0'+part%10); part/=10;
|
||||||
|
*pos= (char) ('0'+part);
|
||||||
|
out << buf;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NdbDictionary::Column::Time:
|
||||||
|
{
|
||||||
|
long tmp=(long) sint3korr(r.aRef());
|
||||||
|
int hour=(uint) (tmp/10000);
|
||||||
|
int minute=(uint) (tmp/100 % 100);
|
||||||
|
int second=(uint) (tmp % 100);
|
||||||
|
char buf[40];
|
||||||
|
sprintf(buf, "%02d:%02d:%02d", hour, minute, second);
|
||||||
|
out << buf;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NdbDictionary::Column::Year:
|
||||||
|
{
|
||||||
|
uint year = 1900 + r.u_char_value();
|
||||||
|
char buf[40];
|
||||||
|
sprintf(buf, "%04d", year);
|
||||||
|
out << buf;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case NdbDictionary::Column::Timestamp:
|
||||||
|
{
|
||||||
|
time_t time = r.u_32_value();
|
||||||
|
out << (uint)time;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case NdbDictionary::Column::Blob:
|
case NdbDictionary::Column::Blob:
|
||||||
{
|
{
|
||||||
const NdbBlob::Head* h = (const NdbBlob::Head*)r.aRef();
|
const NdbBlob::Head* h = (const NdbBlob::Head*)r.aRef();
|
||||||
@@ -244,7 +325,7 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
|
|||||||
unsigned n = r.arraySize() - sizeof(*h);
|
unsigned n = r.arraySize() - sizeof(*h);
|
||||||
for (unsigned k = 0; k < n && k < h->length; k++)
|
for (unsigned k = 0; k < n && k < h->length; k++)
|
||||||
out.print("%02X", (int)p[k]);
|
out.print("%02X", (int)p[k]);
|
||||||
j = r.arraySize();
|
j = length;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NdbDictionary::Column::Text:
|
case NdbDictionary::Column::Text:
|
||||||
@@ -255,26 +336,26 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
|
|||||||
unsigned n = r.arraySize() - sizeof(*h);
|
unsigned n = r.arraySize() - sizeof(*h);
|
||||||
for (unsigned k = 0; k < n && k < h->length; k++)
|
for (unsigned k = 0; k < n && k < h->length; k++)
|
||||||
out.print("%c", (int)p[k]);
|
out.print("%c", (int)p[k]);
|
||||||
j = r.arraySize();
|
j = length;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NdbDictionary::Column::Longvarchar:
|
case NdbDictionary::Column::Longvarchar:
|
||||||
{
|
{
|
||||||
unsigned len = uint2korr(r.aRef());
|
unsigned len = uint2korr(r.aRef());
|
||||||
ndbrecattr_print_string(out,"Longvarchar", r.aRef()+2,len);
|
ndbrecattr_print_string(out,"Longvarchar", r.aRef()+2,len);
|
||||||
j = r.arraySize();
|
j = length;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: /* no print functions for the rest, just print type */
|
default: /* no print functions for the rest, just print type */
|
||||||
out << (int) r.getType();
|
out << (int) r.getType();
|
||||||
j = r.arraySize();
|
j = length;
|
||||||
if (j > 1)
|
if (j > 1)
|
||||||
out << " " << j << " times";
|
out << " " << j << " times";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (r.arraySize() > 1)
|
if (length > 1)
|
||||||
{
|
{
|
||||||
out << "]";
|
out << "]";
|
||||||
}
|
}
|
||||||
|
@@ -575,10 +575,6 @@ convertColumnTypeToAttrType(NdbDictionary::Column::Type _type)
|
|||||||
case NdbDictionary::Column::Binary:
|
case NdbDictionary::Column::Binary:
|
||||||
case NdbDictionary::Column::Varbinary:
|
case NdbDictionary::Column::Varbinary:
|
||||||
return String;
|
return String;
|
||||||
case NdbDictionary::Column::Datetime:
|
|
||||||
case NdbDictionary::Column::Date:
|
|
||||||
case NdbDictionary::Column::Time:
|
|
||||||
case NdbDictionary::Column::Undefined:
|
|
||||||
default:
|
default:
|
||||||
return NoAttrTypeDef;
|
return NoAttrTypeDef;
|
||||||
}
|
}
|
||||||
|
@@ -90,7 +90,7 @@ CLEANFILES = @server_scripts@ \
|
|||||||
fill_help_tables \
|
fill_help_tables \
|
||||||
mysql_create_system_tables
|
mysql_create_system_tables
|
||||||
|
|
||||||
SUPERCLEANFILES = mysqlbug
|
DISTCLEANFILES = mysqlbug
|
||||||
|
|
||||||
# We want the right version and configure comand line in mysqlbug
|
# We want the right version and configure comand line in mysqlbug
|
||||||
mysqlbug: ${top_builddir}/config.status mysqlbug.sh
|
mysqlbug: ${top_builddir}/config.status mysqlbug.sh
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# 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= -I$(top_srcdir)/include -I$(top_srcdir)/extra
|
INCLUDES= -I$(top_srcdir)/include -I$(top_builddir)/include
|
||||||
|
|
||||||
DEFS= -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER
|
DEFS= -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ MYSQLBASEdir= $(prefix)
|
|||||||
INCLUDES = @MT_INCLUDES@ @ZLIB_INCLUDES@ \
|
INCLUDES = @MT_INCLUDES@ @ZLIB_INCLUDES@ \
|
||||||
@bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \
|
@bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \
|
||||||
-I$(top_srcdir)/include -I$(top_srcdir)/regex \
|
-I$(top_srcdir)/include -I$(top_srcdir)/regex \
|
||||||
-I$(srcdir) $(openssl_includes) -I$(top_srcdir)/extra
|
-I$(srcdir) $(openssl_includes) -I$(top_builddir)/include
|
||||||
WRAPLIBS= @WRAPLIBS@
|
WRAPLIBS= @WRAPLIBS@
|
||||||
SUBDIRS = share
|
SUBDIRS = share
|
||||||
libexec_PROGRAMS = mysqld
|
libexec_PROGRAMS = mysqld
|
||||||
@@ -115,6 +115,7 @@ DEFS = -DMYSQL_SERVER \
|
|||||||
# Don't put lex_hash.h in BUILT_SOURCES as this will give infinite recursion
|
# Don't put lex_hash.h in BUILT_SOURCES as this will give infinite recursion
|
||||||
BUILT_SOURCES = sql_yacc.cc sql_yacc.h
|
BUILT_SOURCES = sql_yacc.cc sql_yacc.h
|
||||||
EXTRA_DIST = udf_example.cc $(BUILT_SOURCES)
|
EXTRA_DIST = udf_example.cc $(BUILT_SOURCES)
|
||||||
|
DISTCLEANFILES = lex_hash.h
|
||||||
AM_YFLAGS = -d
|
AM_YFLAGS = -d
|
||||||
|
|
||||||
mysql_tzinfo_to_sql.cc:
|
mysql_tzinfo_to_sql.cc:
|
||||||
@@ -160,8 +161,5 @@ sql_lex.o: lex_hash.h
|
|||||||
udf_example.so: udf_example.cc
|
udf_example.so: udf_example.cc
|
||||||
$(CXXCOMPILE) -shared -o $@ $<
|
$(CXXCOMPILE) -shared -o $@ $<
|
||||||
|
|
||||||
distclean:
|
|
||||||
rm -f lex_hash.h
|
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
%::SCCS/s.%
|
%::SCCS/s.%
|
||||||
|
@@ -5787,11 +5787,12 @@ ha_innobase::store_lock(
|
|||||||
if (lock_type != TL_IGNORE && lock.type == TL_UNLOCK) {
|
if (lock_type != TL_IGNORE && lock.type == TL_UNLOCK) {
|
||||||
|
|
||||||
/* If we are not doing a LOCK TABLE or DISCARD/IMPORT
|
/* If we are not doing a LOCK TABLE or DISCARD/IMPORT
|
||||||
TABLESPACE, then allow multiple writers */
|
TABLESPACE or TRUNCATE TABLE, then allow multiple writers */
|
||||||
|
|
||||||
if ((lock_type >= TL_WRITE_CONCURRENT_INSERT &&
|
if ((lock_type >= TL_WRITE_CONCURRENT_INSERT &&
|
||||||
lock_type <= TL_WRITE) && !thd->in_lock_tables
|
lock_type <= TL_WRITE) && !thd->in_lock_tables
|
||||||
&& !thd->tablespace_op) {
|
&& !thd->tablespace_op
|
||||||
|
&& thd->lex->sql_command != SQLCOM_TRUNCATE) {
|
||||||
|
|
||||||
lock_type = TL_WRITE_ALLOW_WRITE;
|
lock_type = TL_WRITE_ALLOW_WRITE;
|
||||||
}
|
}
|
||||||
|
@@ -3472,14 +3472,14 @@ static int create_ndb_column(NDBCOL &col,
|
|||||||
col.setLength(1);
|
col.setLength(1);
|
||||||
break;
|
break;
|
||||||
// Date types
|
// Date types
|
||||||
case MYSQL_TYPE_TIMESTAMP:
|
|
||||||
col.setType(NDBCOL::Unsigned);
|
|
||||||
col.setLength(1);
|
|
||||||
break;
|
|
||||||
case MYSQL_TYPE_DATETIME:
|
case MYSQL_TYPE_DATETIME:
|
||||||
col.setType(NDBCOL::Datetime);
|
col.setType(NDBCOL::Datetime);
|
||||||
col.setLength(1);
|
col.setLength(1);
|
||||||
break;
|
break;
|
||||||
|
case MYSQL_TYPE_DATE: // ?
|
||||||
|
col.setType(NDBCOL::Char);
|
||||||
|
col.setLength(field->pack_length());
|
||||||
|
break;
|
||||||
case MYSQL_TYPE_NEWDATE:
|
case MYSQL_TYPE_NEWDATE:
|
||||||
col.setType(NDBCOL::Date);
|
col.setType(NDBCOL::Date);
|
||||||
col.setLength(1);
|
col.setLength(1);
|
||||||
@@ -3488,10 +3488,13 @@ static int create_ndb_column(NDBCOL &col,
|
|||||||
col.setType(NDBCOL::Time);
|
col.setType(NDBCOL::Time);
|
||||||
col.setLength(1);
|
col.setLength(1);
|
||||||
break;
|
break;
|
||||||
case MYSQL_TYPE_DATE: // ?
|
case MYSQL_TYPE_YEAR:
|
||||||
case MYSQL_TYPE_YEAR:
|
col.setType(NDBCOL::Year);
|
||||||
col.setType(NDBCOL::Char);
|
col.setLength(1);
|
||||||
col.setLength(field->pack_length());
|
break;
|
||||||
|
case MYSQL_TYPE_TIMESTAMP:
|
||||||
|
col.setType(NDBCOL::Timestamp);
|
||||||
|
col.setLength(1);
|
||||||
break;
|
break;
|
||||||
// Char types
|
// Char types
|
||||||
case MYSQL_TYPE_STRING:
|
case MYSQL_TYPE_STRING:
|
||||||
|
@@ -14,10 +14,11 @@ dist-hook:
|
|||||||
all: english/errmsg.sys
|
all: english/errmsg.sys
|
||||||
|
|
||||||
# Use the english errmsg.sys as a flag that all errmsg.sys needs to be
|
# Use the english errmsg.sys as a flag that all errmsg.sys needs to be
|
||||||
# created. Normally these are created by extra/Makefile.am
|
# created. Normally these are created by extra/Makefile
|
||||||
|
|
||||||
english/errmsg.sys: errmsg.txt
|
english/errmsg.sys: errmsg.txt
|
||||||
$(top_builddir)/extra/comp_err --charset=$(srcdir)/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=errmsg.txt
|
rm $(top_builddir)/include/mysqld_error.h
|
||||||
|
(cd $(top_builddir)/extra && $(MAKE))
|
||||||
|
|
||||||
install-data-local:
|
install-data-local:
|
||||||
for lang in @AVAILABLE_LANGUAGES@; \
|
for lang in @AVAILABLE_LANGUAGES@; \
|
||||||
|
@@ -3191,9 +3191,10 @@ int mysql_schema_table(THD *thd, LEX *lex, TABLE_LIST *table_list)
|
|||||||
views
|
views
|
||||||
working correctly
|
working correctly
|
||||||
*/
|
*/
|
||||||
table->alias_name_used= my_strcasecmp(table_alias_charset,
|
if (table_list->schema_table_name)
|
||||||
table_list->schema_table_name,
|
table->alias_name_used= my_strcasecmp(table_alias_charset,
|
||||||
table_list->alias);
|
table_list->schema_table_name,
|
||||||
|
table_list->alias);
|
||||||
table_list->table_name= (char*) table->s->table_name;
|
table_list->table_name= (char*) table->s->table_name;
|
||||||
table_list->table= table;
|
table_list->table= table;
|
||||||
table->next= thd->derived_tables;
|
table->next= thd->derived_tables;
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
# Process this file with automake to create Makefile.in
|
# Process this file with automake to create Makefile.in
|
||||||
|
|
||||||
INCLUDES=@MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) \
|
INCLUDES=@MT_INCLUDES@ -I$(top_srcdir)/include $(openssl_includes) \
|
||||||
-I$(top_srcdir)/extra
|
-I$(top_builddir)/include
|
||||||
LDADD= @CLIENT_EXTRA_LDFLAGS@ @openssl_libs@ \
|
LDADD= @CLIENT_EXTRA_LDFLAGS@ @openssl_libs@ \
|
||||||
$(top_builddir)/libmysql_r/libmysqlclient_r.la @ZLIB_LIBS@
|
$(top_builddir)/libmysql_r/libmysqlclient_r.la @ZLIB_LIBS@
|
||||||
bin_PROGRAMS= mysqlmanager
|
bin_PROGRAMS= mysqlmanager
|
||||||
|
Reference in New Issue
Block a user