Kenichi Ishigaki
b0fad50e4c
fixed for older DBI
2019-01-26 07:12:40 +09:00
Kenichi Ishigaki
90ec098f1c
added a boilerplace for test
2019-01-26 06:56:16 +09:00
Max Maischein
1fd1a0d15f
Handle 'unknown' op in DBD::SQLite::VirtualTable::PerlData
...
This patch adds code and a test when SQLite generates an 'unknown'
op for a table join in the BEST_INDEX() callback. The Perl code crashed
when such an op was generated for a JOIN criterion by the SQLite engine.
The SQLite engine creates an 'unknown' op on the following SQL
for example:
select r.nodepath
from temp.scan_results r
left join temp.scan_results m
on r.nodepath = m.nodepath+1
where m.nodepath is null
The important part is that the right side of the left join must be
checked for IS NULL.
2019-01-25 19:05:07 +01:00
Kenichi Ishigaki
627666e888
not to use Test::FailWarnings except for developers environment
2019-01-07 03:48:10 +09:00
Kenichi Ishigaki
f56689d929
use more test utility functions
2019-01-07 03:41:09 +09:00
Kenichi Ishigaki
49ea768740
fixed a broken test because Test::NoWarnings was gone
2019-01-06 22:28:30 +09:00
Kenichi Ishigaki
fdde5b98ef
use Test::FailWarnings as Test::NoWarnings does not play well with done_testing
2019-01-06 09:17:14 +09:00
Kenichi Ishigaki
c84a0a9781
use done_testing and remove plan tests
2019-01-06 09:03:41 +09:00
Kenichi Ishigaki
fc55eeb0d7
fixed mixed EOLs and removed redundant blank lines
2019-01-06 05:55:34 +09:00
Kenichi Ishigaki
11c2f4e70f
use warnings
2019-01-02 21:17:30 +09:00
Kenichi Ishigaki
12ab284322
removed shebang from tests
2019-01-02 21:10:51 +09:00
Kenichi Ishigaki
998847196d
use func to support older DBI
2018-10-13 17:48:20 +09:00
Kenichi Ishigaki
52c2e15fa5
fix a broken virtual filecontent table test
2018-09-17 04:07:42 +09:00
Kenichi Ishigaki
113ca70aa5
Fix to use a PV value as a virtual table column value where appropriate (RT-124941)
2018-09-17 03:46:52 +09:00
Kenichi Ishigaki
573d6f02b7
fixed ISNOT undef case
2017-11-21 05:15:27 +09:00
Peter Rabbitson
c4eab85ff7
Workaround for upcoming lack of dot in @INC ( RT#120444, sigh )
...
Zero functional changes, simply executed the following:
find . -name '*.t' -exec perl -0777 -p -i -e 's|^use t::lib::SQLiteTest|use lib "t/lib";\nuse SQLiteTest|m' {} +
Also had to do a manual (but identical) fix in t/01_compile.t
2017-05-05 00:48:33 +02:00
Kenichi Ishigaki
434aea6479
rename t/lib/Test.pm to t/lib/SQLiteTest.pm
2017-03-04 15:04:39 +09:00
Kenichi Ishigaki
a17b7f350f
these tests should be skipped if DBD::SQLite is not compiled with FTS3/4
2016-01-30 09:48:03 +09:00
Kenichi Ishigaki
008e1291d5
ignore one of the tests that requires the enhanced query syntax if DBD::SQLite is not compiled with ENABLE_FTS3_PARENTHESIS (RT-111558)
2016-01-30 09:41:38 +09:00
Kenichi Ishigaki
2200a59da2
"IS NULL" was first supported at SQLite 3.6.19, not 3.6.10
2015-04-16 20:24:23 +09:00
Kenichi Ishigaki
87371fb727
tweaked a filecontent test to reflect the addition/removal of files
2015-03-19 02:22:25 +09:00
Kenichi Ishigaki
eb10c7ce6f
tweaked code and tests for older SQLite libraries (re: RT 101573)
2015-02-10 17:07:32 +09:00
Kenichi Ishigaki
af1fed5149
trim CRLF more eagerly (esp. for Cygwin)
2015-01-09 01:19:16 +09:00
Kenichi Ishigaki
491d5e641b
skip virtual_table tests if $FindBin::Bin points to a nonexistent path for some reason
2014-12-18 17:20:50 +09:00
Laurent Dami
13e2b63d26
#99748 catch runtime errors occurring when user input for the MATCH operator is not a proper regex
2014-11-25 04:30:57 +01:00
Laurent Dami
28fc0e459e
RT#99748: replacing interpolated variables by a closure -- no risk of code injection
2014-10-29 06:57:17 +02:00
Kenichi Ishigaki
9b227e74f4
fixed a case where bind param is undef (which should be converted to NULL)
2014-10-28 16:13:46 +09:00
Kenichi Ishigaki
0cd3997830
use quotemeta (as adviced in RT-99748) to address serious security issues
2014-10-28 15:12:29 +09:00
Laurent Dami
b4aeff356f
additional tests for checking proper handling of '}' and '\}'
2014-10-26 22:47:03 +02:00
Laurent Dami
fb9a6bdd82
adapt tests so that they also work for DBI versions prior to 1.608
2014-10-26 10:14:49 +02:00
Laurent Dami
90ec404874
RT#99748 removed tests that cause segfaults under Perl <= 5.8.8
2014-10-26 09:19:48 +02:00
Laurent Dami
ab7539a7c8
RT#99748 - removed a test which causes experimental warnings under Perl >= 5.18 (and did not add much to the intended tests)
2014-10-26 07:46:10 +02:00
Laurent Dami
c6d9c27e22
RT#99748
...
- added support for undef (NULLs) in comparisons
- new test file t/virtual_table/rt_99748.t for testing nulls and comparing vtable with a regular table
- tests that no security holes can be inserted in compiled regexes
- ROWIDs start at 1, not at 0
- replaced qr{..} by m{..}
2014-10-25 21:06:16 +02:00
Laurent Dami
704c2d2d3c
fix RT#99747 - skip tests if Unicode::UCD is not installed
2014-10-25 05:32:24 +02:00
Kenichi Ishigaki
6ab97143c8
oops, overlooked unnecessary non-core deps
2014-07-21 14:16:52 +09:00
Laurent Dami
ab008be4e3
test the example described in L<DBD::SQLite::VirtualTable::PerlData/"Hashref example : unicode characters">
2014-07-20 20:29:02 +02:00
Laurent Dami
0ec13083f1
implementation of FIND_FUNCTION, plus a couple of cosmetic changes in various places
2014-07-20 18:57:19 +02:00
Laurent Dami
7af00e7edd
cleanup
...
- Emacs settings no longer in dbdimp.c source
- remove duplicated code (generalize cals to stacked_sv_from_sqlite3_value())
- variables renamed
2014-07-19 03:39:07 +02:00
Laurent Dami
bf65db231f
various fixes / improvements
2014-07-12 08:20:19 +02:00
Laurent Dami
9018a4683c
various code refactorings, completion of the doc
2014-07-11 06:06:19 +02:00
Laurent Dami
d6a77c88ea
bug corrections & addition of class VirtualTable/PerlData
2014-07-10 05:45:28 +02:00
Laurent Dami
78984a9de8
initial support for virtual tables in Perl (WORK IN PROGRESS)
2014-07-09 08:31:34 +02:00