summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_report.c
diff options
context:
space:
mode:
authorGeorg Richter <georg@php.net>2003-12-22 16:56:14 +0000
committerGeorg Richter <georg@php.net>2003-12-22 16:56:14 +0000
commitba7d400fa1196059b5b99ff38756c9e680a25193 (patch)
tree26c2d7094197b715cd8d3822ac4c660a4e94c481 /ext/mysqli/mysqli_report.c
parentab29ed006cc14752bc130c003c810d39da6b0ae6 (diff)
downloadphp-git-ba7d400fa1196059b5b99ff38756c9e680a25193.tar.gz
fixed bug #26680
Diffstat (limited to 'ext/mysqli/mysqli_report.c')
-rw-r--r--ext/mysqli/mysqli_report.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c
index 61f154678d..6a31aa5e33 100644
--- a/ext/mysqli/mysqli_report.c
+++ b/ext/mysqli/mysqli_report.c
@@ -61,6 +61,7 @@ void php_mysqli_report_error(char *sqlstate, int errorno, char *error TSRMLS_DC)
void php_mysqli_report_index(char *query, unsigned int status TSRMLS_DC) {
char index[15];
+#if MYSQL_VERSION_ID > 40101
if (status & SERVER_QUERY_NO_GOOD_INDEX_USED) {
strcpy(index, "Bad index");
} else if (status & SERVER_QUERY_NO_INDEX_USED) {
@@ -68,6 +69,9 @@ void php_mysqli_report_index(char *query, unsigned int status TSRMLS_DC) {
} else {
return;
}
+#else
+ return;
+#endif
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s used in query %s", index, query);
}