| List: | MySQL and Perl | « Previous MessageNext Message » | |
| From: | Jochen Wiedmann | Date: | May 1 2002 8:45pm |
| Subject: | Re: DBD::mysql "fetch() without execute()" error | ||
| View as plain text | |||
Hi, Steve,
I've been reading your patch. Considering the idea
and the patch that Jay has supplied earlier tonight
I suggest that you try whether the following works
as well. If it does, we might leave the detection
of a fetch without execute unchanged.
Regards,
Jochen
--- dbdimp.c.orig Wed May 1 20:41:41 2002
+++ dbdimp.c Wed May 1 20:43:23 2002
@@ -1350,12 +1350,16 @@
Safefree(salloc);
/** Store the result from the Query */
- if (!(*cdaPtr = (use_mysql_use_result ?
- mysql_use_result(svsock) : mysql_store_result(svsock)))) {
+ *cdaPtr = use_mysql_use_result ?
+ mysql_use_result(svsock) : mysql_store_result(svsock);
+ if (mysql_errno(svsock)) {
+ do_error(h, mysql_errno(svsock), mysql_error(svsock));
+ }
+ if (!*cdaPtr) {
return mysql_affected_rows(svsock);
+ } else {
+ return mysql_num_rows(*cdaPtr);
}
-
- return mysql_num_rows((*cdaPtr));
}
| Thread | ||
|---|---|---|
| • DBD::mysql "fetch() without execute()" error | Steve Hay | 1 May |
| • Re: DBD::mysql "fetch() without execute()" error | Chuck O'Donnell | 1 May |
| • Re: DBD::mysql "fetch() without execute()" error | Jay Lawrence | 1 May |
| • Re: DBD::mysql "fetch() without execute()" error | Steve Hay | 1 May |
| • Re: DBD::mysql "fetch() without execute()" error | Jochen Wiedmann | 1 May |
| • Re: DBD::mysql "fetch() without execute()" error | Steve Hay | 1 May |
| • Re: DBD::mysql "fetch() without execute()" error | Chuck O'Donnell | 1 May |
| • Dealing with Lost connection to MySQL server during query and mysql_use_result - a solution | Jay Lawrence | 1 May |
| • Re: DBD::mysql "fetch() without execute()" error | Steve Hay | 2 May |
| • Re: DBD::mysql "fetch() without execute()" error | Jochen Wiedmann | 2 May |
| • installing/creating Innodb tables | Rajeev Rumale | 3 May |
| • storing Binary files | Rajeev Rumale | 28 May |
