522 Commits

Author SHA1 Message Date
Petr Skoda
d2b357b923 MDL-32368 fix pg to always use old bytea encoding 2012-04-10 15:25:20 +02:00
Petr Skoda
4bf855771f MDL-32365 fix hardcoded auto-increment on id columns 2012-04-10 15:22:16 +02:00
Petr Skoda
3b4f7338a7 MDL-32365 fix invalid checking for returned id when custom sequence used 2012-04-10 15:22:15 +02:00
Petr Skoda
a3d5830a0a MDL-32149 PHPUnit test support - part 2
Includes:
* constants refactoring
* reworked db table init
* support for $CFG->debug = -1
* functional DB tests
* fixed $DB->get_indexes() to not throw exceptions when table does not exist
* fix handling of user passwords in test db
* add debug info to exception messages
* removed unnecessary PHP debug errors from mathslib
* fixed @error suppression in get_string
* fixed PHPUnit error handler setup
* added timezone info to default install
2012-04-03 22:30:53 +02:00
Petr Skoda
caee6e6c26 MDL-32251 E_STRICT fixes part 3 2012-03-29 15:24:30 +02:00
Dan Poltawski
2511b0742a Merge branch 'MDL-32028' of git://github.com/nebgor/moodle 2012-03-27 14:46:52 +08:00
Petr Skoda
62cd8cd9f5 MDL-32029 fix get_tables() when prefix empty in external database 2012-03-24 11:36:01 +01:00
Dan Poltawski
d68c62fe12 Merge branch 'w12_MDL-29515_m23_deprdb' of git://github.com/skodak/moodle 2012-03-21 09:25:47 +08:00
Petr Skoda
de640a2d3f MDL-29515 remove deprecated $DB->sql_ilike() and fix debug messages 2012-03-17 19:20:39 +01:00
Petr Skoda
e618cdf3f6 MDL-29894 forbid objects in DML parameters
Objects with __toString we never fully supported as parameters in DML layer, this finally brings consistent behaviour.
2012-03-17 18:44:12 +01:00
Aparup Banerjee
78e05ba53e MDL-32028 Documentation : removed legacy 1.x documentation 2012-03-15 15:19:32 +08:00
Petr Skoda
bc09aa158b MDL-31899 use information_schema for normal db tables in get_columns()
This change is based on patch by Charles Fulton.
2012-03-10 21:41:44 +01:00
Petr Skoda
05aae0a571 MDL-29514 drop support for enum data types 2012-03-10 21:36:48 +01:00
Petr Skoda
a681b6c0a9 MDL-31689 fix moodle_database:execute() description 2012-03-07 12:36:40 +01:00
Eloy Lafuente (stronk7)
2ed7cc2730 Merge branch 'w10_MDL-31301_m23_textlibcleanup' of git://github.com/skodak/moodle 2012-03-06 16:06:53 +01:00
Petr Skoda
7e522ccbc8 MDL-27982 remove unsigned support from all UIs and APIs, keep only public API for BC 2012-03-06 12:02:11 +01:00
Petr Skoda
f8311defeb MDL-31301 use static textlib methods 2012-03-03 11:46:13 +01:00
Dan Poltawski
6ad22bb164 MDL-29199 dml: fix query logging on Oracle
thanks to Jonathon Fowler for the fix
2012-02-24 11:57:18 +08:00
Aparup Banerjee
dafa20e85c MDL-30972 Documentation : improved @see as well as added appropriate uses of inline @link. 2012-02-16 10:29:45 +08:00
Aparup Banerjee
096880eb7c MDL-30972 More phpdocs changes after Jenkins review. 2012-02-09 10:07:48 +08:00
Aparup Banerjee
a0eb2e97f9 MDL-30972 Documentation : Renamed DB engine drivers to "@package core" but moodle_*.php are "@subpackage dml_driver", all other dml/*.php are "@subpackage dml". 2012-02-09 10:01:42 +08:00
Aparup Banerjee
6df260107c MDL-30972 Documentation : clarified phpdocs for main public APIs in DML layer and touched up on some drivers 2012-02-09 10:01:42 +08:00
Eloy Lafuente (stronk7)
5cff28cfa1 MDL-30739 add one test to confirm the solution is cross-db 2011-12-15 13:14:26 +01:00
Aparup Banerjee
c32e3a0a0a Merge branch 'MDL-30026_sqlsrv' of git://github.com/stronk7/moodle 2011-11-23 14:34:34 +08:00
Petr Skoda
fed02be153 MDL-30147 do not expect text comparison exceptions when not in debug mode
Unfortunately the column type fetching is too expensive, we do extra verification in debug mode only.
2011-11-19 09:44:33 +01:00
Petr Skoda
a453ec079f MDL-30147 optional verification if dml exception when table missing 2011-11-19 09:39:07 +01:00
Eloy Lafuente (stronk7)
870896eca1 MDL-30147 dml - mysql and no params now behaving "standard" 2011-11-19 09:27:10 +01:00
Eloy Lafuente (stronk7)
a8097d6dda MDL-30147 dml - one more test behavior without params 2011-11-19 09:27:09 +01:00
Eloy Lafuente (stronk7)
8f201c9ded MDL-30147 dml - added some tests demoing bad get_columns() behavior 2011-11-19 09:27:09 +01:00
Petr Skoda
69ac5d478f MDL-30147 do not rely on dml exception type outside of dml layer
The trouble is that dml driver methods (insert, update, select) are not guaranteed to return the same exception class for various db problems and coding style issues. The recommended practice is to catch dml_exception only.
2011-11-19 09:25:11 +01:00
Petr Skoda
c04e80e328 MDL-30147 detect missing table when processing query conditions 2011-11-19 09:16:51 +01:00
Eloy Lafuente (stronk7)
f8cd596aae MDL-30026 dml - fix sqlsrv support for session locks 2011-11-18 13:02:24 +01:00
Eloy Lafuente (stronk7)
da3a1f3ae7 MDL-30026 improve session lock - stronger detection for oracle 2011-11-13 19:23:53 +01:00
Eloy Lafuente (stronk7)
d16b0197de MDL-30026 improve session lock - mssql workaround for bug with scalar returned values 2011-11-13 19:06:44 +01:00
Eloy Lafuente (stronk7)
12dfd6df01 MDL-30026 improve session lock - unit tests & minor comment fixup 2011-11-13 19:05:57 +01:00
Petr Skoda
2b0e3941e9 MDL-30026 improve session lock acquire timeouts and other minor cleanup
This is partially based on original patch by Tony Levi.
2011-11-06 17:52:15 +01:00
Eloy Lafuente (stronk7)
44a9630623 MDL-29815 dbtest - added one test_get_records_sql_complicated related test 2011-10-25 17:37:34 +02:00
Eloy Lafuente (stronk7)
fc0aebb595 MDL-29496 unittests - verify COALESCE() cross-db compatibility 2011-10-18 15:58:56 +08:00
Eloy Lafuente (stronk7)
69857fa06e MDL-29567 postgresql - handle negative defaults in numerical cols properly 2011-09-29 01:20:10 +02:00
Eloy Lafuente (stronk7)
c75d9b6700 MDL-29567 unit tests - add some tests to cover negative defaults in numerical cols 2011-09-29 01:15:37 +02:00
Eloy Lafuente (stronk7)
61e55061a6 MDL-29566 mysql - length / decimal specs in float columns are optional 2011-09-29 00:24:54 +02:00
Eloy Lafuente (stronk7)
12e89a0a69 MDL-29566 unit tests - add some tests to cover get_columns() with number/float columns 2011-09-29 00:13:44 +02:00
Eloy Lafuente (stronk7)
018213bed2 MDL-29415 xmldb - fix get_columns() in oracle to get char based lengths + test 2011-09-19 00:34:10 +02:00
Petr Skoda
148c65bfc8 MDL-29295 do not use strtok in dml and ddl layers
This prevents clobbering of internal pointer when code calling DML
uses strtok too. Unit test added to prevent future uses.
2011-09-14 00:19:55 +02:00
Aparup Banerjee
e2e1cf53db Merge branch 'MDL-29198' of git://github.com/stronk7/moodle 2011-09-05 12:10:32 +08:00
Eloy Lafuente (stronk7)
ee91760321 MDL-28080 DML unit tests - cover tweak_param_names() and the new 30 chars limit exception 2011-09-01 19:46:30 +02:00
Eloy Lafuente (stronk7)
07ee317d2a MDL-28080 oracle - avoid tweak_param_names() tweaking too much :-P
Sometimes the (oracle only) tweak_param_names() method was causing
placeholders having > 28 chars length to exceed the 30 chars limit
imposed by Oracle. With this commit the tweak is performed by
replacement for such long placeholders and, at the same time, the
tweak has been commented out from insert/update because it is not
necessary there (placeholders are safe column name always)
2011-09-01 19:42:29 +02:00
Tim Hunt
8de7858fb9 MDL-28080 coding_exception for over-long placeholder names. 2011-09-01 11:47:40 +02:00
Eloy Lafuente (stronk7)
4b5c84ae30 MDL-29198 DB - make delete_records transactional safe when needed 2011-09-01 11:05:21 +02:00
Eloy Lafuente (stronk7)
1ccfd8dcbf MDL-26819 quiz statistics - use cross-db GROUP BY expression 2011-08-28 22:12:40 +02:00