On Mon, 9 Aug 2021 10:12:45 +0100 Andrew Grafham <andrew.graf...@gmail.com> 
wrote:

AG> Any ideas how it would detect at runtime whether the server supports bulk
AG> operations or not?

 Sorry, no, I thought it would be just a server version check, but I
didn't realize it would be so problematic. And if there is some function
for checking the server capabilities in MySQL API, I'm not aware of it (but
then, again, I hardly know MySQL API at all, so this doesn't mean much).

AG> It's not very helpful - if you're using an older version of MySQL, and
AG> you create a statement and set its attribute STMT_ATTR_ARRAY_SIZE, it
AG> doesn't return an error until you actually try to execute the
AG> statement.

 Is this error understandable at least? I.e. is it immediately clear that
it's due to the server being too old? If it is, I guess we could also try
redoing the statement without STMT_ATTR_ARRAY_SIZE and set some internal
flag to not use it any more for the future requests. However this would be
much more complicated than just a version check, of course.

AG> It's not straightforward to add a check on the server's version number
AG> because you could be running against MySQL or MariaDB, and there is not
AG> a single version where it was added. E.g. MariaDB 10.2.3 had bulk
AG> operation support but then they removed it again until 10.2.7.

 FWIW I think it would be fine to just check for MariaDB >= 10.2.7 and not
bother with 10.2.{4,5,6} versions.

 Regards,
VZ

Attachment: pgpkiTI9rjpBs.pgp
Description: PGP signature

_______________________________________________
soci-users mailing list
soci-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/soci-users

Reply via email to