Commit Graph

10238 Commits

Author SHA1 Message Date
Wez Furlong
8ccae81db2 Eliminate leaks from registering plain or aggregate functions.
Also, reduce (probably eliminate) the risk of a segfault when registering a
callback on a persistent connection and later triggering the callback from a
different script.
2003-04-20 15:13:04 +00:00
Wez Furlong
ac33bc48f0 Revise todo 2003-04-20 13:33:46 +00:00
Wez Furlong
d40a615a8e Implement sqlite_create_function(), which allows binding of php functions by
name; this is a higher performance alternative to the generic php() SQL
function. (saves parsing the additional function call in the SQL and a call to
zend_is_callable on each function invocation).

Add test for sqlite_create_function().

Fixup proto for sqlite_create_aggregate().

Tweak package file and speling in header file.
2003-04-20 13:31:36 +00:00
Tal Peer
b0d26a11ac Remove rendundant function 2003-04-20 13:21:17 +00:00
Tal Peer
2a54c9a308 typo 2003-04-20 13:17:17 +00:00
Tal Peer
a676f6c29d Update 2003-04-20 13:15:45 +00:00
Wez Furlong
7360c5dfdd Add test for aggregates 2003-04-20 13:08:40 +00:00
Wez Furlong
4a46882648 Implement sqlite_create_aggregate() which can be used to create aggregation
functions for use in SQL statements.
2003-04-20 13:08:22 +00:00
Edin Kadribasic
3f18d16957 Kluge, but it seems to work now in both phpize and bundled builds.
Only in there until Wez fixes it for real.
2003-04-20 03:03:28 +00:00
Edin Kadribasic
04d06dac3f Reinstating these two items due to the fact that current config.m4
detection for debug and thread-safe build does not work if sqlite
is built as a standalone extension with phpize.
2003-04-20 01:55:20 +00:00
Edin Kadribasic
a10c8a3e1c Erm, this works much better :) 2003-04-20 01:25:59 +00:00
Edin Kadribasic
3f95e99afc Set appropriate flags when compiling bundled lib in thread-safe
and debug modes.
2003-04-20 01:22:08 +00:00
Sara Golemon
7c8c09b3cf Revert change to stream_copy_to_stream() 2003-04-20 01:18:58 +00:00
Marcus Boerger
9e19524c5e Access the struct directly here 2003-04-19 19:06:52 +00:00
Ilia Alshanetsky
6bc4ce43d0 Do not hardcode php path. 2003-04-19 18:10:54 +00:00
Ilia Alshanetsky
e4c38aec5a Do not make the test rely on the availability of the cat command. 2003-04-19 17:45:46 +00:00
Sascha Schumann
e4183ae980 Extend print_table_row so that one can specify the CSS class
directly.  Add "vr" class which aligns the content to the right border.
2003-04-19 17:40:19 +00:00
Marcus Boerger
b99a491e33 Update to new macros 2003-04-19 15:01:22 +00:00
Wez Furlong
e17b8b4b12 More things todo 2003-04-19 13:04:19 +00:00
Wez Furlong
ff0d6adda4 Transparently decode binary encoded data.
Add a test-case for that process.

When encoding binary data, we mark the string with \x01 as its first character.
When returning data via sqlite_fetch_array(), if the first character is \x01,
then we decode the encoding.  This behaviour can be turned off by the optional
last parameter to sqlite_fetch_array(), for compatibility with databases
created with other applications.
2003-04-19 12:54:17 +00:00
Wez Furlong
de7874e11f Little fix for people building sqlite as a static extension 2003-04-19 11:47:17 +00:00
Marcus Boerger
5f97e66ba5 Add test for different result representations 2003-04-19 10:36:58 +00:00
Wez Furlong
6640260253 Fix 2 potential segfaults. 2003-04-19 10:28:45 +00:00
Moriyoshi Koizumi
6be2406b63 Made phpinfo() / gd_info() indicate availability of JIS feature 2003-04-19 07:44:16 +00:00
Moriyoshi Koizumi
54096d3f43 Fixed help text alignment 2003-04-19 07:15:38 +00:00
Rui Hirokawa
442798bbe5 fixed compilation problem in php-4.3.2dev. 2003-04-19 07:04:00 +00:00
Moriyoshi Koizumi
1f229c0851 MFBed Rui's patch 2003-04-19 04:33:38 +00:00
Sara Golemon
6dde464ce7 Let stream_copy_to_stream() accept either stream resource or filename/url string. If filename, open the file, do the copy, then close it. 2003-04-19 02:47:16 +00:00
Marcus Boerger
cde6bdce5c Improve test environment, fix 001.phpt and rename that one, also change from /tmp to dirname(__FILE__) 2003-04-18 20:53:18 +00:00
Marcus Boerger
16e873f864 Add a first simple open/close test 2003-04-18 20:08:01 +00:00
Marcus Boerger
d323659e5f ZTS fixes 2003-04-18 19:43:38 +00:00
Wez Furlong
ff93259b82 First "real" test.
If anyone is motivated to write more tests, please do so.
2003-04-18 19:22:49 +00:00
Wez Furlong
c568087d6e done: persistent connections 2003-04-18 16:42:28 +00:00
Wez Furlong
8f30d3e545 Implement sqlite_popen(), which opens persistent connections to an sqlite
database file.  (This saves the cost of sqlite reading/parsing the indices).

