| 1 |
Revision history for Perl extension DBD::Mock. |
| 2 |
|
| 3 |
1.59 2021-02-22T13:25:52Z |
| 4 |
- Added error detection for when a result set's callback doesn't return |
| 5 |
an arrayref or arrayrefs |
| 6 |
- Moved to GitLab for issue tracking |
| 7 |
|
| 8 |
1.58 2020-11-02T13:34:48Z |
| 9 |
- Added the ability for mock result sets to set custom attributes for |
| 10 |
statement handles. Thanks to Erik Huelsmann for testing the new feature. |
| 11 |
|
| 12 |
1.57 2020-09-18T06:57:48Z |
| 13 |
- Fixed bug rt133358 t/016_mock_add_resultset_test.t fails (with older DBI) |
| 14 |
|
| 15 |
1.56 2020-09-17T14:35:10Z |
| 16 |
- The DBD::st module now supports the last_insert_id method |
| 17 |
- Result sets with callbacks can now specify a last_insert_id |
| 18 |
|
| 19 |
1.55 2019-12-30T14:20:00Z |
| 20 |
- Fixed bug rt131264 t/033_table_info.t fails (with older DBI) |
| 21 |
|
| 22 |
1.54 2019-12-23T12:44:22Z |
| 23 |
- Added Bernhard Graf's 'Feature: one shot failure' merge request. |
| 24 |
- Fixed description of the failure attribute of mock_add_resultset. It |
| 25 |
no longer claims to support a hash ref (as it doesn't). Thanks to |
| 26 |
Bernhard Graf for both the bug report and a merge request that fixes it. |
| 27 |
- Fixed bug where it wasn't possible to replace a regular expression |
| 28 |
mock resultset. Thanks to Bernhard Graf for both the bug report and |
| 29 |
a merge request that fixes it. |
| 30 |
- Fixed bug where the failure attribute wasn't working with regular |
| 31 |
expression mock resultsets. Thanks to Bernhard Graf for both the bug |
| 32 |
report and a merge request that fixes it. |
| 33 |
|
| 34 |
1.53 2019-12-03T10:50:57Z |
| 35 |
- Error handling in mock_add_resultset is no longer experimental |
| 36 |
- Attribute Aliasing is no longer experimental |
| 37 |
|
| 38 |
1.52 2019-10-28T11:35:41Z |
| 39 |
- Added in callback feature for result sets so that their contents |
| 40 |
can be more dynamic. |
| 41 |
|
| 42 |
1.51 2019-10-23T11:43:51Z |
| 43 |
- Fixed issue with using attribute aliases alongside a driver DSN |
| 44 |
in the DBI->connect call |
| 45 |
|
| 46 |
1.50 2019-10-22T19:37:26Z |
| 47 |
- Added attribute aliases support for MariaDB |
| 48 |
|
| 49 |
1.49 2019-09-12T12:59:51Z |
| 50 |
- Fixing tests that fail on some old versions of Perl |
| 51 |
|
| 52 |
1.48 2019-09-12T06:34:47Z |
| 53 |
- Added execution_history feature to enable tracking of multiple |
| 54 |
executes for prepared statements. |
| 55 |
- Added support for $dbh->table_info calls |
| 56 |
- Fixed bug rt91055 "insert IGNORE" doesn't raise last_insert_id |
| 57 |
- Fixed bug rt82243 Bug with Regex in DBD::Mock::Session |
| 58 |
|
| 59 |
1.47 2019-09-06T10:03:39Z |
| 60 |
- Applied Max Carey's patch from rt86294 adding support for |
| 61 |
nested keys to fetchall_hashref |
| 62 |
- Added experimental Connection Callbacks feature |
| 63 |
- Fixed build for Perl v5.8 |
| 64 |
|
| 65 |
1.46 2019-09-04T12:02:08Z |
| 66 |
- Added git-repo url to meta-data |
| 67 |
- Fixed bug rt70587 Spelling Mistake |
| 68 |
- Added regex support to mock_add_resultset |
| 69 |
|
| 70 |
1.45 October 22, 2012 |
| 71 |
- Extended DBD::Mock::Session functionality |
| 72 |
- Added bind_param_array() to mocked statements |
| 73 |
- Added execute_array() to mocked statements |
| 74 |
|
| 75 |
1.43 August 29, 2011 |
| 76 |
- Segregated into different packages |
| 77 |
- Removed code coverage from POD |
| 78 |
- Fixed bug rt49537 Basic support for named parameters |
| 79 |
- Fixed bug rt70421 Build.PL now contains Test::Exception |
| 80 |
|
| 81 |
1.42 August 7, 2011 |
| 82 |
- Fixed bug rt66815 DBD::Mock::Session error clobbered |
| 83 |
- Fixed bug rt69460 Info on META.yml is outdated |
| 84 |
- Fixed bug rt69055 Spelling mistakes in POD |
| 85 |
- RaiseError now works |
| 86 |
|
| 87 |
1.41 June 22, 2011 |
| 88 |
- Changed incorrect verion number |
| 89 |
|
| 90 |
1.40 June 19, 2011 |
| 91 |
- Fixed bug rt44591 second preapre giving an error |
| 92 |
- Fixed bug rt57981 warnings during clone |
| 93 |
- Fixed bug rt63191 Synopsis errors |
| 94 |
- Fixed bug rt66813 Google's group link in the POD |
| 95 |
|
| 96 |
1.39 November 9, 2008 |
| 97 |
- If a statement handle had bound columns, then the fetch() and |
| 98 |
fetchrow_arrayref() methods never returned false. After they |
| 99 |
exhausted their data, they kept returning empty array |
| 100 |
references. |
| 101 |
- Hid all packaged but DBD::Mock from PAUSE. |
| 102 |
|
| 103 |
1.38 November 8, 2008 |
| 104 |
- Bumped minimum Perl to 5.8.1, since that's what DBI requires. |
| 105 |
- Fixed incorrect use of no_plan in t/025_mock_last_insert_id.t. |
| 106 |
- The handling of attributes passed to the constructor was not |
| 107 |
correct. The major symptom was that attributes (such as |
| 108 |
RaiseError) which were passed to the constructor could not be |
| 109 |
overridden in the database handle which was returned from |
| 110 |
connect(). As a result, some attributes set to a false value may |
| 111 |
return '' instead of 0. |
| 112 |
|
| 113 |
1.37 June 12, 2008 |
| 114 |
- New co-maintainer (aka sucker), Dave Rolsky |
| 115 |
- Added support for $sth->bind_col() and $sth->bind_cols() |
| 116 |
- Fixed and clarified docs for the mock_last_insert_id and |
| 117 |
mock_start_insert_id attributes. The previous docs were both |
| 118 |
wrong and confusing |
| 119 |
- Applied patch from RT #35145 to add support for the Column |
| 120 |
attribute with selectcol_arrayref |
| 121 |
- patch by Matt Lawrence |
| 122 |
|
| 123 |
1.36 October 18, 2007 |
| 124 |
- $dbh->last_insert_id() now works as documented |
| 125 |
- Added a "use 5.006;" in order to put a safeguard on the "use warnings;" |
| 126 |
statement a little further down. |
| 127 |
|
| 128 |
1.35 July 9, 2007 |
| 129 |
- Applying path from RT #16951 to return |
| 130 |
new result set for repeated calls to |
| 131 |
$sth->execute(). Thanks to Marc Beyer for this. |
| 132 |
- added tests for this |
| 133 |
- Fixing RT #25892 to make mock_records method |
| 134 |
work correctly. |
| 135 |
- added test for this |
| 136 |
- applying patch from RT #26604 to fix AutoCommit |
| 137 |
behavior. Thanks to Ryan Gerry for this. |
| 138 |
|
| 139 |
1.34 July, 29 2006 |
| 140 |
- Fixed how AutoCommit is handled to avoid $dbh caching (RobK) |
| 141 |
- Thanks to Chas Owens for patch and test |
| 142 |
for the mock_can_prepare, mock_can_execute, |
| 143 |
and mock_can_fetch features. |
| 144 |
|
| 145 |
1.32 Wed Dec 14, 2005 |
| 146 |
- Fixed RT Bug #15599 |
| 147 |
- Fixed RT Bug #15602 |
| 148 |
|
| 149 |
- converted to Module::Build |
| 150 |
- removed the VERSION file, and adjusted the numbers |
| 151 |
in all places needed |
| 152 |
|
| 153 |
- added patch from Andrew W. Gibbs to allow the ARRAY |
| 154 |
version of 'mock_last_insert_id' attribute |
| 155 |
- added test file as well |
| 156 |
- added docs on it too |
| 157 |
|
| 158 |
- $sth->execute now returns the number of rows as per the |
| 159 |
DBI docs |
| 160 |
- added some tests for this |
| 161 |
|
| 162 |
>> DBD::Mock::Session |
| 163 |
- now allows regexp's in the bound_params list |
| 164 |
so that you can check your params are 'like' |
| 165 |
something, and not exactly something |
| 166 |
- Improved error messages |
| 167 |
|
| 168 |
0.28 Wen July 13, 2005 |
| 169 |
- update to patch from Andrew McHarg <[email protected]> |
| 170 |
to fix behavior in selectcol_arrayref() methods and tests |
| 171 |
- fix version in META.yml |
| 172 |
- some refactoring of fetchall_hashref(), fetchrow_hashref() |
| 173 |
to incorporate DBD-Mock error handling. |
| 174 |
|
| 175 |
0.27 Mon July 11, 2005 |
| 176 |
- added NULL_RESULTSET constant |
| 177 |
- now allowing errors to be set with mock_add_resultset. |
| 178 |
Support is currently experimental, see the file |
| 179 |
't/023_statement_failure.t' and the EXPERIMENTAL section |
| 180 |
of the docs for more information. |
| 181 |
- added patch from Collin Winter to fix a bug in |
| 182 |
the begin_work(), commit() and rollback() methods |
| 183 |
- added patch from Andrew McHarg <[email protected]> for |
| 184 |
the fetchall_hashref(), fetchrow_hashref() and |
| 185 |
selectcol_arrayref() methods and tests |
| 186 |
|
| 187 |
0.26 Fri Apr 08 2005 |
| 188 |
- added Rob Kinyon to the AUTHORS list |
| 189 |
- added get_info() and set_info() |
| 190 |
- added tests for this |
| 191 |
- added bind_param_inout() for DBD::Mock::st |
| 192 |
code from Thilo Planz (Thanks Thilo) |
| 193 |
- added tests for this |
| 194 |
- added mock_data_sources and mock_add_data_sources |
| 195 |
properties for the Driver and Database handles |
| 196 |
- added tests and docs for this |
| 197 |
- added begin_work(), commit() and rollback() method |
| 198 |
implementations which wrap the prepare() method and |
| 199 |
deal with the AutoCommit value per the DBI spec. |
| 200 |
- added tests and docs for this |
| 201 |
|
| 202 |
0.25 Sat Feb 26 2005 |
| 203 |
- removed the DBD::Mock::_error_handler routine |
| 204 |
since it was actually redundant with the DBI::set_err |
| 205 |
method. This was actually the source of the RT Bug #11515 |
| 206 |
which was found by Shlomi Fish (thanks Shlomi) |
| 207 |
- adjusted some tests for this fix |
| 208 |
|
| 209 |
0.24 Fri Jan 28 2005 |
| 210 |
- added the reset() method to the DBD::Mock::Session |
| 211 |
object so that a session can be used more than once. |
| 212 |
- added tests for this |
| 213 |
- added docs for this |
| 214 |
- fixed a bug where the HASH version of 'mock_add_resultset' |
| 215 |
would consume the result sets and they would not be |
| 216 |
reusable. We now copy the result sets so that every time |
| 217 |
the statement is called the same results are returned |
| 218 |
- did not need to add docs for this, they already |
| 219 |
documented this as the behavior (hence calling this |
| 220 |
a bug) |
| 221 |
- added tests for this |
| 222 |
|
| 223 |
0.23 Tues Jan 25 2005 |
| 224 |
- removed the trace log tests from t/10_db_handle.t |
| 225 |
since they seemed to be a source of issues on Win32. |
| 226 |
My rationale is that it is a DBI thing, and therefore |
| 227 |
does not need to be tested by DBD::Mock. |
| 228 |
|
| 229 |
- added a few more tests to t/11_dr_handle.t to test the |
| 230 |
'mock_connect_fail' feature |
| 231 |
|
| 232 |
- added some clarification in the docs about the |
| 233 |
'mock_connect_fail' feature as well. |
| 234 |
|
| 235 |
0.22 Mon Jan 24 2005 |
| 236 |
- added the 'mock_connect_fail' boolean attribute |
| 237 |
for the DBD::Mock driver handle, this will prevent |
| 238 |
DBI from connecting. It can be used to simulate a |
| 239 |
bad DSN or something like that. |
| 240 |
- added tests and documentation for this. |
| 241 |
- Thanks to Justin DeVuyst for this idea. |
| 242 |
|
| 243 |
0.21 Sun Jan 16 2005 |
| 244 |
> DBD::Mock::Session |
| 245 |
|
| 246 |
- added the optional 'bound_params' slot for the |
| 247 |
DBD::Mock::Session object |
| 248 |
- added tests for this |
| 249 |
- added documentation for this |
| 250 |
|
| 251 |
- added error to handle cases where there are not |
| 252 |
enough states in a DBD::Mock::Session object. |
| 253 |
- added tests for this |
| 254 |
- added documentation for this |
| 255 |
|
| 256 |
- added the ability to remove a session (by setting |
| 257 |
it to a false value) |
| 258 |
- added tests for this |
| 259 |
- added documenation for this |
| 260 |
|
| 261 |
> DBD::Mock |
| 262 |
|
| 263 |
- added test to check about overwriting hash-based |
| 264 |
result sets with 'mock_add_resultset' attribute |
| 265 |
- added documentation for this |
| 266 |
|
| 267 |
0.20 Fri Jan 14 2005 |
| 268 |
- Modified a set of tests in t/10_db_handle.t to pass on Cygwin. |
| 269 |
Thanks to Rob Kinyon for this code. This code now uses File::Temp |
| 270 |
to make the temp log file in a cross platform manner. If File::Temp |
| 271 |
is not found on the system, then the tests are skipped. |
| 272 |
|
| 273 |
0.19 Fri Jan 7 2005 |
| 274 |
- changed the VERSION in lib/DBD/Mock.pm to be 1.23, allow me to explain... |
| 275 |
|
| 276 |
Chris Winters (the original author ) used the CVS derived |
| 277 |
VERSION, which when I took over the module (8 versions ago) |
| 278 |
was at 1.15. Since I was not using Chris's CVS repo to store this |
| 279 |
I decided to give Mock.pm the VERSION number found in the VERSION |
| 280 |
file. |
| 281 |
|
| 282 |
Well,... PAUSE's indexer doesn't like it since it is a lower |
| 283 |
number and would complain every time I uploaded a new version. |
| 284 |
I ignored these complaints (at my own peril) until now. |
| 285 |
|
| 286 |
I found out recently that if you had version 0.11 or below installed |
| 287 |
(where the Mock.pm was version 1.15 or below), then installing through |
| 288 |
the CPAN shell would tell you DBD::Mock was up to date, even though it |
| 289 |
wasn't. So in order to fix this issue, and make sure that all those who |
| 290 |
want to install and update DBD::Mock easily, I changed the version |
| 291 |
number of DBD::Mock to be 1.23 to reflect the number of updates |
| 292 |
I have done since Chris handed it over to me. |
| 293 |
|
| 294 |
*sigh* |
| 295 |
|
| 296 |
Okay good, thats off my chest now. |
| 297 |
|
| 298 |
0.18 Wed Jan 5 2005 |
| 299 |
- added reset() method to the |
| 300 |
DBD::Mock::StatementTrack::Iterator object |
| 301 |
- added test and docs for this |
| 302 |
|
| 303 |
- added the DBD::Mock::Session object and added |
| 304 |
the support for it in the DBD::Mock driver |
| 305 |
- added tests and docs for this |
| 306 |
- Thanks to Rob Kinyon and Chris Winters for |
| 307 |
their feedback on this feature |
| 308 |
|
| 309 |
- some general POD cleanup and formatting |
| 310 |
|
| 311 |
0.17 Thurs Nov 4 2004 |
| 312 |
- added the following items: |
| 313 |
- a 'mock_num_rows' attribute which will give you |
| 314 |
the number of records affected/returned by the |
| 315 |
last statement |
| 316 |
- a num_rows method in the DBD::Mock::StatementTrack |
| 317 |
object, which is where the above attribute gets it's |
| 318 |
value |
| 319 |
- added the 'rows' method for statement handles (which didnt |
| 320 |
work before) |
| 321 |
|
| 322 |
0.16 Sat Oct 30 2004 |
| 323 |
- minor change to the DBD::Mock::StatementTrack::Iterator |
| 324 |
behavior. It no longer derefs the history array, so it |
| 325 |
maintains a reference to it and therefore can be used like |
| 326 |
this: |
| 327 |
get-statement-iterator |
| 328 |
run-query |
| 329 |
check-next-statement-in-iterator |
| 330 |
run-query |
| 331 |
check-next-statement-in-iterator |
| 332 |
... |
| 333 |
This prevents the need to re-fetch the iterator after |
| 334 |
each query. |
| 335 |
|
| 336 |
0.15 Fri Oct 29 2004 |
| 337 |
- added the DBD::Mock::StatementTrack::Iterator |
| 338 |
object which can be accessed from the |
| 339 |
'mock_all_history_iterator' attribute. |
| 340 |
- write the docs and test for it |
| 341 |
|
| 342 |
0.14 Fri Oct 29 2004 |
| 343 |
- added the mock_last_insert_id attribute |
| 344 |
which will get incremented upon each INSERT |
| 345 |
query run. |
| 346 |
- added tests and docs for this |
| 347 |
- added the mock_start_insert_id attirbute |
| 348 |
so that you can both reset and set the start |
| 349 |
number for mock_last_insert_id |
| 350 |
- added tests and docs for this |
| 351 |
|
| 352 |
** EXPERIMENTAL FEATURE (use caution) ** |
| 353 |
- added a feature to alias attributes. Basically it |
| 354 |
allows you to alias an expected attribute like |
| 355 |
'mysql_insertid' to something DBD::Mock already has |
| 356 |
like 'mock_last_insert_id'. |
| 357 |
Right now this feature is highly experimental, and |
| 358 |
has been added as a first attempt automatically handle |
| 359 |
some of the DBD specific attributes which are commonly |
| 360 |
used/accessed in DBI programming. |
| 361 |
|
| 362 |
0.13 Thurs Oct 28 2004 |
| 363 |
- added prepare_cached as suggested by Rob Kinyon |
| 364 |
in RT bug #7331. Also added his test script in |
| 365 |
15_prepare_cached.t |
| 366 |
|
| 367 |
0.12 Thurs Sept 2 2004 |
| 368 |
** First version maintained by Stevan Little <[email protected]> ** |
| 369 |
- built up the test suite to 89.7% coverage |
| 370 |
- removed the undocumented 'mock_auto_commit' since it really |
| 371 |
was not very useful at this point. |
| 372 |
- added the DBD::Mock::Pool functionality |
| 373 |
- added tests for this |
| 374 |
- added documentation for this |
| 375 |
- added pod.t to test suite |
| 376 |
- removed AUTOLOAD in DBD::Mock::StatementTrack and replaced it with |
| 377 |
hand coded methods (sorry I really dislike AUTOLOAD) |
| 378 |
- centralized error handling in DBD::Mock::_error_handler |
| 379 |
|
| 380 |
0.11 Fri Jul 23 10:35:13 EDT 2004 |
| 381 |
|
| 382 |
- Fix CPAN Bug #7057: add a no-op 'disconnect_all()' to |
| 383 |
DBD::Mock::dr to support DBI versions earlier than 1.34. |
| 384 |
|
| 385 |
- Add the ability to create SQL parsers that get fired on a |
| 386 |
prepare(). This way you can ensure your application generates |
| 387 |
correct SQL and have the system fail at the right time. Thanks |
| 388 |
to Rob Kinyon <[email protected]> for the idea. |
| 389 |
|
| 390 |
0.10 Sat May 8 14:12:39 EDT 2004 |
| 391 |
|
| 392 |
- Incorporate number of patches from Stevan Little to implement |
| 393 |
'mock_can_connect', which allows you to simulate a downed |
| 394 |
database. Add supporting tests for database and statement usage. |
| 395 |
|
| 396 |
- Add the ability for 'mock_add_resultset' to associate a |
| 397 |
resultset with a particular SQL statement. Thanks to Stevan for |
| 398 |
the idea. |
| 399 |
|
| 400 |
- Add documentation for database handle property |
| 401 |
'mock_add_resultset' |
| 402 |
|
| 403 |
0.02 Tue Mar 9 12:56:54 EST 2004 |
| 404 |
|
| 405 |
Add 'VERSION' to MANIFEST, thanks to Mike Castle for the note. |
| 406 |
|
| 407 |
0.01 Sun Mar 7 23:24:24 EST 2004 |
| 408 |
|
| 409 |
Initial version spawned from DBD::NullP shipped with the |
| 410 |
DBI. Many thanks much to Tim Bunce for the pointer and the |
| 411 |
original code. |
| 412 |
|