diff --git a/dbdimp.c b/dbdimp.c index 9b8b313..fa628b0 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -1979,6 +1979,9 @@ MYSQL *mysql_dr_connect( if (result) { +#if MYSQL_VERSION_ID >= 50013 + my_bool reconnect=1; +#endif #if MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION /* connection succeeded. */ /* imp_dbh == NULL when mysql_dr_connect() is called from mysql.xs @@ -1997,7 +2000,11 @@ MYSQL *mysql_dr_connect( we turn off Mysql's auto reconnect and handle re-connecting ourselves so that we can keep track of when this happens. */ +#if MYSQL_VERSION_ID >= 50013 + mysql_options(result, MYSQL_OPT_RECONNECT, &reconnect); +#else result->reconnect=0; +#endif } else { /* diff --git a/dbdimp.h b/dbdimp.h index 935256e..3a5fcaa 100644 --- a/dbdimp.h +++ b/dbdimp.h @@ -20,6 +20,7 @@ #include /* installed by the DBI module */ #include /* Comes with MySQL-devel */ #include /* Comes MySQL */ +#include /* For MYSQL_VERSION_ID */ #include /* Comes with MySQL-devel */