Persistent db connections have any pending transactions rolled back at request
shutdown time. (non-persistent connections are automatically rolled back when
they are closed).

Enhance sqlite_query() and sqlite_unbuffered_query() to use the C api
sqlite_exec() when the PHP script does not use the return value. This avoids
the extra work and memory allocation for holding result sets when they are not
needed.
2003-04-18 16:30:16 +00:00
Wez Furlong
d28e06d3b2 Update todo 2003-04-18 12:23:14 +00:00
Wez Furlong
8ed14ff16f Implement sqlite_unbuffered_query(), which works similarly to the mysql
function with a similar name.

Change sqlite_query() to use the same mechanism as the unbuffered query; this
moves the bulk of the memory allocations into the ZE memory manager, and will
hopefully be more efficient and less at risk of leaks.
2003-04-18 12:22:43 +00:00
Ilia Alshanetsky
7f94983ee0 Added missing safe_mode checks. 2003-04-18 00:20:22 +00:00
Sara Golemon
19ef914bb4 Catch up to Moriyoshi's streams megapatch 2003-04-17 23:59:28 +00:00
foobar
1e3e1d5880 CS cleanup + NS protection for some functions (used only in sockets.c btw) 2003-04-17 23:18:58 +00:00
Sara Golemon
f2654df92c Basic IPv4 and IPv6 loopback tests for ext/sockets 2003-04-17 23:09:17 +00:00
Sara Golemon
d06232a871 Add IPv6 support to ext/sockets 2003-04-17 21:04:47 +00:00
Wez Furlong
0098ae7dc6 Constants for error codes 2003-04-17 20:17:54 +00:00
Wez Furlong
a016cfb10a Folding markers 2003-04-17 20:09:45 +00:00
Wez Furlong
ec09b1b881 Add two new functions:
int sqlite_last_error($db) -- returns error code from last query

string sqlite_error_string(int code) -- returns english description of an error
code.
2003-04-17 20:08:00 +00:00
Wez Furlong
cca9ebddae Add pecl release version to phpinfo output 2003-04-17 19:13:21 +00:00
Wez Furlong
c38fc9bc27 and one more 2003-04-17 19:02:10 +00:00
Wez Furlong
aeeb56cb2d Add another todo 2003-04-17 19:01:26 +00:00
Wez Furlong
6a7502076d Update TODO. 2003-04-17 18:56:34 +00:00
Wez Furlong
3cf1e2c7ed Add safe_mode and open_basedir checks for the COPY SQL statement. 2003-04-17 18:54:40 +00:00
Wez Furlong
c54eff9f12 Update for new release 2003-04-17 17:31:50 +00:00
Wez Furlong
c53b5743df WS 2003-04-17 17:15:36 +00:00
Wez Furlong
4d9ca8f135 NULL columns are NULL pointers 2003-04-17 17:09:59 +00:00
Wez Furlong
4eba9b8b46 Implement sqlite_busy_timeout() which sets the retry timeout (in milliseconds)
when multiple processes attempt to lock and update the database.
2003-04-17 16:57:46 +00:00
Jay Smith
3fbb4dbdc0 Fix some segfaults in some of the pg_lo_* functions. 2003-04-17 16:54:43 +00:00
Wez Furlong
28128e4154 Segfault fixing! 2003-04-17 16:36:59 +00:00
Wez Furlong
3eb3805d47 Really fix build 2003-04-17 12:49:44 +00:00
Wez Furlong
b09dc0e03a Hopefully fix build... 2003-04-17 12:38:42 +00:00
Wez Furlong
5594945c76 Add dependency to generate header 2003-04-17 12:12:28 +00:00
Wez Furlong
f56412eace Update build files 2003-04-17 11:57:29 +00:00
Wez Furlong
c53017d4c3 Remove whitespace added while touching. 2003-04-17 11:44:06 +00:00
Wez Furlong
64d20f54c4 Touch generated files 2003-04-17 11:43:26 +00:00
Wez Furlong
05d5a35c9b Bundle relevant parts of sqlite 2.8.0.
# sqlite has a completely non-restrictive license
2003-04-17 11:27:30 +00:00
Wez Furlong
826583dc91 Nicer error message when an invalid function name is specified. 2003-04-17 03:38:20 +00:00
Wez Furlong
f7dbd9d909 Prep for release. 2003-04-17 03:19:33 +00:00
Wez Furlong
1c3b2a28d1 Update TODO and example.
Hide phpize crap from CVS
2003-04-17 03:15:13 +00:00
Wez Furlong
c73e304dc2 Implement a php function so that the following SQL can be used:
SELECT php('md5', sql) from sqlite_master

The php function has takes the name of a php function to call as the first
parameter; each additional parameter is passed on to the function, much like
call_user_func().

