MDL-53944 dml: make char2real() for mysql to support decimals
commitd0b09c8d7613b61e4030fa267778d8e34e132606
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Fri, 29 Apr 2016 01:42:59 +0000 (29 03:42 +0200)
committerAndrew Nicols <andrew@nicols.co.uk>
Fri, 6 May 2016 01:44:23 +0000 (6 09:44 +0800)
tree474304979ffe37827fce7d3be48f5425572c7cac
parent2efd5adc61ef6770465bff6ded3e5f28f2300f2d
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