Hi Stewart,
You took a bit too much out, the Drizzle specific types need to match
up with the meta types used by both MySQL. The patch should look like:
=== modified file 'libdrizzle/column.c'
--- libdrizzle/column.c 2009-07-01 02:12:22 +0000
+++ libdrizzle/column.c 2009-09-30 07:13:16 +0000
@@ -21,7 +21,6 @@
static drizzle_column_type_t _column_type_drizzle_map_to[]=
{
- DRIZZLE_COLUMN_TYPE_TINY,
DRIZZLE_COLUMN_TYPE_LONG,
DRIZZLE_COLUMN_TYPE_DOUBLE,
DRIZZLE_COLUMN_TYPE_NULL,
@@ -38,7 +37,7 @@
static drizzle_column_type_drizzle_t _column_type_drizzle_map_from[]=
{
DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX, /* 0 */
- DRIZZLE_COLUMN_TYPE_DRIZZLE_TINY,
+ DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX,
DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX,
DRIZZLE_COLUMN_TYPE_DRIZZLE_LONG,
DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX,
=== modified file 'libdrizzle/constants.h'
--- libdrizzle/constants.h 2009-07-02 04:21:09 +0000
+++ libdrizzle/constants.h 2009-09-30 07:12:54 +0000
@@ -368,7 +368,6 @@
*/
typedef enum
{
- DRIZZLE_COLUMN_TYPE_DRIZZLE_TINY,
DRIZZLE_COLUMN_TYPE_DRIZZLE_LONG,
DRIZZLE_COLUMN_TYPE_DRIZZLE_DOUBLE,
DRIZZLE_COLUMN_TYPE_DRIZZLE_NULL,
I'll push this out in the next version of libdrizzle. When do you
expect your dependent changes to hit trunk?
-Eric
On Sat, Sep 26, 2009 at 01:33:54PM +1000, Stewart Smith wrote:
> I have a patch that removes the last bits of TINYINT from Drizzle (as
> since pack_flag is gone, it's now possible to do that). There also needs
> to be an associated patch to libdrizzle so that the mapping of types is
> correct between server and client (otherwise, funnily enough, the
> drizzledump test fails).
>
> Here's the patch for libdrizzle, but I'm not sure if I'm breaking
> anything else by doing this (e.g. MySQL support). Is this the right
> approach?
>
> === modified file 'libdrizzle/column.c'
> --- libdrizzle/column.c 2009-07-01 02:12:22 +0000
> +++ libdrizzle/column.c 2009-09-25 03:46:31 +0000
> @@ -21,7 +21,6 @@
>
> static drizzle_column_type_t _column_type_drizzle_map_to[]=
> {
> - DRIZZLE_COLUMN_TYPE_TINY,
> DRIZZLE_COLUMN_TYPE_LONG,
> DRIZZLE_COLUMN_TYPE_DOUBLE,
> DRIZZLE_COLUMN_TYPE_NULL,
> @@ -38,8 +37,6 @@ static drizzle_column_type_t _column_typ
> static drizzle_column_type_drizzle_t _column_type_drizzle_map_from[]=
> {
> DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX, /* 0 */
> - DRIZZLE_COLUMN_TYPE_DRIZZLE_TINY,
> - DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX,
> DRIZZLE_COLUMN_TYPE_DRIZZLE_LONG,
> DRIZZLE_COLUMN_TYPE_DRIZZLE_MAX,
> DRIZZLE_COLUMN_TYPE_DRIZZLE_DOUBLE,
>
> === modified file 'libdrizzle/constants.h'
> --- libdrizzle/constants.h 2009-07-02 04:21:09 +0000
> +++ libdrizzle/constants.h 2009-09-25 03:46:19 +0000
> @@ -97,7 +97,6 @@ typedef enum
> /* Temporary until we remove DRIZZLE_RETURN_SERVER_GONE references. */
> #define DRIZZLE_RETURN_SERVER_GONE DRIZZLE_RETURN_LOST_CONNECTION
> #define DRIZZLE_RETURN_EOF DRIZZLE_RETURN_LOST_CONNECTION
> -#define DRIZZLE_COLUMN_TYPE_VIRTUAL 17
>
> /* Function types. */
> typedef drizzle_return_t (drizzle_state_fn)(drizzle_con_st *con);
> @@ -334,7 +333,6 @@ typedef enum
> typedef enum
> {
> DRIZZLE_COLUMN_TYPE_DECIMAL,
> - DRIZZLE_COLUMN_TYPE_TINY,
> DRIZZLE_COLUMN_TYPE_SHORT,
> DRIZZLE_COLUMN_TYPE_LONG,
> DRIZZLE_COLUMN_TYPE_FLOAT,
> @@ -368,7 +366,6 @@ typedef enum
> */
> typedef enum
> {
> - DRIZZLE_COLUMN_TYPE_DRIZZLE_TINY,
> DRIZZLE_COLUMN_TYPE_DRIZZLE_LONG,
> DRIZZLE_COLUMN_TYPE_DRIZZLE_DOUBLE,
> DRIZZLE_COLUMN_TYPE_DRIZZLE_NULL,
>
>
> --
> Stewart Smith
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp