Displaying 2 results from an estimated 2 matches for "more_results".
2011 Jan 15
0
NoMethodError: undefined method `more_results' for #<Mysql>
I am trying to create rake task to import data from my old php
application.But I can not connect to mysql database properly, when I run
Old::User.all on rails console ,I get this error :
NoMethodError: undefined method `more_results'' for #<Mysql>
from
/Library/Ruby/Gems/1.8/gems/activerecord-3.0.3/lib/active_record/connection_adapters/mysql_adapter.rb:623:in
`select''
from
/Library/Ruby/Gems/1.8/gems/activerecord-3.0.3/lib/active_record/connection_adapters/abstract/database_st...
2010 Mar 26
2
Fix for the consume_results leak
...least a fix for the PGresult leak (verified to
both apply to 1.2.11 and 2.0.beta4).
-----
--- dovecot/src/lib-sql/driver-pgsql.c 15 Mar 2010 18:18:14 -0000 1.1.1.2
+++ dovecot/src/lib-sql/driver-pgsql.c 26 Mar 2010 14:13:18 -0000 1.1.1.2.4.1
@@ -247,6 +247,17 @@
return 0;
}
+static inline int more_results(PGconn *pg)
+{
+ PGresult *pgres;
+
+ pgres = PQgetResult(pg);
+ if (!pgres) return 0;
+
+ PQclear(pgres);
+ return 1;
+}
+
static void consume_results(struct pgsql_db *db)
{
do {
@@ -255,7 +266,7 @@
if (PQisBusy(db->pg))
return;
- } while (PQgetResult(db->pg) != NULL);
+ } while...