diff --git a/src/backends/mysql/statement.cpp b/src/backends/mysql/statement.cpp index cd901602d..33cdfc61f 100644 --- a/src/backends/mysql/statement.cpp +++ b/src/backends/mysql/statement.cpp @@ -402,45 +402,38 @@ int mysql_statement_backend::prepare_for_describe() } void mysql_statement_backend::describe_column(int colNum, - data_type & type, db_type & dbtype, std::string & columnName) + db_type & dbtype, std::string & columnName) { int pos = colNum - 1; MYSQL_FIELD *field = mysql_fetch_field_direct(result_, pos); switch (field->type) { case FIELD_TYPE_CHAR: //MYSQL_TYPE_TINY: - type = dt_integer; dbtype = field->flags & UNSIGNED_FLAG ? db_uint8 : db_int8; break; case FIELD_TYPE_SHORT: //MYSQL_TYPE_SHORT: - type = dt_integer; dbtype = field->flags & UNSIGNED_FLAG ? db_uint16 : db_int16; break; case FIELD_TYPE_INT24: //MYSQL_TYPE_INT24: - type = dt_integer; dbtype = field->flags & UNSIGNED_FLAG ? db_uint32 : db_int32; break; case FIELD_TYPE_LONG: //MYSQL_TYPE_LONG: if (field->flags & UNSIGNED_FLAG) { - type = dt_long_long; dbtype = db_uint32; } else { - type = dt_integer; dbtype = db_int32; } break; case FIELD_TYPE_LONGLONG: //MYSQL_TYPE_LONGLONG: if (field->flags & UNSIGNED_FLAG) { - type = dt_unsigned_long_long; dbtype = db_uint64; } else { - type = dt_long_long; dbtype = db_int64; } break; @@ -452,7 +445,6 @@ void mysql_statement_backend::describe_column(int colNum, // sends field type number 246, no matter which version of libraries // the client is using. case 246: //MYSQL_TYPE_NEWDECIMAL: - type = dt_double; dbtype = db_double; break; case FIELD_TYPE_TIMESTAMP: //MYSQL_TYPE_TIMESTAMP: @@ -461,7 +453,6 @@ void mysql_statement_backend::describe_column(int colNum, case FIELD_TYPE_DATETIME: //MYSQL_TYPE_DATETIME: case FIELD_TYPE_YEAR: //MYSQL_TYPE_YEAR: case FIELD_TYPE_NEWDATE: //MYSQL_TYPE_NEWDATE: - type = dt_date; dbtype = db_date; break; // case MYSQL_TYPE_VARCHAR: @@ -472,7 +463,6 @@ void mysql_statement_backend::describe_column(int colNum, case FIELD_TYPE_TINY_BLOB: case FIELD_TYPE_MEDIUM_BLOB: case FIELD_TYPE_LONG_BLOB: - type = dt_string; dbtype = db_string; break; default: