[native] Use cnx.system_sql instead of doexec method in syntax_tree_search
The latter handles connection issues and tries to reconnect. Method
syntax_tree_search appears to be called from quite a few place where it seems
useful to be resilient to connection issues (authentication for instance).
This reconnection logic appears to have disappeared at some point when working
on https://www.cubicweb.org/2919309. Could not find the exact reason though...
--- a/cubicweb/server/sources/native.py Wed Jul 20 09:09:34 2016 +0200
+++ b/cubicweb/server/sources/native.py Wed Jul 20 09:21:51 2016 +0200
@@ -557,7 +557,7 @@
self._cache[cachekey] = sql, qargs, cbs
args = self.merge_args(args, qargs)
assert isinstance(sql, string_types), repr(sql)
- cursor = self.doexec(cnx, sql, args)
+ cursor = cnx.system_sql(sql, args)
results = self.process_result(cursor, cnx, cbs)
assert dbg_results(results)
return results