Georg Richter
b3a437fcc4
Fix for bug #36802 (server crashes with invalid/not opened connections)
...
Added status to mysqli_resource:
MYSQLI_STATUS_UNKNOWN
MYSQLI_STATUS_CLEARED (for future use)
MYSQLI_STATUS_INITIALIZED (after mysqli_init and mysqli_stmt_init)
MYSQLI_STATUS_VALID (for valid objects)
removed valid flag
changed MYSQLI_FETCH_RESOURCE
added last parameter __check which specifies the status
2006-03-24 09:32:24 +00:00
Ilia Alshanetsky
d76e149f0e
Fixed bug #36802 (mysqli_set_charset() crash with a non-open connection).
2006-03-21 15:35:28 +00:00
Georg Richter
829642a0b7
fixed a 64-bit problem reported by Pierre
2006-03-14 15:53:16 +00:00
Georg Richter
e13e2fe9ba
fix for MySQL 5.1 (see http://bugs.mysql.com/?id=16144 )
2006-03-11 11:16:03 +00:00
Ilia Alshanetsky
1aa1c535b5
Remove no longer needed check (checked at a higher level now).
2006-03-01 18:37:11 +00:00
Antony Dovgal
1e8aad5075
MFH: add checks and fix possible reincarnations of bug #36420
2006-02-16 20:58:59 +00:00
Ilia Alshanetsky
ce9dfedc69
Fixed bug #36420 (segfault when access result->num_rows after calling
...
result->close())
2006-02-16 16:03:27 +00:00
Georg Richter
04ac1f7fd1
2nd attempt: implementation of 36007
...
1st commit stopped with protocol error - never seen that before :-(
2006-01-14 14:15:41 +00:00
Andrey Hristov
3a75666285
WS
2006-01-01 16:55:01 +00:00
Andrey Hristov
d03aea048f
fetch more than one row at once
2006-01-01 16:52:05 +00:00
foobar
5bd93221a8
bump year and license version
2006-01-01 12:51:34 +00:00
Georg Richter
a5acdfc5f2
Fix for bug #35517 :
...
added missing unsigned flag for result buffer
fixed returncode in mysql_stmt_fetch for data truncation
2005-12-29 09:49:19 +00:00
Zeev Suraski
7669169bd5
Whitespace fix (don't ask :)
2005-12-26 09:28:38 +00:00
Andrey Hristov
eea08af619
fix small memory leak which emerged two days ago
2005-12-23 22:22:42 +00:00
Stefan Esser
f7c77f0f33
Beware of format strings...
2005-12-23 18:23:43 +00:00
Andrey Hristov
1c0971f3ce
fix for bug# 35759
...
(mysqli_stmt_bind_result() makes huge allocation when column empty)
#this shows some leaks now, which has to be investigated but closes the
#bug report.
2005-12-22 18:11:39 +00:00
Zeev Suraski
a034972797
Fix prototype
2005-12-22 14:55:55 +00:00
foobar
06b36f7cea
MFH: nuke php3 legacy
2005-12-06 01:40:06 +00:00
Andrey Hristov
c23052d6d2
fix compile failure on Windows - Microsoft hasn't heard of long long :)
2005-12-01 14:12:56 +00:00
Andrey Hristov
4ec16344a9
add a test case
...
fix incorrect handling of unsigned bigint.
optimize handling of unsigned int
2005-11-30 16:20:25 +00:00
Andrey Hristov
a8c0463961
fix more leaks. handle better unknown type (4.1.x connected to 5.0.x
...
incompatibility)
2005-11-30 15:26:41 +00:00
Andrey Hristov
c230f7defb
fix a crash and a leak.
...
4.1.15 (client) -> 5.x (server) because of the incompatibility because of
decimal in the protocol binding may fail. Don't close the statement in
that case because subsequent ->execute() will crash or any other function
that will try to use already freed (and in debug mode thrashed) pointer.
#probably more problems exist because of the 4.1.x -> 5.x protocol
#incompatibility
2005-11-30 11:35:03 +00:00
foobar
37661c8b39
- Always use the right sed
2005-11-29 17:32:40 +00:00
Andrey Hristov
da9abd8b73
mysql 4.1.x gives strange result. the result in the test is generated with
...
5.0.16 (valid for 5.1.3).
2005-11-28 13:35:54 +00:00
Andrey Hristov
1d3f0d8891
fix test - unsigned it is casted to 0 in mysql sql_mode
2005-11-25 01:13:56 +00:00
Ilia Alshanetsky
13996df552
Fixed test
2005-11-22 01:57:02 +00:00
Dmitry Stogov
d3e0b57e1a
Allow recursive calls to __get/__set for different properties
2005-11-15 14:28:40 +00:00
Andrey Hristov
df2c11b731
test fetching of unsigned int(11)
2005-11-08 14:43:49 +00:00
Andrey Hristov
64e8f63978
fix test - putting signed into unsigned produces 0, if not in strict mode
...
(in strict mode this will fail)
2005-11-08 14:06:40 +00:00
Andrey Hristov
00a9f063f8
on 32bit platform if the column is UNSIGNED INT(11) and the value
...
is greater than 2^31-1 then convert to string. on 64bit this is of no
problem because there long inside zval is big enough to keep unsigned
int(11)
2005-11-08 13:50:50 +00:00
Antony Dovgal
62ca4594f8
MFH: use php_error_docref() instead of php_error() everywhere
2005-10-18 13:51:50 +00:00
Antony Dovgal
d8e5ee075f
MFH: fix bug #34902 (mysqli::character_set_name() - undefined method)
2005-10-18 10:02:36 +00:00
Georg Richter
b343aa9945
fixed an error in mysqli_fetch_fields (function returns NULL instead of array
...
when row_number > num_fields).
Thanks to Marc Deslisle and phpMyAdmin team for the report.
2005-10-15 06:32:26 +00:00
Ilia Alshanetsky
d18cdaf6dd
MFH: fix test failures
2005-10-13 21:26:45 +00:00
Antony Dovgal
2bc716c131
fix TS build
2005-10-12 13:31:46 +00:00
Antony Dovgal
062626d03e
use proper macros and vars instead of strlen()
2005-10-10 20:06:35 +00:00
Antony Dovgal
a5cea052e8
fix #34818 (new mysqli_stmt() and several others crash if the first parameter is not a valid mysqli_link)
2005-10-10 20:03:00 +00:00
Antony Dovgal
410e106aae
fix #34810 (mysqli::init() and others use wrong $this pointer without checks)
2005-10-10 12:57:55 +00:00
Andrey Hristov
24af08eb80
add charsetnr and length to the object returned. this is kind of bug
...
because fetch_fields() and fetch_field() return that info and
fetch_field_direct() does not
2005-10-09 17:03:01 +00:00
Georg Richter
7357ac0b96
fix for bug 34785:
...
added support for parent::__construct (mysqli_statement and mysqli_resultset)
fixed failed testcases when sql_mode is in effect
2005-10-08 15:08:07 +00:00
Antony Dovgal
0dce979bfc
MFH: fix #32081 (mysqli_real_connect(): mysqli.default_socket in php.ini has no effect) for real
2005-09-22 20:14:34 +00:00
Antony Dovgal
bd7a277d48
fix #34450 (Segfault when calling mysqli_close() in destructor)
2005-09-13 09:20:18 +00:00
Andrey Hristov
f25c366a73
add a comment
2005-08-06 16:56:42 +00:00
Andrey Hristov
313ff9998e
add error checking
2005-08-06 16:38:48 +00:00
Andrey Hristov
dcc18b6d6f
fix problem on 64 bit - when asking for "l" supply long not int because
...
on 64 bit they differ and zend_parse_parameters makes a *(long*) cast
which means that if the variable is int 4 bytes of the variable(s)
declared before it (on the stack) will be overwritten. In this case
this is the length of the query -> made 0 and mysqli_query() returns
FALSE.
2005-08-06 16:15:53 +00:00
foobar
23e671a51e
- Bumber up year
2005-08-03 14:08:58 +00:00
foobar
40a049b27e
Skip tests in 64bit systems
2005-07-20 00:18:24 +00:00
Antony Dovgal
502b00c3f6
add forgotten ifdefs, fix #33667 (mysqli doesn't compile)
2005-07-12 20:38:34 +00:00
Georg Richter
9aabcf7016
changed version dependency for charset functions
2005-07-12 15:45:07 +00:00
Georg Richter
9caaee66bd
removed charset structure. libmysql now provides a function
...
mysqli_get_character_set_info (Vers. 5.0.10)
2005-07-12 09:35:16 +00:00
foobar
a7e85b3c07
Make sure we get a WARNING and not an ERROR here :)
2005-07-08 08:53:25 +00:00
foobar
b35224fa81
add test case
2005-06-27 19:07:52 +00:00
Antony Dovgal
b16beb540c
fix #33491 (crash after extending MySQLi internal class)
2005-06-27 17:40:37 +00:00
Antony Dovgal
689f3488a5
fix couple of leaks in MySQLi
2005-06-27 17:33:56 +00:00
foobar
8eb44394cb
set_charset() is only available in mysql versions > 4.1.12
2005-06-27 10:34:42 +00:00
foobar
0b35120921
do not pollute other directories and cleanup after test
2005-06-27 10:14:11 +00:00
Georg Richter
01108f7879
fix for #33474
2005-06-26 04:44:03 +00:00
Georg Richter
224b12ba8b
reverted Ilias changes - added get_warnings methods
...
(forgot to commit the file in my last commit)
2005-06-24 14:44:45 +00:00
Ilia Alshanetsky
50d32d4d7e
temporary fix to let mysqli extension build, so we can make a release.
2005-06-23 02:15:04 +00:00
Ilia Alshanetsky
00f14fbd74
Slightly more reliable current path detection.
2005-06-22 13:41:59 +00:00
Ilia Alshanetsky
46b276ee4b
Skip MySQLi tests if connection could not be established and not using
...
embeded db.
2005-06-22 13:41:43 +00:00
Georg Richter
ce972676b5
added testcase for mysqli_warning class
2005-06-22 10:15:37 +00:00
Georg Richter
976be82fb9
added testcase for cursors (nested selects)
2005-06-22 10:14:32 +00:00
Georg Richter
6fba73e8e2
changed/fixed mysqli_warning class
...
added prefetch support for cursors
2005-06-22 09:12:43 +00:00
Georg Richter
15563f8d91
fix for bug #33263 (mysqli_real_escape doesn't work in __construct)
2005-06-17 16:32:43 +00:00
foobar
bf94716838
- Allow doing --with-mysql --with-mysqli (no mysql libs are bundled atm)
...
- Make sure MYSQL_DIR is empty.
2005-06-07 12:39:02 +00:00
Wez Furlong
e9d474dc01
fixes for #33251
2005-06-05 19:25:01 +00:00
Georg Richter
d486da963e
added new function mysqli_get_charset
2005-06-03 08:49:01 +00:00
foobar
a20383ba06
- Unify the "configure --help" texts
2005-05-29 23:17:16 +00:00
Georg Richter
230681b0b3
enabled set_charset for MySQL Versions >= 5.0.6
...
added testcase for bug #33090
2005-05-21 08:46:46 +00:00
Georg Richter
3e416f738c
fix for bug #33090 (mysql_prepare doesn't return error)
2005-05-21 08:38:53 +00:00
Georg Richter
d72cd1d130
charsets_dir is no longer needed
2005-05-13 13:56:04 +00:00
Georg Richter
d8f91dc44c
mysql_set_charset now works version undependent for MySQL 4.1.13 and above
2005-05-13 13:30:22 +00:00
Georg Richter
49e1484da8
- fixed compile error under windows. Functionality for changing the
...
character set was moved to libmysql (4.1 bk tree - will be merged into
5.0 within the next days).
- renamed mysql_set_character_set to mysqli_set_charset
2005-05-13 13:11:41 +00:00
Andrey Hristov
8e97019a69
after throwing an warning bail out
2005-05-09 22:29:54 +00:00
Andrey Hristov
b4464a2d6a
mysqli won't compile with Zend2 API before 2001 - in these days there was
...
no Zend2
2005-05-09 22:29:21 +00:00
Andrey Hristov
d5e0b8a628
MFB
2005-05-09 21:48:03 +00:00
foobar
8d00609794
- We skip tests when the extension is not loaded..in the php.ini
2005-05-09 21:16:49 +00:00
foobar
db1a5ab243
revert pointless patch
2005-05-09 21:16:06 +00:00
Andrey Hristov
02d0f72596
also test shared builds
2005-05-09 16:23:22 +00:00
Georg Richter
b654b20ef6
Added new function mysqli_set_character_set_name
2005-05-08 08:39:56 +00:00
Andrey Hristov
daae299653
revert this one till we have a better way to inform the user where the
...
truncation has occured
2005-05-07 12:46:29 +00:00
Andrey Hristov
91b3b49f14
return MYSQLI_DATA_TRUNCATED if data happens to be truncated
...
#the manual has to be updated
2005-05-07 08:23:39 +00:00
Andrey Hristov
70da059cc0
return directly
2005-05-07 08:03:35 +00:00
Andrey Hristov
b7df40a75a
bail out when detecting incorrect number of parameters to be bound.
2005-05-07 07:44:41 +00:00
Andrey Hristov
60c0c8e95c
initialize values because the call to zend_parse_parameters may not do it
2005-05-06 10:09:42 +00:00
Georg Richter
929e3851f2
fixed memleak in mysqli_close
...
fixed bug #32956 (mysqli_bind_result doesn't support MYSQL_TYPE_NULL)
2005-05-05 13:02:32 +00:00
Andrey Hristov
e640960186
multi_query is no more global
...
#thanks Sebastian!
2005-04-29 10:23:55 +00:00
Ilia Alshanetsky
8abc1d3b9c
e* allocation cannot fail.
2005-04-28 23:49:04 +00:00
Andrey Hristov
3b3ce2b610
fix bug #32013(MySQLi bind_result causes fatal error: memory limit reached)
...
#this is a partial fix but it cannot be better. the user has to call
#$stmt->store_result() and for a BLOB/MEDIUTEXT (and larger) space will be
#allocated as big as the biggest column value.
2005-04-27 17:53:15 +00:00
Andrey Hristov
f6b12b351e
MFB (fixing bug 31668)
2005-04-27 12:12:58 +00:00
Georg Richter
2bcae57b31
another fix for last commit (committed from wrong tree) :(
2005-04-20 13:24:08 +00:00
Georg Richter
9c1960c398
fixed typo in last commit :(
2005-04-20 13:03:01 +00:00
Georg Richter
649a8b18ef
added support for data truncation (bind_result) for MySQL 5.0.5
2005-04-20 12:50:13 +00:00
Andrey Hristov
2652762dcd
MFB
2005-04-19 15:45:07 +00:00
Andrey Hristov
eef94ff4bb
add a test case for Bug #32405 (the previous commit incorporated a fix
...
for it).
2005-04-19 13:29:37 +00:00
Andrey Hristov
2a3c71b833
- nail down another 64bit problem. this will fix about 14 failing tests
...
on amd64 (probably other 64 bit arch).
- use ulong for this boolean variable, as it was before
- throw an warning if offset passed to mysqli_stmt_data_seek is negative
2005-04-19 13:28:41 +00:00
Andrey Hristov
155b90db20
- fixing all "long" into "int" fetching problems (cause memory corruption
...
on 64 bit)
- nail down a problem because of the new MYSQL_TYPE_NEWDECIMAL introduced
in MySQL 5.0+
- Add more info to the autocommit test
2005-04-19 12:59:16 +00:00
Georg Richter
21cae3966c
cursor support for 5.0.4 (STMT_ATTR_CURSOR_TYPE changed to enum)
2005-04-18 06:03:29 +00:00
Georg Richter
f6ecb58448
fix for bug #32282 (segfault in mysqli_fetch_array on 64-bit)
2005-04-06 06:47:12 +00:00