Below is the list of changes that have just been committed into a local
5.0 repository of jimw. When jimw does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1951 05/07/19 11:05:49 jimw@stripped +27 -0
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
sql/sql_show.cc
1.256 05/07/19 11:05:46 jimw@stripped +0 -33
Resolve conflict
sql/mysqld.cc
1.483 05/07/19 11:05:45 jimw@stripped +0 -7
Remove incorrect fix (merge from 4.1)
sql/mysql_priv.h
1.329 05/07/19 11:05:45 jimw@stripped +2 -2
Resolve conflict
sql/log_event.cc
1.184 05/07/19 11:05:45 jimw@stripped +3 -3
Resolve conflict
sql/item.cc
1.157 05/07/19 11:05:45 jimw@stripped +5 -8
Resolve conflict, don't return FIELD_TYPE_BLOB since VARCHAR
can be longer in 5.0 than 4.1.
scripts/mysqld_safe.sh
1.79 05/07/19 11:05:45 jimw@stripped +1 -1
Resolve conflict
mysql-test/t/select.test
1.58 05/07/19 11:05:45 jimw@stripped +7 -7
Resolve conflicts
tests/mysql_client_test.c
1.143 05/07/19 10:42:25 jimw@stripped +0 -0
Auto merged
sql/sql_select.cc
1.341 05/07/19 10:42:25 jimw@stripped +0 -0
Auto merged
sql/sql_prepare.cc
1.141 05/07/19 10:42:24 jimw@stripped +0 -0
Auto merged
sql/item_timefunc.cc
1.89 05/07/19 10:42:24 jimw@stripped +0 -0
Auto merged
sql/item_strfunc.cc
1.244 05/07/19 10:42:24 jimw@stripped +0 -0
Auto merged
sql/item_func.cc
1.235 05/07/19 10:42:24 jimw@stripped +0 -0
Auto merged
sql/field_conv.cc
1.48 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
sql/des_key_file.cc
1.12 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
ndb/src/mgmsrv/main.cpp
1.44 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
ndb/src/mgmsrv/ConfigInfo.cpp
1.62 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
mysql-test/r/select.result
1.73 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
mysql-test/r/ps_7ndb.result
1.34 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
mysql-test/r/ps_6bdb.result
1.34 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
mysql-test/r/ps_5merge.result
1.31 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
mysql-test/r/ps_4heap.result
1.30 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
mysql-test/r/ps_3innodb.result
1.34 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
mysql-test/r/ps_2myisam.result
1.31 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
mysql-test/r/ps_1general.result
1.44 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
include/my_global.h
1.97 05/07/19 10:42:23 jimw@stripped +0 -0
Auto merged
extra/perror.c
1.40 05/07/19 10:42:22 jimw@stripped +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: jimw
# Host: rama.(none)
# Root: /home/jimw/my/mysql-5.0-clean/RESYNC
--- 1.39/extra/perror.c 2005-02-25 06:53:14 -08:00
+++ 1.40/extra/perror.c 2005-07-19 10:42:22 -07:00
@@ -41,7 +41,7 @@
{"info", 'I', "Synonym for --help.", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
#ifdef HAVE_NDBCLUSTER_DB
- {"ndb", 0, "Ndbcluster storage engine specific error codes.", (gptr*) &ndb_code,
+ {"ndb", 257, "Ndbcluster storage engine specific error codes.", (gptr*) &ndb_code,
(gptr*) &ndb_code, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
#ifdef HAVE_SYS_ERRLIST
--- 1.78/scripts/mysqld_safe.sh 2005-05-26 17:43:16 -07:00
+++ 1.79/scripts/mysqld_safe.sh 2005-07-19 11:05:45 -07:00
@@ -106,29 +106,47 @@
}
+#
+# First, try to find BASEDIR and ledir (where mysqld is)
+#
+
MY_PWD=`pwd`
-# Check if we are starting this relative (for the binary release)
-if test -f ./share/mysql/english/errmsg.sys -a \
- -x ./bin/mysqld
+# Check for the directories we would expect from a binary release install
+if test -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld
then
MY_BASEDIR_VERSION=$MY_PWD # Where bin, share and data are
ledir=$MY_BASEDIR_VERSION/bin # Where mysqld is
+# Check for the directories we would expect from a source install
+elif test -f ./share/mysql/english/errmsg.sys -a \
+ -x ./libexec/mysqld
+then
+ MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
+ ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
+# Since we didn't find anything, used the compiled-in defaults
+else
+ MY_BASEDIR_VERSION=@prefix@
+ ledir=@libexecdir@
+fi
+
+#
+# Second, try to find the data directory
+#
+
+# Try where the binary installs put it
+if test -d $MY_BASEDIR_VERSION/data/mysql
+then
DATADIR=$MY_BASEDIR_VERSION/data
if test -z "$defaults" -a -r "$DATADIR/my.cnf"
then
defaults="--defaults-extra-file=$DATADIR/my.cnf"
fi
-# Check if this is a 'moved install directory'
-elif test -f ./share/mysql/english/errmsg.sys -a \
- -x ./libexec/mysqld
+# Next try where the source installs put it
+elif test -d $MY_BASEDIR_VERSION/var/mysql
then
- MY_BASEDIR_VERSION=$MY_PWD # Where libexec, share and var are
- ledir=$MY_BASEDIR_VERSION/libexec # Where mysqld is
DATADIR=$MY_BASEDIR_VERSION/var
+# Or just give up and use our compiled-in default
else
- MY_BASEDIR_VERSION=@prefix@
DATADIR=@localstatedir@
- ledir=@libexecdir@
fi
if test -z "$MYSQL_HOME"
--- 1.47/sql/field_conv.cc 2005-07-12 01:18:13 -07:00
+++ 1.48/sql/field_conv.cc 2005-07-19 10:42:23 -07:00
@@ -322,7 +322,34 @@
}
+/*
+ string copy for single byte characters set when to string is shorter than
+ from string
+*/
+
static void do_cut_string(Copy_field *copy)
+{
+ CHARSET_INFO *cs= copy->from_field->charset();
+ memcpy(copy->to_ptr,copy->from_ptr,copy->to_length);
+
+ /* Check if we loosed any important characters */
+ if (cs->cset->scan(cs,
+ copy->from_ptr + copy->to_length,
+ copy->from_ptr + copy->from_length,
+ MY_SEQ_SPACES) < copy->from_length - copy->to_length)
+ {
+ copy->to_field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN,
+ ER_WARN_DATA_TRUNCATED, 1);
+ }
+}
+
+
+/*
+ string copy for multi byte characters set when to string is shorter than
+ from string
+*/
+
+static void do_cut_string_complex(Copy_field *copy)
{ // Shorter string field
int well_formed_error;
CHARSET_INFO *cs= copy->from_field->charset();
@@ -349,6 +376,8 @@
}
+
+
static void do_expand_string(Copy_field *copy)
{
CHARSET_INFO *cs= copy->from_field->charset();
@@ -550,7 +579,8 @@
do_varstring1 : do_varstring2);
}
else if (to_length < from_length)
- return do_cut_string;
+ return (from->charset()->mbmaxlen == 1 ?
+ do_cut_string : do_cut_string_complex);
else if (to_length > from_length)
return do_expand_string;
}
--- 1.156/sql/item.cc 2005-07-15 14:51:56 -07:00
+++ 1.157/sql/item.cc 2005-07-19 11:05:45 -07:00
@@ -3323,7 +3323,12 @@
void Item_empty_string::make_field(Send_field *tmp_field)
{
- init_make_field(tmp_field, MYSQL_TYPE_VARCHAR);
+ enum_field_types type= FIELD_TYPE_VAR_STRING;
+ if (max_length >= 16777216)
+ type= FIELD_TYPE_LONG_BLOB;
+ else if (max_length >= 65536)
+ type= FIELD_TYPE_MEDIUM_BLOB;
+ init_make_field(tmp_field, type);
}
--- 1.234/sql/item_func.cc 2005-07-16 05:10:36 -07:00
+++ 1.235/sql/item_func.cc 2005-07-19 10:42:24 -07:00
@@ -4231,14 +4231,15 @@
bool
Item_func_get_system_var::fix_fields(THD *thd, Item **ref)
{
- Item *item= var->item(thd, var_type, &component);
+ Item *item;
DBUG_ENTER("Item_func_get_system_var::fix_fields");
+
/*
Evaluate the system variable and substitute the result (a basic constant)
instead of this item. If the variable can not be evaluated,
the error is reported in sys_var::item().
*/
- if (item == 0)
+ if (!(item= var->item(thd, var_type, &component)))
DBUG_RETURN(1); // Impossible
item->set_name(name, 0, system_charset_info); // don't allocate a new name
thd->change_item_tree(ref, item);
--- 1.243/sql/item_strfunc.cc 2005-07-18 08:36:11 -07:00
+++ 1.244/sql/item_strfunc.cc 2005-07-19 10:42:24 -07:00
@@ -335,19 +335,20 @@
void Item_func_concat::fix_length_and_dec()
{
- max_length=0;
+ ulonglong max_result_length= 0;
if (agg_arg_charsets(collation, args, arg_count, MY_COLL_ALLOW_CONV))
return;
for (uint i=0 ; i < arg_count ; i++)
- max_length+=args[i]->max_length;
+ max_result_length+= args[i]->max_length;
- if (max_length > MAX_BLOB_WIDTH)
+ if (max_result_length >= MAX_BLOB_WIDTH)
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ max_result_length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
+ max_length= (ulong) max_result_length;
}
/*
@@ -378,9 +379,6 @@
if (arg_count == 1)
{
- /* Make sure LOCK_des_key_file was initialized. */
- init_des_key_file();
-
/* Protect against someone doing FLUSH DES_KEY_FILE */
VOID(pthread_mutex_lock(&LOCK_des_key_file));
keyschedule= des_keyschedule[key_number=des_default_key];
@@ -391,10 +389,6 @@
key_number= (uint) args[1]->val_int();
if (key_number > 9)
goto error;
-
- /* Make sure LOCK_des_key_file was initialized. */
- init_des_key_file();
-
VOID(pthread_mutex_lock(&LOCK_des_key_file));
keyschedule= des_keyschedule[key_number];
VOID(pthread_mutex_unlock(&LOCK_des_key_file));
@@ -482,9 +476,6 @@
if (!(current_thd->master_access & SUPER_ACL) || key_number > 9)
goto error;
- /* Make sure LOCK_des_key_file was initialized. */
- init_des_key_file();
-
VOID(pthread_mutex_lock(&LOCK_des_key_file));
keyschedule= des_keyschedule[key_number];
VOID(pthread_mutex_unlock(&LOCK_des_key_file));
@@ -658,7 +649,7 @@
void Item_func_concat_ws::fix_length_and_dec()
{
- max_length=0;
+ ulonglong max_result_length;
if (agg_arg_charsets(collation, args, arg_count, MY_COLL_ALLOW_CONV))
return;
@@ -668,15 +659,16 @@
it is done on parser level in sql_yacc.yy
so, (arg_count - 2) is safe here.
*/
- max_length= args[0]->max_length * (arg_count - 2);
+ max_result_length= (ulonglong) args[0]->max_length * (arg_count - 2);
for (uint i=1 ; i < arg_count ; i++)
- max_length+=args[i]->max_length;
+ max_result_length+=args[i]->max_length;
- if (max_length > MAX_BLOB_WIDTH)
+ if (max_result_length >= MAX_BLOB_WIDTH)
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ max_result_length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
+ max_length= (ulong) max_result_length;
}
@@ -855,18 +847,19 @@
void Item_func_replace::fix_length_and_dec()
{
- max_length=args[0]->max_length;
+ ulonglong max_result_length= args[0]->max_length;
int diff=(int) (args[2]->max_length - args[1]->max_length);
if (diff > 0 && args[1]->max_length)
{ // Calculate of maxreplaces
- uint max_substrs= max_length/args[1]->max_length;
- max_length+= max_substrs * (uint) diff;
+ ulonglong max_substrs= max_result_length/args[1]->max_length;
+ max_result_length+= max_substrs * (uint) diff;
}
- if (max_length > MAX_BLOB_WIDTH)
+ if (max_result_length >= MAX_BLOB_WIDTH)
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ max_result_length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
+ max_length= (ulong) max_result_length;
if (agg_arg_charsets(collation, args, 3, MY_COLL_CMP_CONV))
return;
@@ -914,18 +907,22 @@
void Item_func_insert::fix_length_and_dec()
{
Item *cargs[2];
+ ulonglong max_result_length;
+
cargs[0]= args[0];
cargs[1]= args[3];
if (agg_arg_charsets(collation, cargs, 2, MY_COLL_ALLOW_CONV))
return;
args[0]= cargs[0];
args[3]= cargs[1];
- max_length=args[0]->max_length+args[3]->max_length;
- if (max_length > MAX_BLOB_WIDTH)
+ max_result_length= ((ulonglong) args[0]->max_length+
+ (ulonglong) args[3]->max_length);
+ if (max_result_length >= MAX_BLOB_WIDTH)
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ max_result_length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
+ max_length= (ulong) max_result_length;
}
@@ -2001,17 +1998,19 @@
collation.set(args[0]->collation);
if (args[1]->const_item())
{
- max_length=(long) (args[0]->max_length * args[1]->val_int());
- if (max_length >= MAX_BLOB_WIDTH)
+ ulonglong max_result_length= ((ulonglong) args[0]->max_length *
+ args[1]->val_int());
+ if (max_result_length >= MAX_BLOB_WIDTH)
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ max_result_length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
+ max_length= (ulong) max_result_length;
}
else
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ max_length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
}
@@ -2066,6 +2065,7 @@
void Item_func_rpad::fix_length_and_dec()
{
Item *cargs[2];
+
cargs[0]= args[0];
cargs[1]= args[2];
if (agg_arg_charsets(collation, cargs, 2, MY_COLL_ALLOW_CONV))
@@ -2074,18 +2074,20 @@
args[2]= cargs[1];
if (args[1]->const_item())
{
- uint32 length= (uint32) args[1]->val_int() * collation.collation->mbmaxlen;
- max_length=max(args[0]->max_length,length);
- if (max_length >= MAX_BLOB_WIDTH)
+ ulonglong length= ((ulonglong) args[1]->val_int() *
+ collation.collation->mbmaxlen);
+ length= max((ulonglong) args[0]->max_length, length);
+ if (length >= MAX_BLOB_WIDTH)
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
+ max_length= (ulong) length;
}
else
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ max_length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
}
@@ -2160,18 +2162,20 @@
if (args[1]->const_item())
{
- uint32 length= (uint32) args[1]->val_int() * collation.collation->mbmaxlen;
- max_length=max(args[0]->max_length,length);
- if (max_length >= MAX_BLOB_WIDTH)
+ ulonglong length= ((ulonglong) args[1]->val_int() *
+ collation.collation->mbmaxlen);
+ length= max((ulonglong) args[0]->max_length, length);
+ if (length >= MAX_BLOB_WIDTH)
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
+ max_length= (ulong) length;
}
else
{
- max_length=MAX_BLOB_WIDTH;
- maybe_null=1;
+ max_length= MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
}
--- 1.88/sql/item_timefunc.cc 2005-06-30 21:05:35 -07:00
+++ 1.89/sql/item_timefunc.cc 2005-07-19 10:42:24 -07:00
@@ -1555,7 +1555,7 @@
{
fixed_length=0;
/* The result is a binary string (no reason to use collation->mbmaxlen */
- max_length=args[1]->max_length*10;
+ max_length=min(args[1]->max_length,MAX_BLOB_WIDTH) * 10;
set_if_smaller(max_length,MAX_BLOB_WIDTH);
}
maybe_null=1; // If wrong date
--- 1.183/sql/log_event.cc 2005-07-18 14:47:21 -07:00
+++ 1.184/sql/log_event.cc 2005-07-19 11:05:45 -07:00
@@ -1,15 +1,15 @@
/* Copyright (C) 2000-2004 MySQL AB
-
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
-
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
@@ -2774,6 +2774,16 @@
*/
handle_dup= DUP_ERROR;
}
+ /*
+ We need to set thd->lex->sql_command and thd->lex->duplicates
+ since InnoDB tests these variables to decide if this is a LOAD
+ DATA ... REPLACE INTO ... statement even though mysql_parse()
+ is not called. This is not needed in 5.0 since there the LOAD
+ DATA ... statement is replicated using mysql_parse(), which
+ sets the thd->lex fields correctly.
+ */
+ thd->lex->sql_command= SQLCOM_LOAD;
+ thd->lex->duplicates= handle_dup;
sql_exchange ex((char*)fname, sql_ex.opt_flags & DUMPFILE_FLAG);
String field_term(sql_ex.field_term,sql_ex.field_term_len,log_cs);
--- 1.328/sql/mysql_priv.h 2005-07-16 05:10:36 -07:00
+++ 1.329/sql/mysql_priv.h 2005-07-19 11:05:45 -07:00
@@ -791,9 +791,7 @@
extern struct st_des_keyschedule des_keyschedule[10];
extern uint des_default_key;
extern pthread_mutex_t LOCK_des_key_file;
-void init_des_key_file();
bool load_des_key_file(const char *file_name);
-void free_des_key_file();
#endif /* HAVE_OPENSSL */
/* sql_do.cc */
@@ -1156,8 +1154,11 @@
LOCK_error_log, LOCK_delayed_insert, LOCK_uuid_generator,
LOCK_delayed_status, LOCK_delayed_create, LOCK_crypt, LOCK_timezone,
LOCK_slave_list, LOCK_active_mi, LOCK_manager, LOCK_global_read_lock,
- LOCK_global_system_variables, LOCK_user_conn,
+ LOCK_global_system_variables, LOCK_user_conn,
LOCK_bytes_sent, LOCK_bytes_received;
+#ifdef HAVE_OPENSSL
+extern pthread_mutex_t LOCK_des_key_file;
+#endif
extern rw_lock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave;
extern pthread_cond_t COND_refresh, COND_thread_count, COND_manager;
extern pthread_attr_t connection_attrib;
--- 1.482/sql/mysqld.cc 2005-07-18 13:55:32 -07:00
+++ 1.483/sql/mysqld.cc 2005-07-19 11:05:45 -07:00
@@ -447,6 +447,9 @@
LOCK_crypt, LOCK_bytes_sent, LOCK_bytes_received,
LOCK_global_system_variables,
LOCK_user_conn, LOCK_slave_list, LOCK_active_mi;
+#ifdef HAVE_OPENSSL
+pthread_mutex_t LOCK_des_key_file;
+#endif
rw_lock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave;
pthread_cond_t COND_refresh,COND_thread_count;
pthread_t signal_thread;
@@ -675,7 +678,11 @@
end_thr_alarm(0); // Abort old alarms.
end_slave();
- /* First signal all threads that it's time to die */
+ /*
+ First signal all threads that it's time to die
+ This will give the threads some time to gracefully abort their
+ statements and inform their clients that the server is about to die.
+ */
THD *tmp;
(void) pthread_mutex_lock(&LOCK_thread_count); // For unlink from list
@@ -685,13 +692,7 @@
{
DBUG_PRINT("quit",("Informing thread %ld that it's time to die",
tmp->thread_id));
- /*
- Re: bug 7403 - close_connection will be called mulitple times
- a wholesale clean up of our network code is a very large project.
- This will wake up the socket on Windows and prevent the printing of
- the error message that we are force closing a connection.
- */
- close_connection(tmp, 0, 0);
+ tmp->killed= 1;
if (tmp->mysys_var)
{
tmp->mysys_var->abort=1;
@@ -708,9 +709,13 @@
(void) pthread_mutex_unlock(&LOCK_thread_count); // For unlink from list
if (thread_count)
- sleep(1); // Give threads time to die
+ sleep(2); // Give threads time to die
- /* Force remaining threads to die by closing the connection to the client */
+ /*
+ Force remaining threads to die by closing the connection to the client
+ This will ensure that threads that are waiting for a command from the
+ client on a blocking read call are aborted.
+ */
for (;;)
{
@@ -725,8 +730,9 @@
#ifndef __bsdi__ // Bug in BSDI kernel
if (tmp->vio_ok())
{
- sql_print_error(ER(ER_FORCING_CLOSE),my_progname,
- tmp->thread_id,tmp->user ? tmp->user : "");
+ if (global_system_variables.log_warnings)
+ sql_print_warning(ER(ER_FORCING_CLOSE),my_progname,
+ tmp->thread_id,tmp->user ? tmp->user : "");
close_connection(tmp,0,0);
}
#endif
@@ -1042,7 +1048,6 @@
#ifdef HAVE_OPENSSL
if (ssl_acceptor_fd)
my_free((gptr) ssl_acceptor_fd, MYF(MY_ALLOW_ZERO_PTR));
- free_des_key_file();
#endif /* HAVE_OPENSSL */
#ifdef USE_REGEX
regex_end();
@@ -1114,6 +1119,9 @@
(void) pthread_mutex_destroy(&LOCK_bytes_sent);
(void) pthread_mutex_destroy(&LOCK_bytes_received);
(void) pthread_mutex_destroy(&LOCK_user_conn);
+#ifdef HAVE_OPENSSL
+ (void) pthread_mutex_destroy(&LOCK_des_key_file);
+#endif
#ifdef HAVE_REPLICATION
(void) pthread_mutex_destroy(&LOCK_rpl_status);
(void) pthread_cond_destroy(&COND_rpl_status);
@@ -2617,6 +2625,9 @@
(void) pthread_mutex_init(&LOCK_global_system_variables, MY_MUTEX_INIT_FAST);
(void) pthread_mutex_init(&LOCK_global_read_lock, MY_MUTEX_INIT_FAST);
(void) pthread_mutex_init(&LOCK_uuid_generator, MY_MUTEX_INIT_FAST);
+#ifdef HAVE_OPENSSL
+ (void) pthread_mutex_init(&LOCK_des_key_file,MY_MUTEX_INIT_FAST);
+#endif
(void) my_rwlock_init(&LOCK_sys_init_connect, NULL);
(void) my_rwlock_init(&LOCK_sys_init_slave, NULL);
(void) my_rwlock_init(&LOCK_grant, NULL);
--- 1.340/sql/sql_select.cc 2005-07-18 13:49:15 -07:00
+++ 1.341/sql/sql_select.cc 2005-07-19 10:42:25 -07:00
@@ -1207,14 +1207,18 @@
else
{
error= (int) result->send_eof();
- send_records=1;
+ send_records= ((select_options & OPTION_FOUND_ROWS) ? 1 :
+ thd->sent_row_count);
}
}
else
+ {
error=(int) result->send_eof();
+ send_records= 0;
+ }
}
- /* Single select (without union and limit) always returns 1 row */
- thd->limit_found_rows= 1;
+ /* Single select (without union) always returns 0 or 1 row */
+ thd->limit_found_rows= send_records;
thd->examined_row_count= 0;
DBUG_VOID_RETURN;
}
@@ -5182,6 +5186,7 @@
if (tab->ref.null_rejecting & (1 << keypart))
{
Item *item= tab->ref.items[keypart];
+ Item *notnull;
DBUG_ASSERT(item->type() == Item::FIELD_ITEM);
Item_field *not_null_item= (Item_field*)item;
JOIN_TAB *referred_tab= not_null_item->field->table->reginfo.join_tab;
@@ -5192,7 +5197,6 @@
*/
if (!referred_tab || referred_tab->join != join)
continue;
- Item *notnull;
if (!(notnull= new Item_func_isnotnull(not_null_item)))
DBUG_VOID_RETURN;
/*
--- 1.43/mysql-test/r/ps_1general.result 2005-07-08 00:53:51 -07:00
+++ 1.44/mysql-test/r/ps_1general.result 2005-07-19 10:42:23 -07:00
@@ -473,12 +473,12 @@
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
-def possible_keys 253 4096 0 Y 0 31 8
+def possible_keys 252 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63
-def ref 253 1024 0 Y 0 31 8
+def ref 252 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 14 N 1 31 8
+def Extra 252 255 14 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using filesort
SET @arg00=1 ;
@@ -489,12 +489,12 @@
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 5 Y 0 31 8
-def possible_keys 253 4096 7 Y 0 31 8
+def possible_keys 252 4096 7 Y 0 31 8
def key 253 64 7 Y 0 31 8
def key_len 253 4096 1 Y 128 31 63
-def ref 253 1024 0 Y 0 31 8
+def ref 252 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 27 N 1 31 8
+def Extra 252 255 27 N 1 31 8
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
drop table if exists t2;
--- 1.30/mysql-test/r/ps_2myisam.result 2005-07-14 06:27:42 -07:00
+++ 1.31/mysql-test/r/ps_2myisam.result 2005-07-19 10:42:23 -07:00
@@ -1154,12 +1154,12 @@
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
-def possible_keys 253 4096 0 Y 0 31 8
+def possible_keys 252 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63
-def ref 253 1024 0 Y 0 31 8
+def ref 252 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 252 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
drop table if exists t2 ;
--- 1.33/mysql-test/r/ps_3innodb.result 2005-07-14 06:27:42 -07:00
+++ 1.34/mysql-test/r/ps_3innodb.result 2005-07-19 10:42:23 -07:00
@@ -1154,12 +1154,12 @@
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
-def possible_keys 253 4096 0 Y 0 31 8
+def possible_keys 252 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63
-def ref 253 1024 0 Y 0 31 8
+def ref 252 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 252 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
--- 1.29/mysql-test/r/ps_4heap.result 2005-07-14 06:27:42 -07:00
+++ 1.30/mysql-test/r/ps_4heap.result 2005-07-19 10:42:23 -07:00
@@ -1155,12 +1155,12 @@
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
-def possible_keys 253 4096 0 Y 0 31 8
+def possible_keys 252 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63
-def ref 253 1024 0 Y 0 31 8
+def ref 252 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 252 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
--- 1.30/mysql-test/r/ps_5merge.result 2005-07-14 06:27:42 -07:00
+++ 1.31/mysql-test/r/ps_5merge.result 2005-07-19 10:42:23 -07:00
@@ -1197,12 +1197,12 @@
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
-def possible_keys 253 4096 0 Y 0 31 8
+def possible_keys 252 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63
-def ref 253 1024 0 Y 0 31 8
+def ref 252 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 252 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
@@ -4209,12 +4209,12 @@
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
-def possible_keys 253 4096 0 Y 0 31 8
+def possible_keys 252 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63
-def ref 253 1024 0 Y 0 31 8
+def ref 252 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 252 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
--- 1.33/mysql-test/r/ps_6bdb.result 2005-07-14 06:27:42 -07:00
+++ 1.34/mysql-test/r/ps_6bdb.result 2005-07-19 10:42:23 -07:00
@@ -1154,12 +1154,12 @@
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
-def possible_keys 253 4096 0 Y 0 31 8
+def possible_keys 252 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63
-def ref 253 1024 0 Y 0 31 8
+def ref 252 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 252 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 3
test_sequence
--- 1.33/mysql-test/r/ps_7ndb.result 2005-07-14 06:27:42 -07:00
+++ 1.34/mysql-test/r/ps_7ndb.result 2005-07-19 10:42:23 -07:00
@@ -1154,12 +1154,12 @@
def select_type 253 19 6 N 1 31 8
def table 253 64 2 Y 0 31 8
def type 253 10 3 Y 0 31 8
-def possible_keys 253 4096 0 Y 0 31 8
+def possible_keys 252 4096 0 Y 0 31 8
def key 253 64 0 Y 0 31 8
def key_len 253 4096 0 Y 128 31 63
-def ref 253 1024 0 Y 0 31 8
+def ref 252 1024 0 Y 0 31 8
def rows 8 10 1 Y 32928 0 63
-def Extra 253 255 0 N 1 31 8
+def Extra 252 255 0 N 1 31 8
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t9 ALL NULL NULL NULL NULL 2
test_sequence
--- 1.61/ndb/src/mgmsrv/ConfigInfo.cpp 2005-05-26 13:07:29 -07:00
+++ 1.62/ndb/src/mgmsrv/ConfigInfo.cpp 2005-07-19 10:42:23 -07:00
@@ -62,8 +62,6 @@
DB_TOKEN,
MGM_TOKEN,
API_TOKEN,
- "REP",
- "EXTERNAL REP",
"TCP",
"SCI",
@@ -100,6 +98,7 @@
static bool fixFileSystemPath(InitConfigFileParser::Context & ctx, const char * data);
static bool fixBackupDataDir(InitConfigFileParser::Context & ctx, const char * data);
static bool fixShmUniqueId(InitConfigFileParser::Context & ctx, const char * data);
+static bool checkLocalhostHostnameMix(InitConfigFileParser::Context & ctx, const char * data);
const ConfigInfo::SectionRule
ConfigInfo::m_SectionRules[] = {
@@ -110,8 +109,6 @@
{ DB_TOKEN, transformNode, 0 },
{ API_TOKEN, transformNode, 0 },
{ MGM_TOKEN, transformNode, 0 },
- { "REP", transformNode, 0 },
- { "EXTERNAL REP", transformExtNode, 0 },
{ MGM_TOKEN, fixShmUniqueId, 0 },
@@ -128,8 +125,6 @@
{ DB_TOKEN, fixNodeHostname, 0 },
{ API_TOKEN, fixNodeHostname, 0 },
{ MGM_TOKEN, fixNodeHostname, 0 },
- { "REP", fixNodeHostname, 0 },
- //{ "EXTERNAL REP", fixNodeHostname, 0 },
{ "TCP", fixNodeId, "NodeId1" },
{ "TCP", fixNodeId, "NodeId2" },
@@ -168,6 +163,10 @@
{ "*", fixDepricated, 0 },
{ "*", applyDefaultValues, "system" },
+ { DB_TOKEN, checkLocalhostHostnameMix, 0 },
+ { API_TOKEN, checkLocalhostHostnameMix, 0 },
+ { MGM_TOKEN, checkLocalhostHostnameMix, 0 },
+
{ DB_TOKEN, fixFileSystemPath, 0 },
{ DB_TOKEN, fixBackupDataDir, 0 },
@@ -193,7 +192,6 @@
{ DB_TOKEN, saveInConfigValues, 0 },
{ API_TOKEN, saveInConfigValues, 0 },
{ MGM_TOKEN, saveInConfigValues, 0 },
- { "REP", saveInConfigValues, 0 },
{ "TCP", saveInConfigValues, 0 },
{ "SHM", saveInConfigValues, 0 },
@@ -345,17 +343,6 @@
0, 0 },
{
- CFG_SYS_REPLICATION_ROLE,
- "ReplicationRole",
- "SYSTEM",
- "Role in Global Replication (None, Primary, or Standby)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
CFG_SYS_PRIMARY_MGM_NODE,
"PrimaryMGMNode",
"SYSTEM",
@@ -402,7 +389,7 @@
ConfigInfo::CI_INTERNAL,
false,
ConfigInfo::CI_STRING,
- UNDEFINED,
+ "localhost",
0, 0 },
{
@@ -1219,78 +1206,6 @@
STR_VALUE(MAX_INT_RNIL) },
/***************************************************************************
- * REP
- ***************************************************************************/
- {
- CFG_SECTION_NODE,
- "REP",
- "REP",
- "Node section",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_SECTION,
- (const char *)NODE_TYPE_REP,
- 0, 0
- },
-
- {
- CFG_NODE_HOST,
- "HostName",
- "REP",
- "Name of computer for this node",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_NODE_SYSTEM,
- "System",
- "REP",
- "Name of system for this node",
- ConfigInfo::CI_INTERNAL,
- false,
- ConfigInfo::CI_STRING,
- UNDEFINED,
- 0, 0 },
-
- {
- CFG_NODE_ID,
- "Id",
- "REP",
- "Number identifying replication node (REP)",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_INT,
- MANDATORY,
- "1",
- STR_VALUE(MAX_NODES) },
-
- {
- KEY_INTERNAL,
- "ExecuteOnComputer",
- "REP",
- "String referencing an earlier defined COMPUTER",
- ConfigInfo::CI_USED,
- false,
- ConfigInfo::CI_STRING,
- MANDATORY,
- 0, 0 },
-
- {
- CFG_REP_HEARTBEAT_INTERVAL,
- "HeartbeatIntervalRepRep",
- "REP",
- "Time between REP-REP heartbeats. Connection closed after 3 missed HBs",
- ConfigInfo::CI_USED,
- true,
- ConfigInfo::CI_INT,
- "3000",
- "100",
- STR_VALUE(MAX_INT_RNIL) },
-
- /***************************************************************************
* API
***************************************************************************/
{
@@ -1313,7 +1228,7 @@
ConfigInfo::CI_INTERNAL,
false,
ConfigInfo::CI_STRING,
- UNDEFINED,
+ "",
0, 0 },
{
@@ -1433,7 +1348,7 @@
ConfigInfo::CI_INTERNAL,
false,
ConfigInfo::CI_STRING,
- UNDEFINED,
+ "",
0, 0 },
{
@@ -2464,7 +2379,15 @@
}
const char*
-ConfigInfo::getAlias(const char * section) const {
+ConfigInfo::nameToAlias(const char * name) {
+ for (int i = 0; m_sectionNameAliases[i].name != 0; i++)
+ if(!strcasecmp(name, m_sectionNameAliases[i].name))
+ return m_sectionNameAliases[i].alias;
+ return 0;
+}
+
+const char*
+ConfigInfo::getAlias(const char * section) {
for (int i = 0; m_sectionNameAliases[i].name != 0; i++)
if(!strcasecmp(section, m_sectionNameAliases[i].alias))
return m_sectionNameAliases[i].name;
@@ -2623,7 +2546,7 @@
return true;
}
-static bool checkLocalhostHostnameMix(InitConfigFileParser::Context & ctx)
+static bool checkLocalhostHostnameMix(InitConfigFileParser::Context & ctx, const char * data)
{
DBUG_ENTER("checkLocalhostHostnameMix");
const char * hostname= 0;
@@ -2643,7 +2566,7 @@
}
if (localhost_used) {
- ctx.reportError("Mixing of localhost with other hostname(%s) is illegal",
+ ctx.reportError("Mixing of localhost (default for [NDBD]HostName) with other hostname(%s) is illegal",
hostname);
DBUG_RETURN(false);
}
@@ -2652,21 +2575,17 @@
}
bool
-fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data){
-
+fixNodeHostname(InitConfigFileParser::Context & ctx, const char * data)
+{
const char * hostname;
+ DBUG_ENTER("fixNodeHostname");
+
if (ctx.m_currentSection->get("HostName", &hostname))
- return checkLocalhostHostnameMix(ctx);
+ DBUG_RETURN(checkLocalhostHostnameMix(ctx,0));
const char * compId;
- if(!ctx.m_currentSection->get("ExecuteOnComputer", &compId)){
- const char * type;
- if(ctx.m_currentSection->get("Type", &type) && strcmp(type,DB_TOKEN) == 0)
- require(ctx.m_currentSection->put("HostName", "localhost"));
- else
- require(ctx.m_currentSection->put("HostName", ""));
- return checkLocalhostHostnameMix(ctx);
- }
+ if(!ctx.m_currentSection->get("ExecuteOnComputer", &compId))
+ DBUG_RETURN(true);
const Properties * computer;
char tmp[255];
@@ -2675,18 +2594,18 @@
ctx.reportError("Computer \"%s\" not declared"
"- [%s] starting at line: %d",
compId, ctx.fname, ctx.m_sectionLineno);
- return false;
+ DBUG_RETURN(false);
}
if(!computer->get("HostName", &hostname)){
ctx.reportError("HostName missing in [COMPUTER] (Id: %d) "
" - [%s] starting at line: %d",
compId, ctx.fname, ctx.m_sectionLineno);
- return false;
+ DBUG_RETURN(false);
}
require(ctx.m_currentSection->put("HostName", hostname));
- return checkLocalhostHostnameMix(ctx);
+ DBUG_RETURN(checkLocalhostHostnameMix(ctx,0));
}
bool
@@ -2870,7 +2789,7 @@
return true;
}
- return checkLocalhostHostnameMix(ctx);
+ return checkLocalhostHostnameMix(ctx,0);
}
/**
@@ -2878,7 +2797,9 @@
*/
void
applyDefaultValues(InitConfigFileParser::Context & ctx,
- const Properties * defaults){
+ const Properties * defaults)
+{
+ DBUG_ENTER("applyDefaultValues");
if(defaults != NULL){
Properties::Iterator it(defaults);
@@ -2891,26 +2812,58 @@
Uint32 val = 0;
::require(defaults->get(name, &val));
ctx.m_currentSection->put(name, val);
+ DBUG_PRINT("info",("%s=%d #default",name,val));
break;
}
case ConfigInfo::CI_INT64:{
Uint64 val = 0;
::require(defaults->get(name, &val));
ctx.m_currentSection->put64(name, val);
+ DBUG_PRINT("info",("%s=%lld #default",name,val));
break;
}
case ConfigInfo::CI_STRING:{
const char * val;
::require(defaults->get(name, &val));
ctx.m_currentSection->put(name, val);
+ DBUG_PRINT("info",("%s=%s #default",name,val));
break;
}
case ConfigInfo::CI_SECTION:
break;
}
}
+#ifndef DBUG_OFF
+ else
+ {
+ switch (ctx.m_info->getType(ctx.m_currentInfo, name)){
+ case ConfigInfo::CI_INT:
+ case ConfigInfo::CI_BOOL:{
+ Uint32 val = 0;
+ ::require(ctx.m_currentSection->get(name, &val));
+ DBUG_PRINT("info",("%s=%d",name,val));
+ break;
+ }
+ case ConfigInfo::CI_INT64:{
+ Uint64 val = 0;
+ ::require(ctx.m_currentSection->get(name, &val));
+ DBUG_PRINT("info",("%s=%lld",name,val));
+ break;
+ }
+ case ConfigInfo::CI_STRING:{
+ const char * val;
+ ::require(ctx.m_currentSection->get(name, &val));
+ DBUG_PRINT("info",("%s=%s",name,val));
+ break;
+ }
+ case ConfigInfo::CI_SECTION:
+ break;
+ }
+ }
+#endif
}
}
+ DBUG_VOID_RETURN;
}
bool
@@ -3482,6 +3435,8 @@
return true;
}
+extern int g_print_full_config;
+
static bool
saveInConfigValues(InitConfigFileParser::Context & ctx, const char * data){
const Properties * sec;
@@ -3503,6 +3458,12 @@
break;
}
+ if (g_print_full_config)
+ {
+ const char *alias= ConfigInfo::nameToAlias(ctx.fname);
+ printf("[%s]\n", alias ? alias : ctx.fname);
+ }
+
Uint32 no = 0;
ctx.m_userProperties.get("$Section", id, &no);
ctx.m_userProperties.put("$Section", id, no+1, true);
@@ -3530,18 +3491,24 @@
Uint32 val;
require(ctx.m_currentSection->get(n, &val));
ok = ctx.m_configValues.put(id, val);
+ if (g_print_full_config)
+ printf("%s=%u\n", n, val);
break;
}
case PropertiesType_Uint64:{
Uint64 val;
require(ctx.m_currentSection->get(n, &val));
ok = ctx.m_configValues.put64(id, val);
+ if (g_print_full_config)
+ printf("%s=%llu\n", n, val);
break;
}
case PropertiesType_char:{
const char * val;
require(ctx.m_currentSection->get(n, &val));
ok = ctx.m_configValues.put(id, val);
+ if (g_print_full_config)
+ printf("%s=%s\n", n, val);
break;
}
default:
--- 1.43/ndb/src/mgmsrv/main.cpp 2005-07-14 16:40:01 -07:00
+++ 1.44/ndb/src/mgmsrv/main.cpp 2005-07-19 10:42:23 -07:00
@@ -121,6 +121,7 @@
};
int g_no_nodeid_checks= 0;
+int g_print_full_config;
static MgmGlobals *glob= 0;
/******************************************************************************
@@ -147,6 +148,9 @@
{ "config-file", 'f', "Specify cluster configuration file",
(gptr*) &opt_config_filename, (gptr*) &opt_config_filename, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
+ { "print-full-config", 'P', "Print full config and exit",
+ (gptr*) &g_print_full_config, (gptr*) &g_print_full_config, 0,
+ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0 },
{ "daemon", 'd', "Run ndb_mgmd in daemon mode (default)",
(gptr*) &opt_daemon, (gptr*) &opt_daemon, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0 },
@@ -208,7 +212,8 @@
exit(ho_error);
if (opt_interactive ||
- opt_non_interactive) {
+ opt_non_interactive ||
+ g_print_full_config) {
opt_daemon= 0;
}
@@ -220,6 +225,9 @@
opt_config_filename,
opt_connect_str);
+ if (g_print_full_config)
+ goto the_end;
+
if (glob->mgmObject->init())
goto error_end;
@@ -358,6 +366,7 @@
glob->mgmObject->get_config_retriever()->disconnect();
glob->socketServer->stopSessions(true);
g_eventLogger.info("Shutdown complete");
+ the_end:
delete glob;
ndb_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
return 0;
--- 1.72/mysql-test/r/select.result 2005-07-18 13:49:14 -07:00
+++ 1.73/mysql-test/r/select.result 2005-07-19 10:42:23 -07:00
@@ -2781,7 +2781,26 @@
SELECT 50, 3, 3 FROM DUAL
WHERE NOT EXISTS
(SELECT * FROM t1 WHERE a = 50 AND b = 3);
+select found_rows();
+found_rows()
+0
SELECT * FROM t1;
a b c
50 3 3
+select count(*) from t1;
+count(*)
+1
+select found_rows();
+found_rows()
+1
+select count(*) from t1 limit 2,3;
+count(*)
+select found_rows();
+found_rows()
+0
+select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
+count(*)
+select found_rows();
+found_rows()
+1
DROP TABLE t1;
--- 1.57/mysql-test/t/select.test 2005-07-18 13:55:32 -07:00
+++ 1.58/mysql-test/t/select.test 2005-07-19 11:05:45 -07:00
@@ -2153,7 +2153,14 @@
WHERE K2C4 = 'WART' AND
(F2I4 = 2 AND K2C4 = 'WART' OR (F2I4 = 2 OR K4N4 = '0200'));
+select found_rows();
SELECT K2C4, K4N4, F2I4 FROM t1
+select count(*) from t1;
+select found_rows();
+select count(*) from t1 limit 2,3;
+select found_rows();
+select SQL_CALC_FOUND_ROWS count(*) from t1 limit 2,3;
+select found_rows();
WHERE K2C4 = 'WART' AND (K2C4 = 'WART' OR K4N4 = '0200');
DROP TABLE t1;
--- 1.96/include/my_global.h 2005-07-12 16:50:38 -07:00
+++ 1.97/include/my_global.h 2005-07-19 10:42:23 -07:00
@@ -1005,7 +1005,8 @@
#define float4get(V,M) do { *((long *) &(V)) = *((long*) (M)); } while(0)
#define float8get(V,M) doubleget((V),(M))
#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
-#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float))
+#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V),sizeof(float))
+#define floatget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(float))
#define float8store(V,M) doublestore((V),(M))
#endif /* __i386__ */
@@ -1176,7 +1177,8 @@
*(((char*)T)+1)=(((A) >> 16));\
*(((char*)T)+0)=(((A) >> 24)); } while(0)
-#define floatstore(T,V) memcpy_fixed((byte*)(T), (byte*)(&V), sizeof(float))
+#define floatget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float))
+#define floatstore(T,V) memcpy_fixed((byte*) (T),(byte*)(&V),sizeof(float))
#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong))
@@ -1191,7 +1193,8 @@
#define shortstore(T,V) int2store(T,V)
#define longstore(T,V) int4store(T,V)
#ifndef floatstore
-#define floatstore(T,V) memcpy_fixed((byte*)(T), (byte*)(&V), sizeof(float))
+#define floatstore(T,V) memcpy_fixed((byte*) (T),(byte*) (&V),sizeof(float))
+#define floatget(V,M) memcpy_fixed((byte*) &V, (byte*) (M), sizeof(float))
#endif
#ifndef doubleget
#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
--- 1.11/sql/des_key_file.cc 2005-07-12 16:50:38 -07:00
+++ 1.12/sql/des_key_file.cc 2005-07-19 10:42:23 -07:00
@@ -21,18 +21,6 @@
struct st_des_keyschedule des_keyschedule[10];
uint des_default_key;
-pthread_mutex_t LOCK_des_key_file;
-static int initialized= 0;
-
-void
-init_des_key_file()
-{
- if (!initialized)
- {
- initialized=1;
- pthread_mutex_init(&LOCK_des_key_file,MY_MUTEX_INIT_FAST);
- }
-}
/*
Function which loads DES keys from plaintext file into memory on MySQL
@@ -55,8 +43,6 @@
DBUG_ENTER("load_des_key_file");
DBUG_PRINT("enter",("name: %s",file_name));
- init_des_key_file();
-
VOID(pthread_mutex_lock(&LOCK_des_key_file));
if ((file=my_open(file_name,O_RDONLY | O_BINARY ,MYF(MY_WME))) < 0 ||
init_io_cache(&io, file, IO_SIZE*2, READ_CACHE, 0, 0, MYF(MY_WME)))
@@ -113,15 +99,4 @@
VOID(pthread_mutex_unlock(&LOCK_des_key_file));
DBUG_RETURN(result);
}
-
-
-void free_des_key_file()
-{
- if (initialized)
- {
- initialized= 01;
- pthread_mutex_destroy(&LOCK_des_key_file);
- }
-}
-
#endif /* HAVE_OPENSSL */
--- 1.140/sql/sql_prepare.cc 2005-07-18 13:49:15 -07:00
+++ 1.141/sql/sql_prepare.cc 2005-07-19 10:42:24 -07:00
@@ -319,7 +319,7 @@
return;
float4get(data,*pos);
#else
- data= *(float*) *pos;
+ floatget(data, *pos);
#endif
param->set_double((double) data);
*pos+= 4;
@@ -333,7 +333,7 @@
return;
float8get(data,*pos);
#else
- data= *(double*) *pos;
+ doubleget(data, *pos);
#endif
param->set_double((double) data);
*pos+= 8;
@@ -601,10 +601,8 @@
Item_param **begin= stmt->param_array;
Item_param **end= begin + stmt->param_count;
uint32 length= 0;
-
String str;
const String *res;
-
DBUG_ENTER("insert_params_withlog");
if (query->copy(stmt->query, stmt->query_length, default_charset_info))
--- 1.142/tests/mysql_client_test.c 2005-07-18 13:49:16 -07:00
+++ 1.143/tests/mysql_client_test.c 2005-07-19 10:42:25 -07:00
@@ -7457,7 +7457,7 @@
verify_prepare_field(result, 3, "type", "", MYSQL_TYPE_VAR_STRING,
"", "", "", 10, 0);
- verify_prepare_field(result, 4, "possible_keys", "", MYSQL_TYPE_VAR_STRING,
+ verify_prepare_field(result, 4, "possible_keys", "", MYSQL_TYPE_BLOB,
"", "", "", NAME_LEN*MAX_KEY, 0);
verify_prepare_field(result, 5, "key", "", MYSQL_TYPE_VAR_STRING,
@@ -7474,13 +7474,13 @@
"", "", NAME_LEN*MAX_KEY, 0);
}
- verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_VAR_STRING,
+ verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_BLOB,
"", "", "", NAME_LEN*16, 0);
verify_prepare_field(result, 8, "rows", "", MYSQL_TYPE_LONGLONG,
"", "", "", 10, 0);
- verify_prepare_field(result, 9, "Extra", "", MYSQL_TYPE_VAR_STRING,
+ verify_prepare_field(result, 9, "Extra", "", MYSQL_TYPE_BLOB,
"", "", "", 255, 0);
mysql_free_result(result);
| Thread |
|---|
| • bk commit into 5.0 tree (jimw:1.1951) | Jim Winstead | 19 Jul |