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
drop table if exists t1,t2;
--enable_warnings
......
......@@ -5,7 +5,7 @@
# 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
# relevant).
let $N = 5;
let $N = 6;
#
# 2. Some subtests
# - create a new time zone
......
......@@ -2559,6 +2559,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
#endif
init_sigpipe_variables
DBUG_ENTER("mysql_real_connect");
LINT_INIT(pkt_scramble_len);
DBUG_PRINT("enter",("host: %s db: %s user: %s",
host ? host : "(Null)",
......
......@@ -600,6 +600,7 @@ engine_option_value *merge_engine_table_options(engine_option_value *first,
{
engine_option_value *end, *opt;
DBUG_ENTER("merge_engine_table_options");
LINT_INIT(end);
/* find last element */
if (first && second)
......
......@@ -699,6 +699,9 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
bool null_bits_are_used;
DBUG_ENTER("open_binary_frm");
LINT_INIT(options);
LINT_INIT(options_len);
new_field_pack_flag= head[27];
new_frm_ver= (head[2] - FRM_VER);
field_pack_length= new_frm_ver < 2 ? 11 : 17;
......@@ -1943,11 +1946,14 @@ bool unpack_vcol_info_from_frm(THD *thd,
CHARSET_INFO *old_character_set_client;
Query_arena *backup_stmt_arena_ptr;
Query_arena backup_arena;
Query_arena *vcol_arena;
Query_arena *vcol_arena= 0;
Parser_state parser_state;
DBUG_ENTER("unpack_vcol_info_from_frm");
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.
The string to be parsed has to be of the following format:
......@@ -1981,7 +1987,6 @@ bool unpack_vcol_info_from_frm(THD *thd,
/*
Step 2: Setup thd for parsing.
*/
backup_stmt_arena_ptr= thd->stmt_arena;
vcol_arena= table->expr_arena;
if (!vcol_arena)
{
......@@ -1996,7 +2001,6 @@ bool unpack_vcol_info_from_frm(THD *thd,
thd->stmt_arena= vcol_arena;
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.
......
......@@ -49,7 +49,7 @@
using namespace open_query;
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
{
......
......@@ -2616,7 +2616,7 @@ int ha_sphinx::get_rec ( byte * buf, const byte *, uint )
for ( uint32 i=0; i<m_iAttrs; i++ )
{
longlong iValue64;
longlong iValue64= 0;
uint32 uValue = UnpackDword ();
if ( m_dAttrs[i].m_uType == SPH_ATTR_BIGINT )
iValue64 = ( (longlong)uValue<<32 ) | UnpackDword();
......
......@@ -248,9 +248,9 @@ struct CSphUrl
CSphUrl()
: m_sBuffer ( NULL )
, m_sFormatted ( NULL )
, m_sScheme ( SPHINXSE_DEFAULT_SCHEME )
, m_sHost ( SPHINXSE_DEFAULT_HOST )
, m_sIndex ( SPHINXSE_DEFAULT_INDEX )
, m_sScheme ( (char*) SPHINXSE_DEFAULT_SCHEME )
, m_sHost ( (char*) SPHINXSE_DEFAULT_HOST )
, m_sIndex ( (char*) SPHINXSE_DEFAULT_INDEX )
, m_iPort ( SPHINXSE_DEFAULT_PORT )
{}
......@@ -306,12 +306,12 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen )
// unix-domain socket
m_iPort = 0;
if (!( m_sIndex = strrchr ( m_sHost, ':' ) ))
m_sIndex = SPHINXSE_DEFAULT_INDEX;
m_sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
else
{
*m_sIndex++ = '\0';
if ( !*m_sIndex )
m_sIndex = SPHINXSE_DEFAULT_INDEX;
m_sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
}
bOk = true;
break;
......@@ -331,7 +331,7 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen )
if ( m_sIndex )
*m_sIndex++ = '\0';
else
m_sIndex = SPHINXSE_DEFAULT_INDEX;
m_sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
m_iPort = atoi(sPort);
if ( !m_iPort )
......@@ -343,7 +343,7 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen )
if ( m_sIndex )
*m_sIndex++ = '\0';
else
m_sIndex = SPHINXSE_DEFAULT_INDEX;
m_sIndex = (char*) SPHINXSE_DEFAULT_INDEX;
}
bOk = true;
......@@ -422,7 +422,7 @@ int CSphUrl::Connect()
uint uServerVersion;
uint uClientVersion = htonl ( SPHINX_SEARCHD_PROTO );
int iSocket = -1;
char * pError = NULL;
const char * pError = NULL;
do
{
iSocket = socket ( iDomain, SOCK_STREAM, 0 );
......@@ -505,7 +505,7 @@ CSphResponse::Read ( int iSocket, int iClientVersion )
DWORD uLength = ntohl ( sphUnalignedRead ( *(DWORD *) &sHeader[4] ) );
if ( iVersion < iClientVersion ) // fixme: warn
;
{}
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