On Fri, 6 Aug 2021 at 14:09, Vadim Zeitlin <vz-s...@zeitlins.org> wrote:
> On Fri, 6 Aug 2021 09:28:33 +0100 Andrew Grafham <andrew.graf...@gmail.com> > wrote: > > AG> Would we need to keep backward compatibility with older versions of > MariaDB > AG> that don't support Array Binding? > > Sorry, I really don't know much (well, anything) about M{y,aria}SQL API. > Which version added support for the array bindings? Are earlier versions > still in use? > > AG> If so, how would you like it to determine whether to use Array Binding > AG> or not? Could we use a #define at compile time? > > We need compile-time checks as we don't want to break the library > compilation, but we probably also need run-time checks as I suspect that > nothing good will happen if you try to use this functionality with a server > which doesn't support it. > > Regards, > VZ_______________________________________________ > > Any ideas how it would detect at runtime whether the server supports bulk operations or not? It's not very helpful - if you're using an older version of MySQL, and you create a statement and set its attribute STMT_ATTR_ARRAY_SIZE, it doesn't return an error until you actually try to execute the statement. It's not straightforward to add a check on the server's version number because you could be running against MySQL or MariaDB, and there is not a single version where it was added. E.g. MariaDB 10.2.3 had bulk operation support but then they removed it again until 10.2.7. Thanks Andy
_______________________________________________ soci-users mailing list soci-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/soci-users