ygrek / ocaml-mysql

OCaml bindings to libmysqlclient
https://ygrek.org.ua/p/ocaml-mysql
GNU Lesser General Public License v2.1
23 stars 11 forks source link

Fix fetch of FLOAT values from prepared statements #4

Open everiq opened 9 years ago

everiq commented 9 years ago

MySQL needs a buffer to do conversion to MYSQL_TYPE_STRING. Otherwise length is 0 for FLOAT and DOUBLE.

Ref #3

roddyyaga commented 4 years ago

Is static buffer safe here? What about queries in other threads? Do you have pointer to doc why this is needed, I cannot seem to find any explanation..

It's needed to fix https://github.com/ygrek/ocaml-mysql/issues/3 See the comment at line 617 here for why a buffer is required for this.