9728c8f
From 66cc17d130d15d13efc5e22b2a155e426678c536 Mon Sep 17 00:00:00 2001
9728c8f
From: Hans de Goede <hdegoede@redhat.com>
9728c8f
Date: Sat, 10 Jul 2021 13:37:11 +0200
9728c8f
Subject: [PATCH 3/3] mdb-provider: Pass MdbHandle to the mdb_set_date_fmt()
9728c8f
 call
9728c8f
9728c8f
mdbtools >= 0.9.0 require a MdbHandle to be passed to the
9728c8f
mdb_set_date_fmt() call. Move the call to directly after mdb_open()
9728c8f
(when we first get the handle) and pass the handle to it.
9728c8f
9728c8f
Note this change means that the mdb-provider will now no longer
9728c8f
compile with older mdbtools versions.
9728c8f
---
9728c8f
 providers/mdb/gda-mdb-provider.c | 3 ++-
9728c8f
 1 file changed, 2 insertions(+), 1 deletion(-)
9728c8f
9728c8f
diff --git a/providers/mdb/gda-mdb-provider.c b/providers/mdb/gda-mdb-provider.c
9728c8f
index c82a37aee..17660b75d 100644
9728c8f
--- a/providers/mdb/gda-mdb-provider.c
9728c8f
+++ b/providers/mdb/gda-mdb-provider.c
9728c8f
@@ -93,7 +93,6 @@ gda_mdb_provider_class_init (GdaMdbProviderClass *klass)
9728c8f
 static void
9728c8f
 gda_mdb_provider_init (GdaMdbProvider *myprv, GdaMdbProviderClass *klass)
9728c8f
 {
9728c8f
-	mdb_set_date_fmt ("%Y-%m-%d %H:%M:%S");
9728c8f
 }
9728c8f
 
9728c8f
 static void
9728c8f
@@ -301,6 +300,8 @@ gda_mdb_provider_open_connection (GdaServerProvider *provider, GdaConnection *cn
9728c8f
 		return FALSE;
9728c8f
 	}
9728c8f
 
9728c8f
+	mdb_set_date_fmt (cdata->mdb, "%Y-%m-%d %H:%M:%S");
9728c8f
+
9728c8f
 	/* open virtual connection */
9728c8f
         if (! GDA_SERVER_PROVIDER_CLASS (parent_class)->open_connection (GDA_SERVER_PROVIDER (provider), cnc, params,
9728c8f
 									 NULL, NULL, NULL, NULL)) {
9728c8f
-- 
9728c8f
2.31.1
9728c8f