Subject: | Stub mysql_warning_count() for MySQL < 4.1 |
The mysql_warning_count() function was added in MySQL 4.1, and
DBD-mysql 4.004 compiles, but fails to load, on MySQL 4.0.x.
This patch should fix the problem; it is also available at
http://devel.ringlet.net/db/DBD-mysql/
Subject: | mysql-warning-count-4.004.patch |
Index: dbdimp.h
===================================================================
--- dbdimp.h (revision 1182)
+++ dbdimp.h (revision 1185)
@@ -29,6 +29,7 @@
* statements as opposed to emulation in the driver
*/
#define SQL_STATE_VERSION 40101
+#define WARNING_COUNT_VERSION 40101
#define FIELD_CHARSETNR_VERSION 40101 /* should equivalent to 4.1.0 */
#define MULTIPLE_RESULT_SET_VERSION 40102
#define SERVER_PREPARE_VERSION 40103
@@ -42,8 +43,12 @@
#define mysql_sqlstate(svsock) (NULL)
#endif
+#if MYSQL_VERSION_ID < WARNING_COUNT_VERSION
+#define mysql_warning_count(svscok) 0
+#endif
+
/*
* The following are return codes passed in $h->err in case of
* errors by DBD::mysql.