return 1;
}
-static int mysql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC)
+static long mysql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC)
{
pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
if (mysql_real_query(H->server, sql, sql_len)) {
pdo_mysql_error(H);
- return 0;
+ return -1;
} else {
- return 1;
+ return mysql_affected_rows(H->server);
}
}
-static long pdo_mysql_affected_rows(pdo_dbh_t *dbh TSRMLS_DC)
-{
- pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
- my_ulonglong afr = mysql_affected_rows(H->server);
-
- return afr == (my_ulonglong) - 1 ? 0 : (long) afr;
-}
-
static long pdo_mysql_last_insert_id(pdo_dbh_t *dbh TSRMLS_DC)
{
pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
NULL,
NULL,
NULL,
- pdo_mysql_affected_rows,
pdo_mysql_last_insert_id
};