Skip to content

Commit cf53555

Browse files
Cleanups (comments and compiler warnings)
dded init of variable to fix core dump on startup errors
1 parent dba8259 commit cf53555

9 files changed

Lines changed: 36 additions & 16 deletions

File tree

BitKeeper/etc/logging_ok

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ [email protected]
7575
monty@mashka.(none)
7676
7777
78+
7879
monty@narttu.
7980
8081
monty@rescue.

mysql-test/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ SUFFIXES = .sh
7373
-e 's!@''PERL''@!@PERL@!' \
7474
-e 's!@''VERSION''@!@VERSION@!' \
7575
-e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
76+
-e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
7677
-e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
7778
-e 's!@''MYSQL_SERVER_SUFFIX''@!@MYSQL_SERVER_SUFFIX@!' \
7879
$< > $@-t

mysql-test/mysql-test-run.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ VERBOSE=""
1515
USE_MANAGER=0
1616
MY_TZ=GMT-3
1717
TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work
18+
LOCAL_SOCKET=@MYSQL_UNIX_ADDR@
1819

1920
# For query_cache test
2021
ulimit -n 1024
@@ -226,7 +227,7 @@ while test $# -gt 0; do
226227
--slave-binary=*)
227228
SLAVE_MYSQLD=`$ECHO "$1" | $SED -e "s;--slave-binary=;;"` ;;
228229
--local) USE_RUNNING_SERVER="" ;;
229-
--extern) USE_RUNNING_SERVER="1" ;;
230+
--extern) USE_RUNNING_SERVER="1" ;;
230231
--tmpdir=*) MYSQL_TMP_DIR=`$ECHO "$1" | $SED -e "s;--tmpdir=;;"` ;;
231232
--local-master)
232233
MASTER_MYPORT=3306;
@@ -256,6 +257,7 @@ while test $# -gt 0; do
256257
--start-and-exit)
257258
START_AND_EXIT=1
258259
;;
260+
--socket=*) LOCAL_SOCKET=`$ECHO "$1" | $SED -e "s;--socket=;;"` ;;
259261
--skip-rpl) NO_SLAVE=1 ;;
260262
--skip-test=*) SKIP_TEST=`$ECHO "$1" | $SED -e "s;--skip-test=;;"`;;
261263
--do-test=*) DO_TEST=`$ECHO "$1" | $SED -e "s;--do-test=;;"`;;
@@ -501,7 +503,7 @@ then
501503
fi
502504
if [ -n "$USE_RUNNING_SERVER" ]
503505
then
504-
MASTER_MYSOCK="/tmp/mysql.sock"
506+
MASTER_MYSOCK=$LOCAL_SOCKET;
505507
DBUSER=${DBUSER:-test}
506508
else
507509
DBUSER=${DBUSER:-root} # We want to do FLUSH xxx commands

sql/derror.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ Check that the above file is the right version for this program!",
136136
if (file != FERR)
137137
VOID(my_close(file,MYF(MY_WME)));
138138
unireg_abort(1);
139+
return 1;
139140
} /* read_texts */
140141

141142

sql/mysql_priv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
1616

1717
#include <my_global.h>
18+
#include <assert.h>
1819
#include <mysql_version.h>
1920
#include <mysql_embed.h>
2021
#include <my_sys.h>
@@ -24,7 +25,6 @@
2425
#include <thr_lock.h>
2526
#include <my_base.h> /* Needed by field.h */
2627
#include <sql_bitmap.h>
27-
#include <assert.h>
2828

2929
#ifdef __EMX__
3030
#undef write /* remove pthread.h macro definition for EMX */

sql/mysqld.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,7 @@ extern "C" int my_message_sql(uint error, const char *str,
18841884
if ((thd= current_thd))
18851885
{
18861886
/*
1887-
thd->lex.current_select equel to zero if lex structure is not inited
1887+
thd->lex.current_select == 0 if lex structure is not inited
18881888
(not query command (COM_QUERY))
18891889
*/
18901890
if (thd->lex.current_select &&

sql/sql_bitmap.h

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1-
#include <my_global.h>
2-
//#include <mysql_version.h>
3-
//#include <mysql_embed.h>
4-
//#include <my_sys.h>
5-
//#include <m_string.h>
6-
//#include <hash.h>
7-
//#include <signal.h>
8-
//#include <thr_lock.h>
9-
//#include <my_base.h>
1+
/* Copyright (C) 2003 MySQL AB
2+
3+
This program is free software; you can redistribute it and/or modify
4+
it under the terms of the GNU General Public License as published by
5+
the Free Software Foundation; either version 2 of the License, or
6+
(at your option) any later version.
7+
8+
This program is distributed in the hope that it will be useful,
9+
but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
GNU General Public License for more details.
12+
13+
You should have received a copy of the GNU General Public License
14+
along with this program; if not, write to the Free Software
15+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16+
17+
/*
18+
Implementation of a bitmap type.
19+
The idea with this is to be able to handle any constant number of bits but
20+
also be able to use 32 or 64 bits bitmaps very efficiently
21+
*/
22+
1023
#include <my_bitmap.h>
11-
#include <assert.h>
1224

1325
template <uint default_width> class Bitmap
1426
{

sql/sql_class.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ THD::THD():user_time(0), is_fatal_error(0),
102102
lock=locked_tables=0;
103103
used_tables=0;
104104
cuted_fields= sent_row_count= current_stmt_id= 0L;
105+
// Must be reset to handle error with THD's created for init of mysqld
106+
lex.current_select= 0;
105107
start_time=(time_t) 0;
106108
current_linfo = 0;
107109
slave_thread = 0;

sql/sql_test.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,11 @@ TEST_join(JOIN *join)
164164
{
165165
JOIN_TAB *tab=join->join_tab+i;
166166
TABLE *form=tab->table;
167-
fprintf(DBUG_FILE,"%-16.16s type: %-7s q_keys: %4d refs: %d key: %d len: %d\n",
167+
char key_map_buff[128];
168+
fprintf(DBUG_FILE,"%-16.16s type: %-7s q_keys: %s refs: %d key: %d len: %d\n",
168169
form->table_name,
169170
join_type_str[tab->type],
170-
tab->keys,
171+
tab->keys.print(key_map_buff),
171172
tab->ref.key_parts,
172173
tab->ref.key,
173174
tab->ref.key_length);

0 commit comments

Comments
 (0)