Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
25d776a8
Commit
25d776a8
authored
Jan 19, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-4.1
into hundin.mysql.fi:/home/jan/mysql-4.1
parents
a46c9b23
49ab428c
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
208 additions
and
97 deletions
+208
-97
client/Makefile.am
client/Makefile.am
+4
-14
configure.in
configure.in
+6
-3
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+8
-1
mysql-test/ndb/ndbcluster.sh
mysql-test/ndb/ndbcluster.sh
+11
-2
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+4
-0
mysql-test/r/analyse.result
mysql-test/r/analyse.result
+18
-18
mysql-test/r/case.result
mysql-test/r/case.result
+6
-6
mysql-test/r/metadata.result
mysql-test/r/metadata.result
+3
-3
mysql-test/r/ps_1general.result
mysql-test/r/ps_1general.result
+6
-6
mysql-test/r/ps_2myisam.result
mysql-test/r/ps_2myisam.result
+3
-3
mysql-test/r/ps_3innodb.result
mysql-test/r/ps_3innodb.result
+3
-3
mysql-test/r/ps_4heap.result
mysql-test/r/ps_4heap.result
+3
-3
mysql-test/r/ps_5merge.result
mysql-test/r/ps_5merge.result
+6
-6
mysql-test/r/ps_6bdb.result
mysql-test/r/ps_6bdb.result
+3
-3
mysql-test/r/ps_7ndb.result
mysql-test/r/ps_7ndb.result
+3
-3
mysql-test/r/type_float.result
mysql-test/r/type_float.result
+9
-0
mysql-test/r/union.result
mysql-test/r/union.result
+17
-1
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+11
-0
mysql-test/t/type_float.test
mysql-test/t/type_float.test
+7
-0
mysql-test/t/union.test
mysql-test/t/union.test
+4
-0
ndb/src/common/portlib/NdbThread.c
ndb/src/common/portlib/NdbThread.c
+20
-2
ndb/src/common/transporter/TransporterRegistry.cpp
ndb/src/common/transporter/TransporterRegistry.cpp
+14
-2
regex/Makefile.am
regex/Makefile.am
+1
-2
sql/field.h
sql/field.h
+7
-7
sql/field_conv.cc
sql/field_conv.cc
+1
-0
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+2
-2
sql/item.cc
sql/item.cc
+1
-1
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+3
-0
sql/slave.cc
sql/slave.cc
+5
-0
sql/sql_union.cc
sql/sql_union.cc
+7
-4
sql/table.cc
sql/table.cc
+12
-1
strings/Makefile.am
strings/Makefile.am
+0
-1
No files found.
client/Makefile.am
View file @
25d776a8
...
@@ -20,9 +20,8 @@
...
@@ -20,9 +20,8 @@
INCLUDES
=
-I
$(top_srcdir)
/include
-I
$(top_srcdir)
/regex
\
INCLUDES
=
-I
$(top_srcdir)
/include
-I
$(top_srcdir)
/regex
\
$(openssl_includes)
$(openssl_includes)
LIBS
=
@CLIENT_LIBS@
LIBS
=
@CLIENT_LIBS@
DEPLIB
=
../libmysql/libmysqlclient.la
LDADD
=
@CLIENT_EXTRA_LDFLAGS@
\
REGEXLIB
=
../regex/libregex.a
$(top_builddir)
/libmysql/libmysqlclient.la
LDADD
=
@CLIENT_EXTRA_LDFLAGS@
$(DEPLIB)
bin_PROGRAMS
=
mysql mysqladmin mysqlcheck mysqlshow
\
bin_PROGRAMS
=
mysql mysqladmin mysqlcheck mysqlshow
\
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
noinst_HEADERS
=
sql_string.h completion_hash.h my_readline.h
\
noinst_HEADERS
=
sql_string.h completion_hash.h my_readline.h
\
...
@@ -31,19 +30,10 @@ mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
...
@@ -31,19 +30,10 @@ mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
mysqladmin_SOURCES
=
mysqladmin.cc
mysqladmin_SOURCES
=
mysqladmin.cc
mysql_LDADD
=
@readline_link@ @TERMCAP_LIB@
$(LDADD)
$(CXXLDFLAGS)
mysql_LDADD
=
@readline_link@ @TERMCAP_LIB@
$(LDADD)
$(CXXLDFLAGS)
mysqlbinlog_LDADD
=
$(LDADD)
$(CXXLDFLAGS)
mysqlbinlog_LDADD
=
$(LDADD)
$(CXXLDFLAGS)
mysql_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
$(DEPLIB)
mysqltest_SOURCES
=
mysqltest.c
$(top_srcdir)
/mysys/my_getsystime.c
mysqladmin_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
$(DEPLIB)
mysqltest_LDADD
=
$(top_builddir)
/regex/libregex.a
$(LDADD)
mysqlcheck_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
$(DEPLIB)
mysqlshow_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
$(DEPLIB)
mysqldump_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
$(DEPLIB)
mysqlimport_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
$(DEPLIB)
mysqltest_SOURCES
=
mysqltest.c ../mysys/my_getsystime.c
mysqltest_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
$(REGEXLIB)
$(DEPLIB)
mysqltest_LDADD
=
$(REGEXLIB)
$(LDADD)
mysqlbinlog_SOURCES
=
mysqlbinlog.cc ../mysys/mf_tempdir.c
mysqlbinlog_SOURCES
=
mysqlbinlog.cc ../mysys/mf_tempdir.c
mysqlbinlog_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
$(DEPLIB)
mysqlmanagerc_SOURCES
=
mysqlmanagerc.c
mysqlmanagerc_SOURCES
=
mysqlmanagerc.c
mysqlmanagerc_DEPENDENCIES
=
$(LIBRARIES)
$(pkglib_LTLIBRARIES)
$(DEPLIB)
sql_src
=
log_event.h log_event.cc
sql_src
=
log_event.h log_event.cc
# Fix for mit-threads
# Fix for mit-threads
...
...
configure.in
View file @
25d776a8
...
@@ -1924,7 +1924,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
...
@@ -1924,7 +1924,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
pthread_key_delete pthread_rwlock_rdlock pthread_setprio
\
pthread_key_delete pthread_rwlock_rdlock pthread_setprio
\
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink
\
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink
\
realpath rename rint rwlock_init setupterm
\
realpath rename rint rwlock_init setupterm
\
shmget shmat shmdt shmctl sigaction
\
shmget shmat shmdt shmctl sigaction
sigemptyset sigaddset
\
sighold sigset sigthreadmask
\
sighold sigset sigthreadmask
\
snprintf socket stpcpy strcasecmp strerror strnlen strpbrk strstr strtol
\
snprintf socket stpcpy strcasecmp strerror strnlen strpbrk strstr strtol
\
strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr)
strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr)
...
@@ -3019,7 +3019,7 @@ AC_SUBST(server_scripts)
...
@@ -3019,7 +3019,7 @@ AC_SUBST(server_scripts)
sql_union_dirs
=
"
$sql_server_dirs
"
sql_union_dirs
=
"
$sql_server_dirs
"
for
DIR
in
$sql_client_dirs
for
DIR
in
$sql_client_dirs
do
do
if
echo
$sql_union_dirs
|
grep
"
$DIR
"
>
/dev/null
if
echo
"
$sql_union_dirs
"
|
grep
"
$DIR
"
>
/dev/null
then
then
:
# already present, skip
:
# already present, skip
else
else
...
@@ -3098,7 +3098,10 @@ if test "$ac_cv_func_shmget" = "yes" &&
...
@@ -3098,7 +3098,10 @@ if test "$ac_cv_func_shmget" = "yes" &&
test
"
$ac_cv_func_shmat
"
=
"yes"
&&
test
"
$ac_cv_func_shmat
"
=
"yes"
&&
test
"
$ac_cv_func_shmdt
"
=
"yes"
&&
test
"
$ac_cv_func_shmdt
"
=
"yes"
&&
test
"
$ac_cv_func_shmctl
"
=
"yes"
&&
test
"
$ac_cv_func_shmctl
"
=
"yes"
&&
test
"
$ac_cv_func_sigaction
"
=
"yes"
test
"
$ac_cv_func_sigaction
"
=
"yes"
&&
test
"
$ac_cv_func_sigemptyset
"
=
"yes"
&&
test
"
$ac_cv_func_sigaddset
"
=
"yes"
&&
test
"
$ac_cv_func_pthread_sigmask
"
=
"yes"
then
then
AC_DEFINE
([
NDB_SHM_TRANSPORTER],
[
1],
AC_DEFINE
([
NDB_SHM_TRANSPORTER],
[
1],
[
Including Ndb Cluster DB shared memory transporter]
)
[
Including Ndb Cluster DB shared memory transporter]
)
...
...
mysql-test/mysql-test-run.sh
View file @
25d776a8
...
@@ -241,6 +241,9 @@ USE_EMBEDDED_SERVER=""
...
@@ -241,6 +241,9 @@ USE_EMBEDDED_SERVER=""
RESULT_EXT
=
""
RESULT_EXT
=
""
TEST_MODE
=
"default"
TEST_MODE
=
"default"
NDB_MGMD_EXTRA_OPTS
=
NDBD_EXTRA_OPTS
=
while
test
$#
-gt
0
;
do
while
test
$#
-gt
0
;
do
case
"
$1
"
in
case
"
$1
"
in
--embedded-server
)
USE_EMBEDDED_SERVER
=
1
USE_MANAGER
=
0
NO_SLAVE
=
1
;
\
--embedded-server
)
USE_EMBEDDED_SERVER
=
1
USE_MANAGER
=
0
NO_SLAVE
=
1
;
\
...
@@ -261,6 +264,10 @@ while test $# -gt 0; do
...
@@ -261,6 +264,10 @@ while test $# -gt 0; do
--ndb-connectstring
=
*
)
--ndb-connectstring
=
*
)
USE_NDBCLUSTER
=
"--ndbcluster"
;
USE_NDBCLUSTER
=
"--ndbcluster"
;
USE_RUNNING_NDBCLUSTER
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--ndb-connectstring=;;"
`
;;
USE_RUNNING_NDBCLUSTER
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--ndb-connectstring=;;"
`
;;
--ndb_mgmd-extra-opts
=
*
)
NDB_MGMD_EXTRA_OPTS
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--ndb_mgmd-extra-opts=;;"
`
;;
--ndbd-extra-opts
=
*
)
NDBD_EXTRA_OPTS
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--ndbd-extra-opts=;;"
`
;;
--tmpdir
=
*
)
MYSQL_TMP_DIR
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--tmpdir=;;"
`
;;
--tmpdir
=
*
)
MYSQL_TMP_DIR
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--tmpdir=;;"
`
;;
--local-master
)
--local-master
)
MASTER_MYPORT
=
3306
;
MASTER_MYPORT
=
3306
;
...
@@ -460,7 +467,7 @@ SMALL_SERVER="--key_buffer_size=1M --sort_buffer=256K --max_heap_table_size=1M"
...
@@ -460,7 +467,7 @@ SMALL_SERVER="--key_buffer_size=1M --sort_buffer=256K --max_heap_table_size=1M"
export
MASTER_MYPORT MASTER_MYPORT1 SLAVE_MYPORT MYSQL_TCP_PORT MASTER_MYSOCK MASTER_MYSOCK1
export
MASTER_MYPORT MASTER_MYPORT1 SLAVE_MYPORT MYSQL_TCP_PORT MASTER_MYSOCK MASTER_MYSOCK1
NDBCLUSTER_BASE_PORT
=
`
expr
$NDBCLUSTER_PORT
+ 2
`
NDBCLUSTER_BASE_PORT
=
`
expr
$NDBCLUSTER_PORT
+ 2
`
NDBCLUSTER_OPTS
=
"--port=
$NDBCLUSTER_PORT
--port-base=
$NDBCLUSTER_BASE_PORT
--data-dir=
$MYSQL_TEST_DIR
/var"
NDBCLUSTER_OPTS
=
"--port=
$NDBCLUSTER_PORT
--port-base=
$NDBCLUSTER_BASE_PORT
--data-dir=
$MYSQL_TEST_DIR
/var
--ndb_mgmd-extra-opts=
\"
$NDB_MGMD_EXTRA_OPTS
\"
--ndbd-extra-opts=
\"
$NDBD_EXTRA_OPTS
\"
"
if
[
x
$SOURCE_DIST
=
x1
]
;
then
if
[
x
$SOURCE_DIST
=
x1
]
;
then
MY_BASEDIR
=
$MYSQL_TEST_DIR
MY_BASEDIR
=
$MYSQL_TEST_DIR
...
...
mysql-test/ndb/ndbcluster.sh
View file @
25d776a8
...
@@ -58,6 +58,9 @@ ndb_con_op=105000
...
@@ -58,6 +58,9 @@ ndb_con_op=105000
ndb_dmem
=
80M
ndb_dmem
=
80M
ndb_imem
=
24M
ndb_imem
=
24M
NDB_MGMD_EXTRA_OPTS
=
NDBD_EXTRA_OPTS
=
while
test
$#
-gt
0
;
do
while
test
$#
-gt
0
;
do
case
"
$1
"
in
case
"
$1
"
in
--test
)
--test
)
...
@@ -94,6 +97,12 @@ while test $# -gt 0; do
...
@@ -94,6 +97,12 @@ while test $# -gt 0; do
--port-base
=
*
)
--port-base
=
*
)
port_base
=
`
echo
"
$1
"
|
sed
-e
"s;--port-base=;;"
`
port_base
=
`
echo
"
$1
"
|
sed
-e
"s;--port-base=;;"
`
;;
;;
--ndb_mgmd-extra-opts
=
*
)
NDB_MGMD_EXTRA_OPTS
=
`
echo
"
$1
"
|
sed
-e
"s;--ndb_mgmd-extra-opts=;;"
`
;;
--ndbd-extra-opts
=
*
)
NDBD_EXTRA_OPTS
=
`
echo
"
$1
"
|
sed
-e
"s;--ndbd-extra-opts=;;"
`
;;
--
)
shift
;
break
;;
--
)
shift
;
break
;;
--
*
)
$ECHO
"Unrecognized option:
$1
"
;
exit
1
;;
--
*
)
$ECHO
"Unrecognized option:
$1
"
;
exit
1
;;
*
)
break
;;
*
)
break
;;
...
@@ -122,8 +131,8 @@ if [ ! -x "$exec_waiter" ]; then
...
@@ -122,8 +131,8 @@ if [ ! -x "$exec_waiter" ]; then
fi
fi
exec_mgmtclient
=
"
$exec_mgmtclient
--no-defaults"
exec_mgmtclient
=
"
$exec_mgmtclient
--no-defaults"
exec_mgmtsrvr
=
"
$exec_mgmtsrvr
--no-defaults"
exec_mgmtsrvr
=
"
$exec_mgmtsrvr
--no-defaults
$NDB_MGMD_EXTRA_OPTS
"
exec_ndb
=
"
$exec_ndb
--no-defaults"
exec_ndb
=
"
$exec_ndb
--no-defaults
$NDBD_EXTRA_OPTS
"
exec_waiter
=
"
$exec_waiter
--no-defaults"
exec_waiter
=
"
$exec_waiter
--no-defaults"
ndb_host
=
"localhost"
ndb_host
=
"localhost"
...
...
mysql-test/r/alter_table.result
View file @
25d776a8
...
@@ -493,3 +493,7 @@ select hex(a) from t1;
...
@@ -493,3 +493,7 @@ select hex(a) from t1;
hex(a)
hex(a)
F2E5F1F2
F2E5F1F2
drop table t1;
drop table t1;
create table t1 ( a timestamp );
alter table t1 add unique ( a(1) );
ERROR HY000: Incorrect sub part key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique sub keys
drop table t1;
mysql-test/r/analyse.result
View file @
25d776a8
...
@@ -36,16 +36,16 @@ create table t2 select * from t1 where 0=1 procedure analyse();
...
@@ -36,16 +36,16 @@ create table t2 select * from t1 where 0=1 procedure analyse();
show create table t2;
show create table t2;
Table Create Table
Table Create Table
t2 CREATE TABLE `t2` (
t2 CREATE TABLE `t2` (
`Field_name`
char
(255) NOT NULL default '',
`Field_name`
binary
(255) NOT NULL default '',
`Min_value`
char
(255) default NULL,
`Min_value`
binary
(255) default NULL,
`Max_value`
char
(255) default NULL,
`Max_value`
binary
(255) default NULL,
`Min_length` bigint(11) NOT NULL default '0',
`Min_length` bigint(11) NOT NULL default '0',
`Max_length` bigint(11) NOT NULL default '0',
`Max_length` bigint(11) NOT NULL default '0',
`Empties_or_zeros` bigint(11) NOT NULL default '0',
`Empties_or_zeros` bigint(11) NOT NULL default '0',
`Nulls` bigint(11) NOT NULL default '0',
`Nulls` bigint(11) NOT NULL default '0',
`Avg_value_or_avg_length`
char
(255) NOT NULL default '',
`Avg_value_or_avg_length`
binary
(255) NOT NULL default '',
`Std`
char
(255) default NULL,
`Std`
binary
(255) default NULL,
`Optimal_fieldtype`
char
(64) NOT NULL default ''
`Optimal_fieldtype`
binary
(64) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1 where 0=1 procedure analyse();
select * from t1 where 0=1 procedure analyse();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
...
@@ -55,16 +55,16 @@ create table t2 select * from t1 where 0=1 procedure analyse();
...
@@ -55,16 +55,16 @@ create table t2 select * from t1 where 0=1 procedure analyse();
show create table t2;
show create table t2;
Table Create Table
Table Create Table
t2 CREATE TABLE `t2` (
t2 CREATE TABLE `t2` (
`Field_name`
char
(255) NOT NULL default '',
`Field_name`
binary
(255) NOT NULL default '',
`Min_value`
char
(255) default NULL,
`Min_value`
binary
(255) default NULL,
`Max_value`
char
(255) default NULL,
`Max_value`
binary
(255) default NULL,
`Min_length` bigint(11) NOT NULL default '0',
`Min_length` bigint(11) NOT NULL default '0',
`Max_length` bigint(11) NOT NULL default '0',
`Max_length` bigint(11) NOT NULL default '0',
`Empties_or_zeros` bigint(11) NOT NULL default '0',
`Empties_or_zeros` bigint(11) NOT NULL default '0',
`Nulls` bigint(11) NOT NULL default '0',
`Nulls` bigint(11) NOT NULL default '0',
`Avg_value_or_avg_length`
char
(255) NOT NULL default '',
`Avg_value_or_avg_length`
binary
(255) NOT NULL default '',
`Std`
char
(255) default NULL,
`Std`
binary
(255) default NULL,
`Optimal_fieldtype`
char
(64) NOT NULL default ''
`Optimal_fieldtype`
binary
(64) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t2;
select * from t2;
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
...
@@ -78,16 +78,16 @@ create table t2 select * from t1 where 0=1 procedure analyse();
...
@@ -78,16 +78,16 @@ create table t2 select * from t1 where 0=1 procedure analyse();
show create table t2;
show create table t2;
Table Create Table
Table Create Table
t2 CREATE TABLE `t2` (
t2 CREATE TABLE `t2` (
`Field_name`
char
(255) NOT NULL default '',
`Field_name`
binary
(255) NOT NULL default '',
`Min_value`
char
(255) default NULL,
`Min_value`
binary
(255) default NULL,
`Max_value`
char
(255) default NULL,
`Max_value`
binary
(255) default NULL,
`Min_length` bigint(11) NOT NULL default '0',
`Min_length` bigint(11) NOT NULL default '0',
`Max_length` bigint(11) NOT NULL default '0',
`Max_length` bigint(11) NOT NULL default '0',
`Empties_or_zeros` bigint(11) NOT NULL default '0',
`Empties_or_zeros` bigint(11) NOT NULL default '0',
`Nulls` bigint(11) NOT NULL default '0',
`Nulls` bigint(11) NOT NULL default '0',
`Avg_value_or_avg_length`
char
(255) NOT NULL default '',
`Avg_value_or_avg_length`
binary
(255) NOT NULL default '',
`Std`
char
(255) default NULL,
`Std`
binary
(255) default NULL,
`Optimal_fieldtype`
char
(64) NOT NULL default ''
`Optimal_fieldtype`
binary
(64) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t2;
select * from t2;
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
...
...
mysql-test/r/case.result
View file @
25d776a8
...
@@ -98,10 +98,10 @@ Table Create Table
...
@@ -98,10 +98,10 @@ Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`c1` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
`c1` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
`c2` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
`c2` char(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
`c3`
char
(1) NOT NULL default '',
`c3`
binary
(1) NOT NULL default '',
`c4`
char
(1) NOT NULL default '',
`c4`
binary
(1) NOT NULL default '',
`c5`
char
(3) NOT NULL default '',
`c5`
binary
(3) NOT NULL default '',
`c6`
char
(3) NOT NULL default '',
`c6`
binary
(3) NOT NULL default '',
`c7` double(3,1) NOT NULL default '0.0',
`c7` double(3,1) NOT NULL default '0.0',
`c8` double(3,1) NOT NULL default '0.0',
`c8` double(3,1) NOT NULL default '0.0',
`c9` double(3,1) default NULL
`c9` double(3,1) default NULL
...
@@ -149,8 +149,8 @@ t1 CREATE TABLE `t1` (
...
@@ -149,8 +149,8 @@ t1 CREATE TABLE `t1` (
`COALESCE(1.0)` double(3,1) NOT NULL default '0.0',
`COALESCE(1.0)` double(3,1) NOT NULL default '0.0',
`COALESCE('a')` char(1) NOT NULL default '',
`COALESCE('a')` char(1) NOT NULL default '',
`COALESCE(1,1.0)` double(3,1) NOT NULL default '0.0',
`COALESCE(1,1.0)` double(3,1) NOT NULL default '0.0',
`COALESCE(1,'1')`
char
(1) NOT NULL default '',
`COALESCE(1,'1')`
binary
(1) NOT NULL default '',
`COALESCE(1.1,'1')`
char
(3) NOT NULL default '',
`COALESCE(1.1,'1')`
binary
(3) NOT NULL default '',
`COALESCE('a' COLLATE latin1_bin,'b')` char(1) character set latin1 collate latin1_bin NOT NULL default ''
`COALESCE('a' COLLATE latin1_bin,'b')` char(1) character set latin1 collate latin1_bin NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
DROP TABLE t1;
mysql-test/r/metadata.result
View file @
25d776a8
drop table if exists t1,t2;
drop table if exists t1,t2;
select 1, 1.0, -1, "hello", NULL;
select 1, 1.0, -1, "hello", NULL;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def 1 8 1 1 N 32
769 0 8
def 1 8 1 1 N 32
897 0 63
def 1.0 5 3 3 N 32
769 1 8
def 1.0 5 3 3 N 32
897 1 63
def -1 8 2 2 N 32
769 0 8
def -1 8 2 2 N 32
897 0 63
def hello 254 5 5 N 1 31 8
def hello 254 5 5 N 1 31 8
def NULL 6 0 0 Y 32896 0 63
def NULL 6 0 0 Y 32896 0 63
1 1.0 -1 hello NULL
1 1.0 -1 hello NULL
...
...
mysql-test/r/ps_1general.result
View file @
25d776a8
...
@@ -468,15 +468,15 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
...
@@ -468,15 +468,15 @@ ERROR HY000: This command is not supported in the prepared statement protocol ye
prepare stmt1 from ' explain select a from t1 order by b ';
prepare stmt1 from ' explain select a from t1 order by b ';
execute stmt1;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 N 32
801 0 8
def id 8 3 1 N 32
929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 N 1 31 8
def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8
def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32
800 0 8
def key_len 8 3 0 Y 32
928 0 63
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32
801 0 8
def rows 8 10 1 N 32
929 0 63
def Extra 253 255 14 N 1 31 8
def Extra 253 255 14 N 1 31 8
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 4 Using filesort
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort
...
@@ -484,15 +484,15 @@ SET @arg00=1 ;
...
@@ -484,15 +484,15 @@ SET @arg00=1 ;
prepare stmt1 from ' explain select a from t1 where a > ? order by b ';
prepare stmt1 from ' explain select a from t1 where a > ? order by b ';
execute stmt1 using @arg00;
execute stmt1 using @arg00;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 N 32
801 0 8
def id 8 3 1 N 32
929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 N 1 31 8
def table 253 64 2 N 1 31 8
def type 253 10 5 N 1 31 8
def type 253 10 5 N 1 31 8
def possible_keys 253 4096 7 Y 0 31 8
def possible_keys 253 4096 7 Y 0 31 8
def key 253 64 7 Y 0 31 8
def key 253 64 7 Y 0 31 8
def key_len 8 3 1 Y 32
800 0 8
def key_len 8 3 1 Y 32
928 0 63
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32
801 0 8
def rows 8 10 1 N 32
929 0 63
def Extra 253 255 27 N 1 31 8
def Extra 253 255 27 N 1 31 8
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 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
1 SIMPLE t1 range PRIMARY PRIMARY 4 NULL 3 Using where; Using filesort
...
...
mysql-test/r/ps_2myisam.result
View file @
25d776a8
...
@@ -1145,15 +1145,15 @@ test_sequence
...
@@ -1145,15 +1145,15 @@ test_sequence
prepare stmt1 from ' explain select * from t9 ' ;
prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 N 32
801 0 8
def id 8 3 1 N 32
929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 N 1 31 8
def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8
def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32
800 0 8
def key_len 8 3 0 Y 32
928 0 63
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32
801 0 8
def rows 8 10 1 N 32
929 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
...
...
mysql-test/r/ps_3innodb.result
View file @
25d776a8
...
@@ -1145,15 +1145,15 @@ test_sequence
...
@@ -1145,15 +1145,15 @@ test_sequence
prepare stmt1 from ' explain select * from t9 ' ;
prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 N 32
801 0 8
def id 8 3 1 N 32
929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 N 1 31 8
def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8
def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32
800 0 8
def key_len 8 3 0 Y 32
928 0 63
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32
801 0 8
def rows 8 10 1 N 32
929 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
...
...
mysql-test/r/ps_4heap.result
View file @
25d776a8
...
@@ -1146,15 +1146,15 @@ test_sequence
...
@@ -1146,15 +1146,15 @@ test_sequence
prepare stmt1 from ' explain select * from t9 ' ;
prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 N 32
801 0 8
def id 8 3 1 N 32
929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 N 1 31 8
def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8
def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32
800 0 8
def key_len 8 3 0 Y 32
928 0 63
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32
801 0 8
def rows 8 10 1 N 32
929 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
...
...
mysql-test/r/ps_5merge.result
View file @
25d776a8
...
@@ -1188,15 +1188,15 @@ test_sequence
...
@@ -1188,15 +1188,15 @@ test_sequence
prepare stmt1 from ' explain select * from t9 ' ;
prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 N 32
801 0 8
def id 8 3 1 N 32
929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 N 1 31 8
def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8
def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32
800 0 8
def key_len 8 3 0 Y 32
928 0 63
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32
801 0 8
def rows 8 10 1 N 32
929 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
...
@@ -4198,15 +4198,15 @@ test_sequence
...
@@ -4198,15 +4198,15 @@ test_sequence
prepare stmt1 from ' explain select * from t9 ' ;
prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 N 32
801 0 8
def id 8 3 1 N 32
929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 N 1 31 8
def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8
def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32
800 0 8
def key_len 8 3 0 Y 32
928 0 63
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32
801 0 8
def rows 8 10 1 N 32
929 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
...
...
mysql-test/r/ps_6bdb.result
View file @
25d776a8
...
@@ -1145,15 +1145,15 @@ test_sequence
...
@@ -1145,15 +1145,15 @@ test_sequence
prepare stmt1 from ' explain select * from t9 ' ;
prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 N 32
801 0 8
def id 8 3 1 N 32
929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 N 1 31 8
def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8
def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32
800 0 8
def key_len 8 3 0 Y 32
928 0 63
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32
801 0 8
def rows 8 10 1 N 32
929 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 3
1 SIMPLE t9 ALL NULL NULL NULL NULL 3
...
...
mysql-test/r/ps_7ndb.result
View file @
25d776a8
...
@@ -1145,15 +1145,15 @@ test_sequence
...
@@ -1145,15 +1145,15 @@ test_sequence
prepare stmt1 from ' explain select * from t9 ' ;
prepare stmt1 from ' explain select * from t9 ' ;
execute stmt1;
execute stmt1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def id 8 3 1 N 32
801 0 8
def id 8 3 1 N 32
929 0 63
def select_type 253 19 6 N 1 31 8
def select_type 253 19 6 N 1 31 8
def table 253 64 2 N 1 31 8
def table 253 64 2 N 1 31 8
def type 253 10 3 N 1 31 8
def type 253 10 3 N 1 31 8
def possible_keys 253 4096 0 Y 0 31 8
def possible_keys 253 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 8 3 0 Y 32
800 0 8
def key_len 8 3 0 Y 32
928 0 63
def ref 253 1024 0 Y 0 31 8
def ref 253 1024 0 Y 0 31 8
def rows 8 10 1 N 32
801 0 8
def rows 8 10 1 N 32
929 0 63
def Extra 253 255 0 N 1 31 8
def Extra 253 255 0 N 1 31 8
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 t9 ALL NULL NULL NULL NULL 2
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
...
...
mysql-test/r/type_float.result
View file @
25d776a8
...
@@ -143,6 +143,15 @@ drop table t1;
...
@@ -143,6 +143,15 @@ drop table t1;
create table t1 (f float(54));
create table t1 (f float(54));
ERROR 42000: Incorrect column specifier for column 'f'
ERROR 42000: Incorrect column specifier for column 'f'
drop table if exists t1;
drop table if exists t1;
create table t1 (d1 double, d2 double unsigned);
insert into t1 set d1 = -1.0;
update t1 set d2 = d1;
Warnings:
Warning 1264 Data truncated; out of range for column 'd2' at row 1
select * from t1;
d1 d2
-1 0
drop table t1;
create table t1 (f float(4,3));
create table t1 (f float(4,3));
insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
Warnings:
Warnings:
...
...
mysql-test/r/union.result
View file @
25d776a8
...
@@ -554,7 +554,7 @@ aa
...
@@ -554,7 +554,7 @@ aa
show create table t1;
show create table t1;
Table Create Table
Table Create Table
t1 CREATE TABLE `t1` (
t1 CREATE TABLE `t1` (
`a`
char
(20) NOT NULL default ''
`a`
binary
(20) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
drop table t1;
create table t1 SELECT 12 as a UNION select 12.2 as a;
create table t1 SELECT 12 as a UNION select 12.2 as a;
...
@@ -872,6 +872,22 @@ count(*)
...
@@ -872,6 +872,22 @@ count(*)
show status like 'Slow_queries';
show status like 'Slow_queries';
Variable_name Value
Variable_name Value
Slow_queries 3
Slow_queries 3
flush status;
select a from t1 where b not in (1,2,3) union select a from t1 where b not in (4,5,6);
a
4
5
3
6
7
8
9
10
1
2
show status like 'Slow_queries';
Variable_name Value
Slow_queries 1
drop table t1;
drop table t1;
create table t1 ( RID int(11) not null default '0', IID int(11) not null default '0', nada varchar(50) not null,NAME varchar(50) not null,PHONE varchar(50) not null) engine=MyISAM;
create table t1 ( RID int(11) not null default '0', IID int(11) not null default '0', nada varchar(50) not null,NAME varchar(50) not null,PHONE varchar(50) not null) engine=MyISAM;
insert into t1 ( RID,IID,nada,NAME,PHONE) values (1, 1, 'main', 'a', '111'), (2, 1, 'main', 'b', '222'), (3, 1, 'main', 'c', '333'), (4, 1, 'main', 'd', '444'), (5, 1, 'main', 'e', '555'), (6, 2, 'main', 'c', '333'), (7, 2, 'main', 'd', '454'), (8, 2, 'main', 'e', '555'), (9, 2, 'main', 'f', '666'), (10, 2, 'main', 'g', '777');
insert into t1 ( RID,IID,nada,NAME,PHONE) values (1, 1, 'main', 'a', '111'), (2, 1, 'main', 'b', '222'), (3, 1, 'main', 'c', '333'), (4, 1, 'main', 'd', '444'), (5, 1, 'main', 'e', '555'), (6, 2, 'main', 'c', '333'), (7, 2, 'main', 'd', '454'), (8, 2, 'main', 'e', '555'), (9, 2, 'main', 'f', '666'), (10, 2, 'main', 'g', '777');
...
...
mysql-test/t/alter_table.test
View file @
25d776a8
...
@@ -336,3 +336,14 @@ select hex(a) from t1;
...
@@ -336,3 +336,14 @@ select hex(a) from t1;
alter
table
t1
convert
to
character
set
cp1251
;
alter
table
t1
convert
to
character
set
cp1251
;
select
hex
(
a
)
from
t1
;
select
hex
(
a
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
# Test for bug #7884 "Able to add invalid unique index on TIMESTAMP prefix"
# MySQL should not think that packed field with non-zero decimals is
# geometry field and allow to create prefix index which is
# shorter than packed field length.
#
create
table
t1
(
a
timestamp
);
--
error
1089
alter
table
t1
add
unique
(
a
(
1
)
);
drop
table
t1
;
mysql-test/t/type_float.test
View file @
25d776a8
...
@@ -93,6 +93,13 @@ create table t1 (f float(54)); # Should give an error
...
@@ -93,6 +93,13 @@ create table t1 (f float(54)); # Should give an error
drop
table
if
exists
t1
;
drop
table
if
exists
t1
;
--
enable_warnings
--
enable_warnings
# Don't allow 'double unsigned' to be set to a negative value (Bug #7700)
create
table
t1
(
d1
double
,
d2
double
unsigned
);
insert
into
t1
set
d1
=
-
1.0
;
update
t1
set
d2
=
d1
;
select
*
from
t1
;
drop
table
t1
;
# Ensure that maximum values as the result of number of decimals
# Ensure that maximum values as the result of number of decimals
# being specified in table schema are enforced (Bug #7361)
# being specified in table schema are enforced (Bug #7361)
create
table
t1
(
f
float
(
4
,
3
));
create
table
t1
(
f
float
(
4
,
3
));
...
...
mysql-test/t/union.test
View file @
25d776a8
...
@@ -481,6 +481,10 @@ select count(*) from t1 where b=13 union select count(*) from t1 where a=7;
...
@@ -481,6 +481,10 @@ select count(*) from t1 where b=13 union select count(*) from t1 where a=7;
show
status
like
'Slow_queries'
;
show
status
like
'Slow_queries'
;
select
count
(
*
)
from
t1
where
a
=
7
union
select
count
(
*
)
from
t1
where
b
=
13
;
select
count
(
*
)
from
t1
where
a
=
7
union
select
count
(
*
)
from
t1
where
b
=
13
;
show
status
like
'Slow_queries'
;
show
status
like
'Slow_queries'
;
# additional test for examined rows
flush
status
;
select
a
from
t1
where
b
not
in
(
1
,
2
,
3
)
union
select
a
from
t1
where
b
not
in
(
4
,
5
,
6
);
show
status
like
'Slow_queries'
;
drop
table
t1
;
drop
table
t1
;
#
#
...
...
ndb/src/common/portlib/NdbThread.c
View file @
25d776a8
...
@@ -28,8 +28,24 @@ struct NdbThread
...
@@ -28,8 +28,24 @@ struct NdbThread
{
{
pthread_t
thread
;
pthread_t
thread
;
char
thread_name
[
MAX_THREAD_NAME
];
char
thread_name
[
MAX_THREAD_NAME
];
NDB_THREAD_FUNC
*
func
;
void
*
object
;
};
};
static
void
*
ndb_thread_wrapper
(
void
*
_ss
){
void
*
ret
;
struct
NdbThread
*
ss
=
(
struct
NdbThread
*
)
_ss
;
#ifdef NDB_SHM_TRANSPORTER
sigset_t
mask
;
sigemptyset
(
&
mask
);
sigaddset
(
&
mask
,
SIGUSR1
);
pthread_sigmask
(
SIG_BLOCK
,
&
mask
,
0
);
#endif
ret
=
(
*
ss
->
func
)(
ss
->
object
);
return
ret
;
}
struct
NdbThread
*
NdbThread_Create
(
NDB_THREAD_FUNC
*
p_thread_func
,
struct
NdbThread
*
NdbThread_Create
(
NDB_THREAD_FUNC
*
p_thread_func
,
...
@@ -67,10 +83,12 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
...
@@ -67,10 +83,12 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
#ifdef PTHREAD_CREATE_JOINABLE
/* needed on SCO */
#ifdef PTHREAD_CREATE_JOINABLE
/* needed on SCO */
pthread_attr_setdetachstate
(
&
thread_attr
,
PTHREAD_CREATE_JOINABLE
);
pthread_attr_setdetachstate
(
&
thread_attr
,
PTHREAD_CREATE_JOINABLE
);
#endif
#endif
tmpThread
->
func
=
p_thread_func
;
tmpThread
->
object
=
p_thread_arg
;
result
=
pthread_create
(
&
tmpThread
->
thread
,
result
=
pthread_create
(
&
tmpThread
->
thread
,
&
thread_attr
,
&
thread_attr
,
p_thread_func
,
ndb_thread_wrapper
,
p_thread_arg
);
tmpThread
);
assert
(
result
==
0
);
assert
(
result
==
0
);
pthread_attr_destroy
(
&
thread_attr
);
pthread_attr_destroy
(
&
thread_attr
);
...
...
ndb/src/common/transporter/TransporterRegistry.cpp
View file @
25d776a8
...
@@ -153,8 +153,17 @@ TransporterRegistry::init(NodeId nodeId) {
...
@@ -153,8 +153,17 @@ TransporterRegistry::init(NodeId nodeId) {
DEBUG
(
"TransporterRegistry started node: "
<<
localNodeId
);
DEBUG
(
"TransporterRegistry started node: "
<<
localNodeId
);
// return allocateLongSignalMemoryPool(nLargeSegments);
#ifdef NDB_SHM_TRANSPORTER
return
true
;
/**
* Make sure to block SIGUSR1
* TransporterRegistry::init is run from "main" thread
*/
sigset_t
mask
;
sigemptyset
(
&
mask
);
sigaddset
(
&
mask
,
SIGUSR1
);
pthread_sigmask
(
SIG_BLOCK
,
&
mask
,
0
);
#endif
return
true
;
}
}
bool
bool
...
@@ -1321,6 +1330,9 @@ TransporterRegistry::startReceiving()
...
@@ -1321,6 +1330,9 @@ TransporterRegistry::startReceiving()
#ifdef NDB_SHM_TRANSPORTER
#ifdef NDB_SHM_TRANSPORTER
m_shm_own_pid
=
getpid
();
m_shm_own_pid
=
getpid
();
struct
sigaction
sa
;
struct
sigaction
sa
;
sigemptyset
(
&
sa
.
sa_mask
);
sigaddset
(
&
sa
.
sa_mask
,
SIGUSR1
);
pthread_sigmask
(
SIG_UNBLOCK
,
&
sa
.
sa_mask
,
0
);
sa
.
sa_handler
=
shm_sig_handler
;
sa
.
sa_handler
=
shm_sig_handler
;
sigemptyset
(
&
sa
.
sa_mask
);
sigemptyset
(
&
sa
.
sa_mask
);
sa
.
sa_flags
=
0
;
sa
.
sa_flags
=
0
;
...
...
regex/Makefile.am
View file @
25d776a8
...
@@ -17,12 +17,11 @@
...
@@ -17,12 +17,11 @@
INCLUDES
=
@MT_INCLUDES@
-I
$(top_srcdir)
/include
INCLUDES
=
@MT_INCLUDES@
-I
$(top_srcdir)
/include
noinst_LIBRARIES
=
libregex.a
noinst_LIBRARIES
=
libregex.a
LDADD
=
libregex.a ..
/strings/libmystrings.a
LDADD
=
libregex.a
$(top_builddir)
/strings/libmystrings.a
noinst_HEADERS
=
cclass.h cname.h regex2.h utils.h engine.c regex.h
noinst_HEADERS
=
cclass.h cname.h regex2.h utils.h engine.c regex.h
libregex_a_SOURCES
=
regerror.c regcomp.c regexec.c regfree.c reginit.c
libregex_a_SOURCES
=
regerror.c regcomp.c regexec.c regfree.c reginit.c
noinst_PROGRAMS
=
re
noinst_PROGRAMS
=
re
re_SOURCES
=
split.c debug.c main.c
re_SOURCES
=
split.c debug.c main.c
re_DEPENDENCIES
=
$(LIBRARIES)
re_LDFLAGS
=
@NOINST_LDFLAGS@
re_LDFLAGS
=
@NOINST_LDFLAGS@
EXTRA_DIST
=
tests CHANGES COPYRIGHT WHATSNEW regexp.c
\
EXTRA_DIST
=
tests CHANGES COPYRIGHT WHATSNEW regexp.c
\
debug.ih engine.ih main.ih regcomp.ih regerror.ih
\
debug.ih engine.ih main.ih regcomp.ih regerror.ih
\
...
...
sql/field.h
View file @
25d776a8
...
@@ -1275,10 +1275,10 @@ bool test_if_int(const char *str, int length, const char *int_end,
...
@@ -1275,10 +1275,10 @@ bool test_if_int(const char *str, int length, const char *int_end,
#define FIELDFLAG_NUMBER 2
#define FIELDFLAG_NUMBER 2
#define FIELDFLAG_ZEROFILL 4
#define FIELDFLAG_ZEROFILL 4
#define FIELDFLAG_PACK 120 // Bits used for packing
#define FIELDFLAG_PACK 120 // Bits used for packing
#define FIELDFLAG_INTERVAL 256
#define FIELDFLAG_INTERVAL 256
// mangled with decimals!
#define FIELDFLAG_BITFIELD 512 // mangled with dec!
#define FIELDFLAG_BITFIELD 512 // mangled with dec
imals
!
#define FIELDFLAG_BLOB 1024 // mangled with dec!
#define FIELDFLAG_BLOB 1024 // mangled with dec
imals
!
#define FIELDFLAG_GEOM 2048
#define FIELDFLAG_GEOM 2048
// mangled with decimals!
#define FIELDFLAG_LEFT_FULLSCREEN 8192
#define FIELDFLAG_LEFT_FULLSCREEN 8192
#define FIELDFLAG_RIGHT_FULLSCREEN 16384
#define FIELDFLAG_RIGHT_FULLSCREEN 16384
...
@@ -1303,10 +1303,10 @@ bool test_if_int(const char *str, int length, const char *int_end,
...
@@ -1303,10 +1303,10 @@ bool test_if_int(const char *str, int length, const char *int_end,
#define f_decimals(x) ((uint8) (((x) >> FIELDFLAG_DEC_SHIFT) & FIELDFLAG_MAX_DEC))
#define f_decimals(x) ((uint8) (((x) >> FIELDFLAG_DEC_SHIFT) & FIELDFLAG_MAX_DEC))
#define f_is_alpha(x) (!f_is_num(x))
#define f_is_alpha(x) (!f_is_num(x))
#define f_is_binary(x) ((x) & FIELDFLAG_BINARY) // 4.0- compatibility
#define f_is_binary(x) ((x) & FIELDFLAG_BINARY) // 4.0- compatibility
#define f_is_enum(x) ((
x) &
FIELDFLAG_INTERVAL)
#define f_is_enum(x) ((
(x) & (FIELDFLAG_INTERVAL | FIELDFLAG_NUMBER)) ==
FIELDFLAG_INTERVAL)
#define f_is_bitfield(x)
((x) &
FIELDFLAG_BITFIELD)
#define f_is_bitfield(x)
(((x) & (FIELDFLAG_BITFIELD | FIELDFLAG_NUMBER)) ==
FIELDFLAG_BITFIELD)
#define f_is_blob(x) (((x) & (FIELDFLAG_BLOB | FIELDFLAG_NUMBER)) == FIELDFLAG_BLOB)
#define f_is_blob(x) (((x) & (FIELDFLAG_BLOB | FIELDFLAG_NUMBER)) == FIELDFLAG_BLOB)
#define f_is_geom(x) ((
x) &
FIELDFLAG_GEOM)
#define f_is_geom(x) ((
(x) & (FIELDFLAG_GEOM | FIELDFLAG_NUMBER)) ==
FIELDFLAG_GEOM)
#define f_is_equ(x) ((x) & (1+2+FIELDFLAG_PACK+31*256))
#define f_is_equ(x) ((x) & (1+2+FIELDFLAG_PACK+31*256))
#define f_settype(x) (((int) x) << FIELDFLAG_PACK_SHIFT)
#define f_settype(x) (((int) x) << FIELDFLAG_PACK_SHIFT)
#define f_maybe_null(x) (x & FIELDFLAG_MAYBE_NULL)
#define f_maybe_null(x) (x & FIELDFLAG_MAYBE_NULL)
sql/field_conv.cc
View file @
25d776a8
...
@@ -559,6 +559,7 @@ void field_conv(Field *to,Field *from)
...
@@ -559,6 +559,7 @@ void field_conv(Field *to,Field *from)
if
(
to
->
real_type
()
==
from
->
real_type
())
if
(
to
->
real_type
()
==
from
->
real_type
())
{
{
if
(
to
->
pack_length
()
==
from
->
pack_length
()
&&
if
(
to
->
pack_length
()
==
from
->
pack_length
()
&&
!
(
to
->
flags
&
UNSIGNED_FLAG
&&
!
(
from
->
flags
&
UNSIGNED_FLAG
))
&&
to
->
real_type
()
!=
FIELD_TYPE_ENUM
&&
to
->
real_type
()
!=
FIELD_TYPE_ENUM
&&
to
->
real_type
()
!=
FIELD_TYPE_SET
&&
to
->
real_type
()
!=
FIELD_TYPE_SET
&&
from
->
charset
()
==
to
->
charset
()
&&
from
->
charset
()
==
to
->
charset
()
&&
...
...
sql/ha_ndbcluster.cc
View file @
25d776a8
...
@@ -583,7 +583,7 @@ int ha_ndbcluster::get_ndb_blobs_value(NdbBlob *last_ndb_blob)
...
@@ -583,7 +583,7 @@ int ha_ndbcluster::get_ndb_blobs_value(NdbBlob *last_ndb_blob)
char
*
buf
=
m_blobs_buffer
+
offset
;
char
*
buf
=
m_blobs_buffer
+
offset
;
uint32
len
=
0xffffffff
;
// Max uint32
uint32
len
=
0xffffffff
;
// Max uint32
DBUG_PRINT
(
"value"
,
(
"read blob ptr=%x len=%u"
,
DBUG_PRINT
(
"value"
,
(
"read blob ptr=%x len=%u"
,
(
uint
)
buf
,
(
uint
)
blob_len
));
(
UintPtr
)
buf
,
(
uint
)
blob_len
));
if
(
ndb_blob
->
readData
(
buf
,
len
)
!=
0
)
if
(
ndb_blob
->
readData
(
buf
,
len
)
!=
0
)
DBUG_RETURN
(
-
1
);
DBUG_RETURN
(
-
1
);
DBUG_ASSERT
(
len
==
blob_len
);
DBUG_ASSERT
(
len
==
blob_len
);
...
@@ -3169,7 +3169,7 @@ int ha_ndbcluster::start_stmt(THD *thd)
...
@@ -3169,7 +3169,7 @@ int ha_ndbcluster::start_stmt(THD *thd)
NdbConnection
*
tablock_trans
=
NdbConnection
*
tablock_trans
=
(
NdbConnection
*
)
thd
->
transaction
.
all
.
ndb_tid
;
(
NdbConnection
*
)
thd
->
transaction
.
all
.
ndb_tid
;
DBUG_PRINT
(
"info"
,
(
"tablock_trans: %x"
,
(
uint
)
tablock_trans
));
DBUG_PRINT
(
"info"
,
(
"tablock_trans: %x"
,
(
UintPtr
)
tablock_trans
));
DBUG_ASSERT
(
tablock_trans
);
DBUG_ASSERT
(
tablock_trans
);
// trans= ndb->hupp(tablock_trans);
// trans= ndb->hupp(tablock_trans);
trans
=
ndb
->
startTransaction
();
trans
=
ndb
->
startTransaction
();
...
...
sql/item.cc
View file @
25d776a8
...
@@ -45,7 +45,7 @@ Item::Item():
...
@@ -45,7 +45,7 @@ Item::Item():
{
{
marker
=
0
;
marker
=
0
;
maybe_null
=
null_value
=
with_sum_func
=
unsigned_flag
=
0
;
maybe_null
=
null_value
=
with_sum_func
=
unsigned_flag
=
0
;
collation
.
set
(
default_charset
()
,
DERIVATION_COERCIBLE
);
collation
.
set
(
&
my_charset_bin
,
DERIVATION_COERCIBLE
);
name
=
0
;
name
=
0
;
decimals
=
0
;
max_length
=
0
;
decimals
=
0
;
max_length
=
0
;
...
...
sql/item_cmpfunc.cc
View file @
25d776a8
...
@@ -1094,6 +1094,9 @@ Item_func_nullif::fix_length_and_dec()
...
@@ -1094,6 +1094,9 @@ Item_func_nullif::fix_length_and_dec()
max_length
=
args
[
0
]
->
max_length
;
max_length
=
args
[
0
]
->
max_length
;
decimals
=
args
[
0
]
->
decimals
;
decimals
=
args
[
0
]
->
decimals
;
agg_result_type
(
&
cached_result_type
,
args
,
2
);
agg_result_type
(
&
cached_result_type
,
args
,
2
);
if
(
cached_result_type
==
STRING_RESULT
&&
agg_arg_charsets
(
collation
,
args
,
arg_count
,
MY_COLL_CMP_CONV
))
return
;
}
}
}
}
...
...
sql/slave.cc
View file @
25d776a8
...
@@ -1243,7 +1243,11 @@ not always make sense; please check the manual before using it).";
...
@@ -1243,7 +1243,11 @@ not always make sense; please check the manual before using it).";
values of these 2 are never used (new connections don't use them).
values of these 2 are never used (new connections don't use them).
We don't test equality of global collation_database either as it's is
We don't test equality of global collation_database either as it's is
going to be deprecated (made read-only) in 4.1 very soon.
going to be deprecated (made read-only) in 4.1 very soon.
We don't do it for <3.23.57 because masters <3.23.50 hang on
SELECT @@unknown_var (BUG#7965 - see changelog of 3.23.50).
*/
*/
if
(
mi
->
old_format
==
BINLOG_FORMAT_323_LESS_57
)
goto
err
;
if
(
!
mysql_real_query
(
mysql
,
"SELECT @@GLOBAL.COLLATION_SERVER"
,
32
)
&&
if
(
!
mysql_real_query
(
mysql
,
"SELECT @@GLOBAL.COLLATION_SERVER"
,
32
)
&&
(
master_res
=
mysql_store_result
(
mysql
)))
(
master_res
=
mysql_store_result
(
mysql
)))
{
{
...
@@ -1280,6 +1284,7 @@ be equal for replication to work";
...
@@ -1280,6 +1284,7 @@ be equal for replication to work";
mysql_free_result
(
master_res
);
mysql_free_result
(
master_res
);
}
}
err:
if
(
errmsg
)
if
(
errmsg
)
{
{
sql_print_error
(
errmsg
);
sql_print_error
(
errmsg
);
...
...
sql/sql_union.cc
View file @
25d776a8
...
@@ -466,11 +466,14 @@ int st_select_lex_unit::exec()
...
@@ -466,11 +466,14 @@ int st_select_lex_unit::exec()
}
}
res
=
sl
->
join
->
error
;
res
=
sl
->
join
->
error
;
offset_limit_cnt
=
sl
->
offset_limit
;
offset_limit_cnt
=
sl
->
offset_limit
;
if
(
!
res
&&
union_result
->
flush
()
)
if
(
!
res
)
{
{
examined_rows
+=
thd
->
examined_row_count
;
examined_rows
+=
thd
->
examined_row_count
;
thd
->
lex
->
current_select
=
lex_select_save
;
if
(
union_result
->
flush
())
DBUG_RETURN
(
1
);
{
thd
->
lex
->
current_select
=
lex_select_save
;
DBUG_RETURN
(
1
);
}
}
}
}
}
if
(
res
)
if
(
res
)
...
...
sql/table.cc
View file @
25d776a8
...
@@ -145,8 +145,19 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
...
@@ -145,8 +145,19 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
outparam
->
table_charset
=
get_charset
((
uint
)
head
[
38
],
MYF
(
0
));
outparam
->
table_charset
=
get_charset
((
uint
)
head
[
38
],
MYF
(
0
));
null_field_first
=
1
;
null_field_first
=
1
;
}
}
if
(
!
outparam
->
table_charset
)
/* unknown charset in head[38] or pre-3.23 frm */
if
(
!
outparam
->
table_charset
)
{
/* unknown charset in head[38] or pre-3.23 frm */
if
(
use_mb
(
default_charset_info
))
{
/* Warn that we may be changing the size of character columns */
sql_print_warning
(
"'%s' had no or invalid character set, "
"and default character set is multi-byte, "
"so character column sizes may have changed"
,
name
);
}
outparam
->
table_charset
=
default_charset_info
;
outparam
->
table_charset
=
default_charset_info
;
}
outparam
->
db_record_offset
=
1
;
outparam
->
db_record_offset
=
1
;
if
(
db_create_options
&
HA_OPTION_LONG_BLOB_PTR
)
if
(
db_create_options
&
HA_OPTION_LONG_BLOB_PTR
)
outparam
->
blob_ptr_size
=
portable_sizeof_char_ptr
;
outparam
->
blob_ptr_size
=
portable_sizeof_char_ptr
;
...
...
strings/Makefile.am
View file @
25d776a8
...
@@ -40,7 +40,6 @@ endif
...
@@ -40,7 +40,6 @@ endif
libmystrings_a_SOURCES
=
$(ASRCS)
$(CSRCS)
libmystrings_a_SOURCES
=
$(ASRCS)
$(CSRCS)
noinst_PROGRAMS
=
conf_to_src
noinst_PROGRAMS
=
conf_to_src
DISTCLEANFILES
=
ctype_autoconf.c
# Default charset definitions
# Default charset definitions
EXTRA_DIST
=
ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-win1250ch.c
\
EXTRA_DIST
=
ctype-big5.c ctype-czech.c ctype-euc_kr.c ctype-win1250ch.c
\
ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-utf8.c
\
ctype-gb2312.c ctype-gbk.c ctype-sjis.c ctype-utf8.c
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment