Commit 13141c98 authored by Michael Widenius's avatar Michael Widenius

Fixed compiler warnings and test failures

parent d042146e
--source include/have_ucs2.inc
--disable_warnings --disable_warnings
drop table if exists t1,t2; drop table if exists t1,t2;
--enable_warnings --enable_warnings
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
# to wait for operation to complete. Should be positive. Test runs # to wait for operation to complete. Should be positive. Test runs
# about 25*N seconds (it sleeps most of the time, so CPU speed is not # about 25*N seconds (it sleeps most of the time, so CPU speed is not
# relevant). # relevant).
let $N = 5; let $N = 6;
# #
# 2. Some subtests # 2. Some subtests
# - create a new time zone # - create a new time zone
......
...@@ -2559,6 +2559,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, ...@@ -2559,6 +2559,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
#endif #endif
init_sigpipe_variables init_sigpipe_variables
DBUG_ENTER("mysql_real_connect"); DBUG_ENTER("mysql_real_connect");
LINT_INIT(pkt_scramble_len);
DBUG_PRINT("enter",("host: %s db: %s user: %s", DBUG_PRINT("enter",("host: %s db: %s user: %s",
host ? host : "(Null)", host ? host : "(Null)",
......
...@@ -600,6 +600,7 @@ engine_option_value *merge_engine_table_options(engine_option_value *first, ...@@ -600,6 +600,7 @@ engine_option_value *merge_engine_table_options(engine_option_value *first,
{ {
engine_option_value *end, *opt; engine_option_value *end, *opt;
DBUG_ENTER("merge_engine_table_options"); DBUG_ENTER("merge_engine_table_options");
LINT_INIT(end);
/* find last element */ /* find last element */
if (first && second) if (first && second)
......
...@@ -699,6 +699,9 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, ...@@ -699,6 +699,9 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
bool null_bits_are_used; bool null_bits_are_used;
DBUG_ENTER("open_binary_frm"); DBUG_ENTER("open_binary_frm");
LINT_INIT(options);
LINT_INIT(options_len);
new_field_pack_flag= head[27]; new_field_pack_flag= head[27];
new_frm_ver= (head[2] - FRM_VER); new_frm_ver= (head[2] - FRM_VER);
field_pack_length= new_frm_ver < 2 ? 11 : 17; field_pack_length= new_frm_ver < 2 ? 11 : 17;
...@@ -1943,11 +1946,14 @@ bool unpack_vcol_info_from_frm(THD *thd, ...@@ -1943,11 +1946,14 @@ bool unpack_vcol_info_from_frm(THD *thd,
CHARSET_INFO *old_character_set_client; CHARSET_INFO *old_character_set_client;
Query_arena *backup_stmt_arena_ptr; Query_arena *backup_stmt_arena_ptr;
Query_arena backup_arena; Query_arena backup_arena;
Query_arena *vcol_arena; Query_arena *vcol_arena= 0;
Parser_state parser_state; Parser_state parser_state;
DBUG_ENTER("unpack_vcol_info_from_frm"); DBUG_ENTER("unpack_vcol_info_from_frm");
DBUG_ASSERT(vcol_expr); DBUG_ASSERT(vcol_expr);
old_character_set_client= thd->variables.character_set_client;
backup_stmt_arena_ptr= thd->stmt_arena;
/* /*
Step 1: Construct the input string for the parser. Step 1: Construct the input string for the parser.
The string to be parsed has to be of the following format: The string to be parsed has to be of the following format:
...@@ -1981,7 +1987,6 @@ bool unpack_vcol_info_from_frm(THD *thd, ...@@ -1981,7 +1987,6 @@ bool unpack_vcol_info_from_frm(THD *thd,
/* /*
Step 2: Setup thd for parsing. Step 2: Setup thd for parsing.
*/ */
backup_stmt_arena_ptr= thd->stmt_arena;
vcol_arena= table->expr_arena; vcol_arena= table->expr_arena;
if (!vcol_arena) if (!vcol_arena)
{ {
...@@ -1996,7 +2001,6 @@ bool unpack_vcol_info_from_frm(THD *thd, ...@@ -1996,7 +2001,6 @@ bool unpack_vcol_info_from_frm(THD *thd,
thd->stmt_arena= vcol_arena; thd->stmt_arena= vcol_arena;
thd->lex->parse_vcol_expr= TRUE; thd->lex->parse_vcol_expr= TRUE;
old_character_set_client= thd->variables.character_set_client;
/* /*
Step 3: Use the parser to build an Item object from vcol_expr_str. Step 3: Use the parser to build an Item object from vcol_expr_str.
......
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
using namespace open_query; using namespace open_query;
using namespace boost; using namespace boost;
static const row empty_row = { 0 }; static const row empty_row = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
namespace open_query namespace open_query
{ {
......
...@@ -2616,7 +2616,7 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint ) ...@@ -2616,7 +2616,7 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint )
for ( uint32 i=0; i<m_iAttrs; i++ ) for ( uint32 i=0; i<m_iAttrs; i++ )
{ {
longlong iValue64; longlong iValue64= 0;
uint32 uValue = UnpackDword (); uint32 uValue = UnpackDword ();
if ( m_dAttrs[i].m_uType == SPH_ATTR_BIGINT ) if ( m_dAttrs[i].m_uType == SPH_ATTR_BIGINT )
iValue64 = ( (longlong)uValue<<32 ) | UnpackDword(); iValue64 = ( (longlong)uValue<<32 ) | UnpackDword();
......
...@@ -248,9 +248,9 @@ struct CSphUrl ...@@ -248,9 +248,9 @@ struct CSphUrl
CSphUrl() CSphUrl()
: m_sBuffer ( NULL ) : m_sBuffer ( NULL )
, m_sFormatted ( NULL ) , m_sFormatted ( NULL )
, m_sScheme ( SPHINXSE_DEFAULT_SCHEME ) , m_sScheme ( (char*) SPHINXSE_DEFAULT_SCHEME )
, m_sHost ( SPHINXSE_DEFAULT_HOST ) , m_sHost ( (char*) SPHINXSE_DEFAULT_HOST )
, m_sIndex ( SPHINXSE_DEFAULT_INDEX ) , m_sIndex ( (char*) SPHINXSE_DEFAULT_INDEX )
, m_iPort ( SPHINXSE_DEFAULT_PORT ) , m_iPort ( SPHINXSE_DEFAULT_PORT )
{} {}
...@@ -306,12 +306,12 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen ) ...@@ -306,12 +306,12 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen )
// unix-domain socket // unix-domain socket
m_iPort = 0; m_iPort = 0;
if (!( m_sIndex = strrchr ( m_sHost, ':' ) )) if (!( m_sIndex = strrchr ( m_sHost, ':' ) ))
m_sIndex = SPHINXSE_DEFAULT_INDEX; m_sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
else else
{ {
*m_sIndex++ = '\0'; *m_sIndex++ = '\0';
if ( !*m_sIndex ) if ( !*m_sIndex )
m_sIndex = SPHINXSE_DEFAULT_INDEX; m_sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
} }
bOk = true; bOk = true;
break; break;
...@@ -331,7 +331,7 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen ) ...@@ -331,7 +331,7 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen )
if ( m_sIndex ) if ( m_sIndex )
*m_sIndex++ = '\0'; *m_sIndex++ = '\0';
else else
m_sIndex = SPHINXSE_DEFAULT_INDEX; m_sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
m_iPort = atoi(sPort); m_iPort = atoi(sPort);
if ( !m_iPort ) if ( !m_iPort )
...@@ -343,7 +343,7 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen ) ...@@ -343,7 +343,7 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen )
if ( m_sIndex ) if ( m_sIndex )
*m_sIndex++ = '\0'; *m_sIndex++ = '\0';
else else
m_sIndex = SPHINXSE_DEFAULT_INDEX; m_sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
} }
bOk = true; bOk = true;
...@@ -422,7 +422,7 @@ int CSphUrl::Connect() ...@@ -422,7 +422,7 @@ int CSphUrl::Connect()
uint uServerVersion; uint uServerVersion;
uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO ); uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO );
int iSocket = -1; int iSocket = -1;
char * pError = NULL; const char * pError = NULL;
do do
{ {
iSocket = socket ( iDomain, SOCK_STREAM, 0 ); iSocket = socket ( iDomain, SOCK_STREAM, 0 );
...@@ -505,7 +505,7 @@ CSphResponse::Read ( int iSocket, int iClientVersion ) ...@@ -505,7 +505,7 @@ CSphResponse::Read ( int iSocket, int iClientVersion )
DWORD uLength = ntohl ( sphUnalignedRead ( *(DWORD *) &sHeader[4] ) ); DWORD uLength = ntohl ( sphUnalignedRead ( *(DWORD *) &sHeader[4] ) );
if ( iVersion < iClientVersion ) // fixme: warn if ( iVersion < iClientVersion ) // fixme: warn
; {}
if ( uLength <= SPHINXSE_MAX_ALLOC ) if ( uLength <= SPHINXSE_MAX_ALLOC )
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment