MDL-53944 dml: make char2real() for mysql to support decimals
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 29 Apr 2016 01:42:59 +0000 (03:42 +0200)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 6 May 2016 01:27:32 +0000 (09:27 +0800)
commit4ae653024d2169b7a053b64d2c6cfa6f18afcbd3
tree9358058cc83903bf62f41eabc5414d1b6d9b66f9
parent440b4c54ca3d5fea5f7d69591a747ee054eb8e42
MDL-53944 dml: make char2real() for mysql to support decimals

- With the patch, 6 positions of scale accuracy are guaranteed
  per individual casted value.
- Backed with unit tests, both for varchar and clob.
- Added 2 missing tests about uses of the method with params
  and values.

Note: 6 was picked because looking to all databases implementation
postgres was found to be casting to real, aka, 6.
lib/dml/mysqli_native_moodle_database.php
lib/dml/tests/dml_test.php