Skip to content

Commit

Permalink
Fixed compiler warnings and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
montywi committed Oct 9, 2015
1 parent b0935fc commit c696fc7
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin/feedback/url_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int Url::parse_proxy_server(const char *proxy_server, size_t proxy_length,
if (proxy_server == NULL)
return 0;

for (; proxy_length > 0 && isspace(*proxy_server);
for (; proxy_length > 0 && my_isspace(system_charset_info, *proxy_server);
proxy_server++, proxy_length--) /* no-op */;

if (proxy_length == 0)
Expand Down
29 changes: 29 additions & 0 deletions sql/sql_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Type_handler
type_handler_adjusted_to_max_octet_length(uint max_octet_length,
CHARSET_INFO *cs) const
{ return this; }
virtual ~Type_handler() {}
};


Expand All @@ -45,6 +46,7 @@ class Type_handler_real_result: public Type_handler
public:
Item_result result_type() const { return REAL_RESULT; }
Item_result cmp_type() const { return REAL_RESULT; }
virtual ~Type_handler_real_result() {}
};


Expand All @@ -53,6 +55,7 @@ class Type_handler_decimal_result: public Type_handler
public:
Item_result result_type() const { return DECIMAL_RESULT; }
Item_result cmp_type() const { return DECIMAL_RESULT; }
virtual ~Type_handler_decimal_result() {};
};


Expand All @@ -61,6 +64,7 @@ class Type_handler_int_result: public Type_handler
public:
Item_result result_type() const { return INT_RESULT; }
Item_result cmp_type() const { return INT_RESULT; }
virtual ~Type_handler_int_result() {}
};


Expand All @@ -69,6 +73,7 @@ class Type_handler_temporal_result: public Type_handler
public:
Item_result result_type() const { return STRING_RESULT; }
Item_result cmp_type() const { return TIME_RESULT; }
virtual ~Type_handler_temporal_result() {}
};


Expand All @@ -77,6 +82,7 @@ class Type_handler_string_result: public Type_handler
public:
Item_result result_type() const { return STRING_RESULT; }
Item_result cmp_type() const { return STRING_RESULT; }
virtual ~Type_handler_string_result() {}
const Type_handler *
type_handler_adjusted_to_max_octet_length(uint max_octet_length,
CHARSET_INFO *cs) const;
Expand Down Expand Up @@ -106,160 +112,183 @@ class Type_handler_string_result: public Type_handler
class Type_handler_tiny: public Type_handler_int_result
{
public:
virtual ~Type_handler_tiny() {}
enum_field_types field_type() const { return MYSQL_TYPE_TINY; }
};


class Type_handler_short: public Type_handler_int_result
{
public:
virtual ~Type_handler_short() {}
enum_field_types field_type() const { return MYSQL_TYPE_SHORT; }
};


class Type_handler_long: public Type_handler_int_result
{
public:
virtual ~Type_handler_long() {}
enum_field_types field_type() const { return MYSQL_TYPE_LONG; }
};


class Type_handler_longlong: public Type_handler_int_result
{
public:
virtual ~Type_handler_longlong() {}
enum_field_types field_type() const { return MYSQL_TYPE_LONGLONG; }
};


class Type_handler_int24: public Type_handler_int_result
{
public:
virtual ~Type_handler_int24() {}
enum_field_types field_type() const { return MYSQL_TYPE_INT24; }
};


class Type_handler_year: public Type_handler_int_result
{
public:
virtual ~Type_handler_year() {}
enum_field_types field_type() const { return MYSQL_TYPE_YEAR; }
};


class Type_handler_bit: public Type_handler_int_result
{
public:
virtual ~Type_handler_bit() {}
enum_field_types field_type() const { return MYSQL_TYPE_BIT; }
};


class Type_handler_float: public Type_handler_real_result
{
public:
virtual ~Type_handler_float() {}
enum_field_types field_type() const { return MYSQL_TYPE_FLOAT; }
};


class Type_handler_double: public Type_handler_real_result
{
public:
virtual ~Type_handler_double() {}
enum_field_types field_type() const { return MYSQL_TYPE_DOUBLE; }
};


class Type_handler_time: public Type_handler_temporal_result
{
public:
virtual ~Type_handler_time() {}
enum_field_types field_type() const { return MYSQL_TYPE_TIME; }
};


class Type_handler_date: public Type_handler_temporal_result
{
public:
virtual ~Type_handler_date() {}
enum_field_types field_type() const { return MYSQL_TYPE_DATE; }
};


class Type_handler_datetime: public Type_handler_temporal_result
{
public:
virtual ~Type_handler_datetime() {}
enum_field_types field_type() const { return MYSQL_TYPE_DATETIME; }
};


class Type_handler_timestamp: public Type_handler_temporal_result
{
public:
virtual ~Type_handler_timestamp() {}
enum_field_types field_type() const { return MYSQL_TYPE_TIMESTAMP; }
};


class Type_handler_olddecimal: public Type_handler_decimal_result
{
public:
virtual ~Type_handler_olddecimal() {}
enum_field_types field_type() const { return MYSQL_TYPE_DECIMAL; }
};


class Type_handler_newdecimal: public Type_handler_decimal_result
{
public:
virtual ~Type_handler_newdecimal() {}
enum_field_types field_type() const { return MYSQL_TYPE_NEWDECIMAL; }
};


class Type_handler_null: public Type_handler_string_result
{
public:
virtual ~Type_handler_null() {}
enum_field_types field_type() const { return MYSQL_TYPE_NULL; }
};


class Type_handler_string: public Type_handler_string_result
{
public:
virtual ~Type_handler_string() {}
enum_field_types field_type() const { return MYSQL_TYPE_STRING; }
};


class Type_handler_varchar: public Type_handler_string_result
{
public:
virtual ~Type_handler_varchar() {}
enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; }
};


class Type_handler_tiny_blob: public Type_handler_string_result
{
public:
virtual ~Type_handler_tiny_blob() {}
enum_field_types field_type() const { return MYSQL_TYPE_TINY_BLOB; }
};


class Type_handler_medium_blob: public Type_handler_string_result
{
public:
virtual ~Type_handler_medium_blob() {}
enum_field_types field_type() const { return MYSQL_TYPE_MEDIUM_BLOB; }
};


class Type_handler_long_blob: public Type_handler_string_result
{
public:
virtual ~Type_handler_long_blob() {}
enum_field_types field_type() const { return MYSQL_TYPE_LONG_BLOB; }
};


class Type_handler_blob: public Type_handler_string_result
{
public:
virtual ~Type_handler_blob() {}
enum_field_types field_type() const { return MYSQL_TYPE_BLOB; }
};


class Type_handler_geometry: public Type_handler_string_result
{
public:
virtual ~Type_handler_geometry() {}
enum_field_types field_type() const { return MYSQL_TYPE_GEOMETRY; }
};

Expand Down
2 changes: 1 addition & 1 deletion storage/connect/ha_connect.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ int GetIntegerTableOption(PGLOBAL g, PTOS options, char *opname, int idef)
else if (!stricmp(opname, "Compressed"))
opval= (options->compressed);

if (opval == (ulonglong)NO_IVAL) {
if ((ulonglong) opval == (ulonglong)NO_IVAL) {
char *pv;

if ((pv= GetListOption(g, opname, options->oplist)))
Expand Down

0 comments on commit c696fc7

Please sign in to comment.