You can call both built-in and script-defined functions in this way.
2003-04-17 03:14:14 +00:00
foobar
2cd55ce73b touch 2003-04-17 02:54:23 +00:00
foobar
b319982868 add missing header 2003-04-17 02:53:32 +00:00
foobar
85874549d6 touch 2003-04-17 02:45:10 +00:00
Wez Furlong
5e0b9bb451 Implement sqlite_escape_string() function. 2003-04-17 02:20:26 +00:00
Wez Furlong
2d14d8b520 Implement safe_mode and open_basedir checks.
Add package.xml
2003-04-17 01:57:55 +00:00
Wez Furlong
cc5903adb4 Add readme and todo 2003-04-17 01:37:42 +00:00
Wez Furlong
25954d1d72 This commit was generated by cvs2svn to compensate for changes in r123706,
which included commits to RCS files with non-trunk default branches.
2003-04-17 01:29:45 +00:00
Moriyoshi Koizumi
0c5548e636 Fixed implicit cast issue with is*() and to*() functions 2003-04-16 21:40:48 +00:00
Moriyoshi Koizumi
0ad2fc2007 Fixed bug #19795
# to*() and is*() expect for their arguments an integer in range of 0 - 255
2003-04-16 21:10:29 +00:00
Moriyoshi Koizumi
ccbec3e56c Fixed typo 2003-04-16 20:00:46 +00:00
Moriyoshi Koizumi
8e15c4daff compiler warning fix and possible 64bit fix 2003-04-16 19:18:35 +00:00
Moriyoshi Koizumi
ec91e86850 Fixed bug #23080 2003-04-16 17:31:31 +00:00
Moriyoshi Koizumi
2a31fa0569 Fixed memleak 2003-04-16 15:10:01 +00:00
Moriyoshi Koizumi
6dd17c380d Added missing sanity check 2003-04-16 14:55:25 +00:00
Moriyoshi Koizumi
49b43ad115 Changed stream filter factory to be capable of accepting a zval as a parameter
instead of a string
2003-04-16 14:30:25 +00:00
Sascha Schumann
0bda867fe7 Simplify use of this header in external apps 2003-04-16 09:14:32 +00:00
Marcus Boerger
8363658641 Change to use safe_emalloc() and provide macro for now 2003-04-16 06:10:41 +00:00
foobar
b02dd10e03 SKIP -> SKIPIF 2003-04-16 02:21:30 +00:00
Ilia Alshanetsky
7f8bd25fcc Fixed bug #23225 (money_format() didn't handle erroneous return of strfmon)
# Initial patch proposed by marcot@tabini.ca
2003-04-16 01:07:03 +00:00
Ilia Alshanetsky
56e44a4fc2 Fixed bug #22939 (crash in imap_header_info()). 2003-04-16 00:58:30 +00:00
Ilia Alshanetsky
7d2b4cab36 Cleaner error handling. 2003-04-15 01:48:02 +00:00
Ilia Alshanetsky
f1bd3d539f Fixed bug #23187 (memory leaks in sybase_connect/sybase_pconnect).
Intial patch by: fukusaka@xa2.so-net.ne.jp
2003-04-15 00:59:42 +00:00
Marcus Boerger
da540a4d3b Fixed Bug #23188 CDB databases created with 'c' mode do not work. 2003-04-14 21:50:48 +00:00
Ilia Alshanetsky
3d6fccc08c Fixed bug #23152 ($http_response_header empty on invalid URLs) 2003-04-14 13:55:34 +00:00
Sara Golemon
9103aac254 Modify str_replace/str_ireplace to report how many needles were matched. (FR #8218) 2003-04-13 22:59:19 +00:00
Marcus Boerger
268ffda27d Reenable dba_popen() 2003-04-13 19:50:28 +00:00
Sergey Kartashoff
b296a3bd64 - Udm_Make_Excerpt has been fixed to be compatible with mnogosearch-3.2.10+ 2003-04-13 17:52:25 +00:00
Moriyoshi Koizumi
560efa10c0 Forgot about this one :) 2003-04-12 21:56:08 +00:00
Moriyoshi Koizumi
fa0ac8a273 Made dirname() binary-safe. 2003-04-12 21:53:46 +00:00
Sara Golemon
76965beb04 Add tests for strrpos/stripos, and minor fix to maintain BC for condition with empty needles/haystacks 2003-04-12 20:04:06 +00:00
Sara Golemon
0b5c1112c5 Rewrite strrpos and strripos to be binary safe and behave the way their prototype suggests (also like their counterparts strpos and stripos) i.e.: Allow string needles rather than just characters 2003-04-12 07:36:22 +00:00
Derick Rethans
a802e0d6b3 - Fixed protos 2003-04-11 09:53:01 +00:00
Hartmut Holzgraefe
e06fdaae8b accept possible leaks for now to make SELECTS with both bound parameters
and results again ...
2003-04-11 04:41:52 +00:00
Hartmut Holzgraefe
a1ff81d277 proto fix 2003-04-11 04:30:29 +00:00