Commit 37ba7ef0 authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic
Browse files

Bug 1672867: Upgrade ADODB to v5.20.9 with customizations



Final customizations for the upgrade.
Files removed:
  composer.json docs/ drivers/adodb-ads.inc.php drivers/adodb-oci8quercus.inc.php
  drivers/adodb-pdo_sqlsrv.inc.php
  any files from lang/ not adodb-en (the only one we use)

behatnotneeded

Change-Id: I1bf07086f94dc8d206d7e164f109e50dd835703f
Signed-off-by: Cecilia Vela Gurovic's avatarCecilia Vela Gurovic <ceciliavg@catalyst.net.nz>
parent 922633a8
......@@ -10,6 +10,15 @@ Modifications:
- check for Postgres 8.1 (c6dfccadfae432147fff99fa15b0985dcae7e503)
- Check for valid columns in adodb postgres64 driver MetaIndexes fn (b87d9961020a8d52a2eaf709a9197520b3c6b65b)
- add __wakeup to connection object (417077459037550239fe9b09bd20b50d4c19b57f)
- Deleted many files we're not using, including tests, docs, other drivers, other error langs
- Modified session variable setting from $_SESSION to $SESSION->set/get due to sessions now normally being closed.
- Moved the define ADODB_ASSOC_CASE_* calls as they are needed by ADONewConnection
- Deleted many files we're not using, including tests, docs, other drivers, other error langs (9d44b44a2ae1923c9a07105e6932cda1af30b099)
- Modified session variable setting from $_SESSION to $SESSION->set/get due to sessions now normally being closed. (f9818ff606bbe6ec00b34eab23d1743870407b48)
- Moved the define ADODB_ASSOC_CASE_* calls as they are needed by ADONewConnection (741aa7d2150d22e9206ffa1fd8a93e3f4d697324)
- Bug 1619036: Fix a bug when determine if an array is associative (606317195f8f3a8cdf9bc448c537b8c3708d75d7)
- Removing the obsolete adodb-mysql.inc.php (2f19a42ddd6af732e40b1aae9359ee80e28f9111)
- Adding back adodb-mysqli.inc.php (ac9e5527b3071447d6ee49ec2420f71f901dd167)
- escaping names when showing table / index (08939ca25acddff39b132e4bd823668b98447947)
- other files removed:
composer.json docs/ drivers/adodb-ads.inc.php drivers/adodb-oci8quercus.inc.php
drivers/adodb-pdo_sqlsrv.inc.php
any files from lang/ not adodb-en (the only one we use)
{
"name" : "adodb/adodb-php",
"description" : "ADOdb is a PHP database abstraction layer library",
"license" : [ "BSD-3-Clause", "LGPL-2.1" ],
"authors" : [
{
"name": "John Lim",
"email" : "jlim@natsoft.com",
"role": "Author"
},
{
"name": "Damien Regad",
"role": "Current maintainer"
},
{
"name": "Mark Newnham",
"role": "Developer"
}
],
"keywords" : [ "database", "abstraction", "layer", "library", "php" ],
"homepage": "http://adodb.org/",
"support" : {
"issues" : "https://github.com/ADOdb/ADOdb/issues",
"source" : "https://github.com/ADOdb/ADOdb"
},
"require" : {
"php" : ">=5.3.2"
},
"autoload" : {
"files" : ["adodb.inc.php"]
}
}
# ADOdb Documentation
ADOdb documentation is available in the following locations
- [Online](http://adodb.org/)
- [Download](https://sourceforge.net/projects/adodb/files/Documentation/) for offline use
## Legacy documentation
The old HTML files are available in
[GitHub](https://github.com/ADOdb/ADOdb/tree/8b8133771ecbe9c95e57abbe5dc3757f0226bfcd/docs),
or in the release zip/tarballs for version 5.20 and before on
[Sourceforge](https://sourceforge.net/projects/adodb/files/adodb-php5-only/).
## Changelog
The full historical [Changelog](changelog.md) is available on GitHub.
This diff is collapsed.
This diff is collapsed.
# ADOdb old Changelog - v3.x
See the [Current Changelog](changelog.md).
Older changelogs:
[v2.x](changelog_v2.x.md).
## 3.94 - 11 Oct 2003
- Create trigger in datadict-oci8.inc.php did not work, because all cr/lf's must be removed.
- ErrorMsg()/ErrorNo() did not work for many databases when logging enabled. Fixed.
- Removed global variable $ADODB_LOGSQL as it does not work properly with multiple connections.
- Added SQLDate support for sybase. Thx to Chris Phillipson
- Postgresql checking of pgsql resultset resource was incorrect. Fix by Bharat Mediratta bharat#menalto.com. Same patch applied to _insertid and _affectedrows for adodb-postgres64.inc.php.
- Added support for NConnect for postgresql.
- Added Sybase data dict support. Thx to Chris Phillipson
- Extensive improvements in $perf->UI(), eg. Explain now opens in new window, we show scripts which call sql, etc.
- Perf Monitor UI works with magic quotes enabled.
- rsPrefix was declared twice. Removed.
- Oci8 stored procedure support, eg. "begin func(); end;" was incorrect in _query. Fixed.
- Tiraboschi Massimiliano contributed italian language file.
- Fernando Ortiz, fortiz#lacorona.com.mx, contributed informix performance monitor.
- Added _varchar (varchar arrays) support for postgresql. Reported by PREVOT Stéphane.
## 3.92 - 22 Sept 2003
- Added GetAssoc and CacheGetAssoc to connection object.
- Removed TextMax and CharMax functions from adodb.inc.php.
- HasFailedTrans() returned false when trans failed. Fixed.
- Moved perf driver classes into adodb/perf/*.php.
- Misc improvements to performance monitoring, including UI().
- RETVAL in mssql Parameter(), we do not append @ now.
- Added Param($name) to connection class, returns '?' or ":$name", for defining bind parameters portably.
- LogSQL traps affected_rows() and saves its value properly now. Also fixed oci8 _stmt and _affectedrows() bugs.
- Session code timestamp check for oci8 works now. Formerly default NLS_DATE_FORMAT stripped off time portion. Thx to Tony Blair (tonanbarbarian#hotmail.com). Also added new $conn->datetime field to oci8, controls whether MetaType() returns 'D' ($this->datetime==false) or 'T' ($this->datetime == true) for DATE type.
- Fixed bugs in adodb-cryptsession.inc.php and adodb-session-clob.inc.php.
- Fixed misc bugs in adodb_key_exists, GetInsertSQL() and GetUpdateSQL().
- Tuned include_once handling to reduce file-system checking overhead.
## 3.91 - 9 Sept 2003
- Only released to InterAkt
- Added LogSQL() for sql logging and $ADODB_NEWCONNECTION to override factory for driver instantiation.
- Added IfNull($field,$ifNull) function, thx to johnwilk#juno.com
- Added portable substr support.
- Now rs2html() has new parameter, $echo. Set to false to return $html instead of echoing it.
## 3.90 - 5 Sept 2003
- First beta of performance monitoring released.
- MySQL supports MetaTable() masking.
- Fixed key_exists() bug in adodb-lib.inc.php
- Added sp_executesql Prepare() support to mssql.
- Added bind support to db2.
- Added swedish language file - Christian Tiberg" christian#commsoft.nu
- Bug in drop index for mssql data dict fixed. Thx to Gert-Rainer Bitterlich.
- Left join setting for oci8 was wrong. Thx to johnwilk#juno.com
## 3.80 - 27 Aug 2003
- Patch for PHP 4.3.3 cached recordset csv2rs() fread loop incompatibility.
- Added matching mask for MetaTables. Only for oci8, mssql and postgres currently.
- Rewrite of "oracle" driver connection code, merging with "oci8", by Gaetano.
- Added better debugging for Smart Transactions.
- Postgres DBTimeStamp() was wrongly using TO_DATE. Changed to TO_TIMESTAMP.
- ADODB_FETCH_CASE check pushed to ADONewConnection to allow people to define it after including adodb.inc.php.
- Added portugese (brazilian) to languages. Thx to "Levi Fukumori".
- Removed arg3 parameter from Execute/SelectLimit/Cache* functions.
- Execute() now accepts 2-d array as $inputarray. Also changed docs of fnExecute() to note change in sql query counting with 2-d arrays.
- Added MONEY to MetaType in PostgreSQL.
- Added more debugging output to CacheFlush().
## 3.72 - 9 Aug 2003
- Added qmagic($str), which is a qstr($str) that auto-checks for magic quotes and does the right thing...
- Fixed CacheFlush() bug - Thx to martin#gmx.de
- Walt Boring contributed MetaForeignKeys for postgres7.
- _fetch() called _BlobDecode() wrongly in interbase. Fixed.
- adodb_time bug fixed with dates after 2038 fixed by Jason Pell. http://phplens.com/lens/lensforum/msgs.php?id=6980
## 3.71 - 4 Aug 2003
- The oci8 driver, MetaPrimaryKeys() did not check the owner correctly when $owner == false.
- Russian language file contributed by "Cyrill Malevanov" cyrill#malevanov.spb.ru.
- Spanish language file contributed by "Horacio Degiorgi" horaciod#codigophp.com.
- Error handling in oci8 bugfix - if there was an error in Execute(), then when calling ErrorNo() and/or ErrorMsg(), the 1st call would return the error, but the 2nd call would return no error.
- Error handling in odbc bugfix. ODBC would always return the last error, even if it happened 5 queries ago. Now we reset the errormsg to '' and errorno to 0 everytime before CacheExecute() and Execute().
## 3.70 - 29 July 2003
- Added new SQLite driver. Tested on PHP 4.3 and PHP 5.
- Added limited "sapdb" driver support - mainly date support.
- The oci8 driver did not identify NUMBER with no defined precision correctly.
- Added ADODB_FORCE_NULLS, if set, then PHP nulls are converted to SQL nulls in GetInsertSQL/GetUpdateSQL.
- DBDate() and DBTimeStamp() format for postgresql had problems. Fixed.
- Added tableoptions to ChangeTableSQL(). Thx to Mike Benoit.
- Added charset support to postgresql. Thx to Julian Tarkhanov.
- Changed OS check for MS-Windows to prevent confusion with darWIN (MacOS)
- Timestamp format for db2 was wrong. Changed to yyyy-mm-dd-hh.mm.ss.nnnnnn.
- adodb-cryptsession.php includes wrong. Fixed.
- Added MetaForeignKeys(). Supported by mssql, odbc_mssql and oci8.
- Fixed some oci8 MetaColumns/MetaPrimaryKeys bugs. Thx to Walt Boring.
- adodb_getcount() did not init qryRecs to 0\. Missing "WHERE" clause checking in GetUpdateSQL fixed. Thx to Sebastiaan van Stijn.
- Added support for only 'VIEWS' and "TABLES" in MetaTables. From Walt Boring.
- Upgraded to adodb-xmlschema.inc.php 0.0.2.
- NConnect for mysql now returns value. Thx to Dennis Verspuij.
- ADODB_FETCH_BOTH support added to interbase/firebird.
- Czech language file contributed by Kamil Jakubovic jake#host.sk.
- PostgreSQL BlobDecode did not use _connectionID properly. Thx to Juraj Chlebec.
- Added some new initialization stuff for Informix. Thx to "Andrea Pinnisi" pinnisi#sysnet.it
- ADODB_ASSOC_CASE constant wrong in sybase _fetch(). Fixed.
## 3.60 - 16 June 2003
- We now SET CONCAT_NULL_YIELDS_NULL OFF for odbc_mssql driver to be compat with mssql driver.
- The property $emptyDate missing from connection class. Also changed 1903 to constant (TIMESTAMP_FIRST_YEAR=100). Thx to Sebastiaan van Stijn.
- ADOdb speedup optimization - we now return all arrays by reference.
- Now DBDate() and DBTimeStamp() now accepts the string 'null' as a parameter. Suggested by vincent.
- Added GetArray() to connection class.
- Added not_null check in informix metacolumns().
- Connection parameters for postgresql did not work correctly when port was defined.
- DB2 is now a tested driver, making adodb 100% compatible. Extensive changes to odbc driver for DB2, including implementing serverinfo() and SQLDate(), switching to SQL_CUR_USE_ODBC as the cursor mode, and lastAffectedRows and SelectLimit() fixes.
- The odbc driver's FetchField() field names did not obey ADODB_ASSOC_CASE. Fixed.
- Some bugs in adodb_backtrace() fixed.
- Added "INT IDENTITY" type to adorecordset::MetaType() to support odbc_mssql properly.
- MetaColumns() for oci8, mssql, odbc revised to support scale. Also minor revisions to odbc MetaColumns() for vfp and db2 compat.
- Added unsigned support to mysql datadict class. Thx to iamsure.
- Infinite loop in mssql MoveNext() fixed when ADODB_FETCH_ASSOC used. Thx to Josh R, Night_Wulfe#hotmail.com.
- ChangeTableSQL contributed by Florian Buzin.
- The odbc_mssql driver now sets CONCAT_NULL_YIELDS_NULL OFF for compat with mssql driver.
## 3.50 - 19 May 2003
- Fixed mssql compat with FreeTDS. FreeTDS does not implement mssql_fetch_assoc().
- Merged back connection and recordset code into adodb.inc.php.
- ADOdb sessions using oracle clobs contributed by achim.gosse#ddd.de. See adodb-session-clob.php.
- Added /s modifier to preg_match everywhere, which ensures that regex does not stop at /n. Thx Pao-Hsi Huang.
- Fixed error in metacolumns() for mssql.
- Added time format support for SQLDate.
- Image => B added to metatype.
- MetaType now checks empty($this->blobSize) instead of empty($this).
- Datadict has beta support for informix, sybase (mapped to mssql), db2 and generic (which is a fudge).
- BlobEncode for postgresql uses pg_escape_bytea, if available. Needed for compat with 7.3.
- Added $ADODB_LANG, to support multiple languages in MetaErrorMsg().
- Datadict can now parse table definition as declarative text.
- For DataDict, oci8 autoincrement trigger missing semi-colon. Fixed.
- For DataDict, when REPLACE flag enabled, drop sequence in datadict for autoincrement field in postgres and oci8.s
- Postgresql defaults to template1 database if no database defined in connect/pconnect.
- We now clear _resultid in postgresql if query fails.
## 3.40 - 19 May 2003
- Added insert_id for odbc_mssql.
- Modified postgresql UpdateBlobFile() because it did not work in safe mode.
- Now connection object is passed to raiseErrorFn as last parameter. Needed by StartTrans().
- Added StartTrans() and CompleteTrans(). It is recommended that you do not modify transOff, but use the above functions.
- oci8po now obeys ADODB_ASSOC_CASE settings.
- Added virtualized error codes, using PEAR DB equivalents. Requires you to manually include adodb-error.inc.php yourself, with MetaError() and MetaErrorMsg($errno).
- GetRowAssoc for mysql and pgsql were flawed. Fix by Ross Smith.
- Added to datadict types I1, I2, I4 and I8\. Changed datadict type 'T' to map to timestamp instead of datetime for postgresql.
- Error handling in ExecuteSQLArray(), adodb-datadict.inc.php did not work.
- We now auto-quote postgresql connection parameters when building connection string.
- Added session expiry notification.
- We now test with odbc mysql - made some changes to odbc recordset constructor.
- MetaColumns now special cases access and other databases for odbc.
## 3.31 - 17 March 2003
- Added row checking for _fetch in postgres.
- Added Interval type to MetaType for postgres.
- Remapped postgres driver to call postgres7 driver internally.
- Adorecordset_array::getarray() did not return array when nRows >= 0.
- Postgresql: at times, no error message returned by pg_result_error() but error message returned in pg_last_error(). Recoded again.
- Interbase blob's now use chunking for updateblob.
- Move() did not set EOF correctly. Reported by Jorma T.
- We properly support mysql timestamp fields when we are creating mysql tables using the data-dict interface.
- Table regex includes backticks character now.
## 3.30 - 3 March 2003
- Added $ADODB_EXTENSION and $ADODB_COMPAT_FETCH constant.
- Made blank1stItem configurable using syntax "value:text" in GetMenu/GetMenu2. Thx to Gabriel Birke.
- Previously ADOdb differed from the Microsoft standard because it did not define what to set $this->fields when EOF was reached. Now at EOF, ADOdb sets $this->fields to false for all databases, which is consist with Microsoft's implementation. Postgresql and mysql have always worked this way (in 3.11 and earlier). If you are experiencing compatibility problems (and you are not using postgresql nor mysql) on upgrading to 3.30, try setting the global variables $ADODB_COUNTRECS = true (which is the default) and $ADODB_FETCH_COMPAT = true (this is a new global variable).
- We now check both pg_result_error and pg_last_error as sometimes pg_result_error does not display anything. Iman Mayes
- We no longer check for magic quotes gpc in Quote().
- Misc fixes for table creation in adodb-datadict.inc.php. Thx to iamsure.
- Time calculations use adodb_time library for all negative timestamps due to problems in Red Hat 7.3 or later. Formerly, only did this for Windows.
- In mssqlpo, we now check if $sql in _query is a string before we change || to +. This is to support prepared stmts.
- Move() and MoveLast() internals changed to support to support EOF and $this->fields change.
- Added ADODB_FETCH_BOTH support to mssql. Thx to Angel Fradejas afradejas#mediafusion.es
- We now check if link resource exists before we run mysql_escape_string in qstr().
- Before we flock in csv code, we check that it is not a http url.
## 3.20 - 17 Feb 2003
- Added new Data Dictionary classes for creating tables and indexes. Warning - this is very much alpha quality code. The API can still change. See adodb/tests/test-datadict.php for more info.
- We now ignore $ADODB_COUNTRECS for mysql, because PHP truncates incomplete recordsets when mysql_unbuffered_query() is called a second time.
- Now postgresql works correctly when $ADODB_COUNTRECS = false.
- Changed _adodb_getcount to properly support SELECT DISTINCT.
- Discovered that $ADODB_COUNTRECS=true has some problems with prepared queries - suspect PHP bug.
- Now GetOne and GetRow run in $ADODB_COUNTRECS=false mode for better performance.
- Added support for mysql_real_escape_string() and pg_escape_string() in qstr().
- Added an intermediate variable for mysql _fetch() and MoveNext() to store fields, to prevent overwriting field array with boolean when mysql_fetch_array() returns false.
- Made arrays for getinsertsql and getupdatesql case-insensitive. Suggested by Tim Uckun" tim#diligence.com
## 3.11 - 11 Feb 2003
- Added check for ADODB_NEVER_PERSIST constant in PConnect(). If defined, then PConnect() will actually call non-persistent Connect().
- Modified interbase to properly work with Prepare().
- Added $this->ibase_timefmt to allow you to change the date and time format.
- Added support for $input_array parameter in CacheFlush().
- Added experimental support for dbx, which was then removed when i found that it was slower than using native calls.
- Added MetaPrimaryKeys for mssql and ibase/firebird.
- Added new $trim parameter to GetCol and CacheGetCol
- Uses updated adodb-time.inc.php 0.06.
## 3.10 - 27 Jan 2003
- Added adodb_date(), adodb_getdate(), adodb_mktime() and adodb-time.inc.php.
- For interbase, added code to handle unlimited number of bind parameters. From Daniel Hasan daniel#hasan.cl.
- Added BlobDecode and UpdateBlob for informix. Thx to Fernando Ortiz.
- Added constant ADODB_WINDOWS. If defined, means that running on Windows.
- Added constant ADODB_PHPVER which stores php version as a hex num. Removed $ADODB_PHPVER variable.
- Felho Bacsi reported a minor white-space regular expression problem in GetInsertSQL.
- Modified ADO to use variant to store _affectedRows
- Changed ibase to use base class Replace(). Modified base class Replace() to support ibase.
- Changed odbc to auto-detect when 0 records returned is wrong due to bad odbc drivers.
- Changed mssql to use datetimeconvert ini setting only when 4.30 or later (does not work in 4.23).
- ExecuteCursor($stmt, $cursorname, $params) now accepts a new $params array of additional bind parameters -- William Lovaton walovaton#yahoo.com.mx.
- Added support for sybase_unbuffered_query if ADODB_COUNTRECS == false. Thx to chuck may.
- Fixed FetchNextObj() bug. Thx to Jorma Tuomainen.
- We now use SCOPE_IDENTITY() instead of @@IDENTITY for mssql - thx to marchesini#eside.it
- Changed postgresql movenext logic to prevent illegal row number from being passed to pg_fetch_array().
- Postgresql initrs bug found by "Bogdan RIPA" bripa#interakt.ro $f1 accidentally named $f
## 3.00 - 6 Jan 2003
- Fixed adodb-pear.inc.php syntax error.
- Improved _adodb_getcount() to use SELECT COUNT(*) FROM ($sql) for languages that accept it.
- Fixed _adodb_getcount() caching error.
- Added sql to retrive table and column info for odbc_mssql.
## 4.990/5.05 - 11 Jul 2008
- Added support for multiple recordsets in mysqli Geisel Sierote <geisel#4up.com.br>. See http://phplens.com/lens/lensforum/msgs.php?id=15917
- Malcolm Cook added new Reload() function to Active Record. See http://phplens.com/lens/lensforum/msgs.php?id=17474
- Thanks Zoltan Monori [monzol#fotoprizma.hu] for bug fixes in iterator, SelectLimit, GetRandRow, etc.
- Under heavy loads, the performance monitor for oci8 disables Ixora views.
- Fixed sybase driver SQLDate to use str_replace(). Also for adodb5, changed sybase driver UnixDate and UnixTimeStamp calls to static.
- Changed oci8 lob handler to use &amp; reference $this-&gt;_refLOBs[$numlob]['VAR'] = &amp;$var.
- We now strtolower the get_class() function in PEAR::isError() for php5 compat.
- CacheExecute did not retrieve cache recordsets properly for 5.04 (worked in 4.98). Fixed.
- New ADODB_Cache_File class for file caching defined in adodb.inc.php.
- Farsi language file contribution by Peyman Hooshmandi Raad (phooshmand#gmail.com)
- New API for creating your custom caching class which is stored in $ADODB_CACHE:
```
include "/path/to/adodb.inc.php";
$ADODB_CACHE_CLASS = 'MyCacheClass';
class MyCacheClass extends ADODB_Cache_File
{
function writecache($filename, $contents,$debug=false){...}
function &readcache($filename, &$err, $secs2cache, $rsClass){ ...}
:
}
$DB = NewADOConnection($driver);
$DB->Connect(...); ## MyCacheClass created here and stored in $ADODB_CACHE global variable.
$data = $rs->CacheGetOne($sql); ## MyCacheClass is used here for caching...
```
- Memcache supports multiple pooled hosts now. Only if none of the pooled servers can be contacted will a connect error be generated. Usage example below:
```
$db = NewADOConnection($driver);
$db->memCache = true; /// should we use memCache instead of caching in files
$db->memCacheHost = array($ip1, $ip2, $ip3); /// $db->memCacheHost = $ip1; still works
$db->memCachePort = 11211; /// this is default memCache port
$db->memCacheCompress = false; /// Use 'true' to store the item compressed (uses zlib)
$db->Connect(...);
$db->CacheExecute($sql);
```
## 4.98/5.04 - 13 Feb 2008
- Fixed adodb_mktime problem which causes a performance bottleneck in $hrs.
- Added mysqli support to adodb_getcount().
- Removed MYSQLI_TYPE_CHAR from MetaType().
## 4.97/5.03 - 22 Jan 2008
- Active Record: $ADODB_ASSOC_CASE=1 did not work properly. Fixed.
- Modified Fields() in recordset class to support display null fields in FetchNextObject().
- In ADOdb5, active record implementation, we now support column names with spaces in them - we autoconvert the spaces to _ using __set(). Thx Daniel Cook. http://phplens.com/lens/lensforum/msgs.php?id=17200
- Removed $arg3 from mysqli SelectLimit. See http://phplens.com/lens/lensforum/msgs.php?id=16243. Thx Zsolt Szeberenyi.
- Changed oci8 FetchField, which returns the max_length of BLOB/CLOB/NCLOB as 4000 (incorrectly) to -1.
- CacheExecute would sometimes return an error on Windows if it was unable to lock the cache file. This is harmless and has been changed to a warning that can be ignored. Also adodb_write_file() code revised.
- ADOdb perf code changed to only log sql if execution time &gt;= 0.05 seconds. New $ADODB_PERF_MIN variable holds min sql timing. Any SQL with timing value below this and is not causing an error is not logged.
- Also adodb_backtrace() now traces 1 level deeper as sometimes actual culprit function is not displayed.
- Fixed a group by problem with adodb_getcount() for db's which are not postgres/oci8 based.
- Changed mssql driver Parameter() from SQLCHAR to SQLVARCHAR: case 'string': $type = SQLVARCHAR; break.
- Problem with mssql driver in php5 (for adodb 5.03) because some functions are not static. Fixed.
## 4.96/5.02 - 24 Sept 2007
ADOdb perf for oci8 now has non-table-locking code when clearing the sql. Slower but better transparency. Added in 4.96a and 5.02a.
Fix adodb count optimisation. Preg_match did not work properly. Also rewrote the ORDER BY stripping code in _adodb_getcount(), adodb-lib.inc.php.
SelectLimit for oci8 not optimal for large recordsets when offset=0. Changed $nrows check.
Active record optimizations. Added support for assoc arrays in Set().
Now GetOne returns null if EOF (no records found), and false if error occurs. Use ErrorMsg()/ErrorNo() to get the error.
Also CacheGetRow and CacheGetCol will return false if error occurs, or empty array() if EOF, just like GetRow and GetCol.
Datadict now allows changing of types which are not resizable, eg. VARCHAR to TEXT in ChangeTableSQL. -- Mateo Tibaquirá
Added BIT data type support to adodb-ado.inc.php and adodb-ado5.inc.php.
Ldap driver did not return actual ldap error messages. Fixed.
Implemented GetRandRow($sql, $inputarr). Optimized for Oci8.
Changed adodb5 active record to use static SetDatabaseAdapter() and removed php4 constructor. Bas van Beek bas.vanbeek#gmail.com.
Also in adodb5, changed adodb-session2 to use static function declarations in class. Thx Daniel Berlin.
Added "Clear SQL Log" to bottom of Performance screen.
Sessions2 code echo'ed directly to the screen in debug mode. Now uses ADOConnection::outp().
In mysql/mysqli, qstr(null) will return the string "null" instead of empty quoted string "''".
postgresql optimizeTable in perf-postgres.inc.php added by Daniel Berlin (mail#daniel-berlin.de)
Added 5.2.1 compat code for oci8.
Changed @@identity to SCOPE_IDENTITY() for multiple mssql drivers. Thx Stefano Nari.
Code sanitization introduced in 4.95 caused problems in European locales (as float 3.2 was typecast to 3,2). Now we only sanitize if is_numeric fails.
Added support for customizing ADORecordset_empty using $this-&gt;rsPrefix.'empty'. By Josh Truwin.
Added proper support for ALterColumnSQL for Postgresql in datadict code. Thx. Josh Truwin.
Added better support for MetaType() in mysqli when using an array recordset.
Changed parser for pgsql error messages in adodb-error.inc.php to case-insensitive regex.
## 4.95/5.01 - 17 May 2007
CacheFlush debug outp() passed in invalid parameters. Fixed.
Added Thai language file for adodb. Thx Trirat Petchsingh rosskouk#gmail.com
and Marcos Pont
Added zerofill checking support to MetaColumns for mysql and mysqli.
CacheFlush no longer deletes all files/directories. Only *.cache files
deleted.
DB2 timestamp format changed to var $fmtTimeStamp =
&quot;'Y-m-d-H:i:s'&quot;;
Added some code sanitization to AutoExecute in adodb-lib.inc.php.
Due to typo, all connections in adodb-oracle.inc.php would become
persistent, even non-persistent ones. Fixed.
Oci8 DBTimeStamp uses 24 hour time for input now, so you can perform string
comparisons between 2 DBTimeStamp values.
Some PHP4.4 compat issues fixed in adodb-session2.inc.php
For ADOdb 5.01, fixed some adodb-datadict.inc.php MetaType compat issues
with PHP5.
The $argHostname was wiped out in adodb-ado5.inc.php. Fixed.
Adodb5 version, added iterator support for adodb_recordset_empty.
Adodb5 version,more error checking code now will use exceptions if
available.
This diff is collapsed.
This diff is collapsed.
<?php
/*
@version v5.20.9 21-Dec-2016
@copyright (c) 2000-2013 John Lim. All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
Latest version is available at http://adodb.sourceforge.net
Portable version of oci8 driver, to make it more similar to other database drivers.
The main differences are
1. that the OCI_ASSOC names are in lowercase instead of uppercase.
2. bind variables are mapped using ? instead of :<bindvar>
Should some emulation of RecordCount() be implemented?
*/
// security - hide paths
if (!defined('ADODB_DIR')) die();
include_once(ADODB_DIR.'/drivers/adodb-oci8.inc.php');
class ADODB_oci8quercus extends ADODB_oci8 {
var $databaseType = 'oci8quercus';
var $dataProvider = 'oci8';
function __construct()
{
}
}
/*--------------------------------------------------------------------------------------
Class Name: Recordset
--------------------------------------------------------------------------------------*/
class ADORecordset_oci8quercus extends ADORecordset_oci8 {
var $databaseType = 'oci8quercus';
function __construct($queryID,$mode=false)
{
parent::__construct($queryID,$mode);
}
function _FetchField($fieldOffset = -1)
{
global $QUERCUS;
$fld = new ADOFieldObject;
if (!empty($QUERCUS)) {
$fld->name = oci_field_name($this->_queryID, $fieldOffset);
$fld->type = oci_field_type($this->_queryID, $fieldOffset);
$fld->max_length = oci_field_size($this->_queryID, $fieldOffset);
//if ($fld->name == 'VAL6_NUM_12_4') $fld->type = 'NUMBER';
switch($fld->type) {
case 'string': $fld->type = 'VARCHAR'; break;
case 'real': $fld->type = 'NUMBER'; break;
}
} else {
$fieldOffset += 1;
$fld->name = oci_field_name($this->_queryID, $fieldOffset);
$fld->type = oci_field_type($this->_queryID, $fieldOffset);
$fld->max_length = oci_field_size($this->_queryID, $fieldOffset);
}
switch($fld->type) {
case 'NUMBER':
$p = oci_field_precision($this->_queryID, $fieldOffset);
$sc = oci_field_scale($this->_queryID, $fieldOffset);
if ($p != 0 && $sc == 0) $fld->type = 'INT';
$fld->scale = $p;
break;
case 'CLOB':
case 'NCLOB':
case 'BLOB':
$fld->max_length = -1;
break;
}
return $fld;
}
}
<?php
/**
* Provided by Ned Andre to support sqlsrv library
*/
class ADODB_pdo_sqlsrv extends ADODB_pdo
{
var $hasTop = 'top';
var $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
var $sysTimeStamp = 'GetDate()';
function _init(ADODB_pdo $parentDriver)
{
$parentDriver->hasTransactions = true;
$parentDriver->_bindInputArray = true;
$parentDriver->hasInsertID = true;
$parentDriver->fmtTimeStamp = "'Y-m-d H:i:s'";
$parentDriver->fmtDate = "'Y-m-d'";
}
function BeginTrans()
{
$returnval = parent::BeginTrans();
return $returnval;
}
function MetaColumns($table, $normalize = true)
{
return false;
}
function MetaTables($ttype = false, $showSchema = false, $mask = false)
{
return false;
}
function SelectLimit($sql, $nrows = -1, $offset = -1, $inputarr = false, $secs2cache = 0)
{
$ret = ADOConnection::SelectLimit($sql, $nrows, $offset, $inputarr, $secs2cache);
return $ret;
}
function ServerInfo()
{
return ADOConnection::ServerInfo();
}
}
<?php
// Vivu Esperanto ĉiam!
// Traduko fare de Antono Vasiljev (anders[#]brainactive.org)
$ADODB_LANG_ARRAY = array (
'LANG' => 'eo',
DB_ERROR => 'nekonata eraro',
DB_ERROR_ALREADY_EXISTS => 'jam ekzistas',
DB_ERROR_CANNOT_CREATE => 'maleblas krei',
DB_ERROR_CANNOT_DELETE => 'maleblas elimini',
DB_ERROR_CANNOT_DROP => 'maleblas elimini (drop)',
DB_ERROR_CONSTRAINT => 'rompo de kondiĉoj de provo',
DB_ERROR_DIVZERO => 'divido per 0 (nul)',
DB_ERROR_INVALID => 'malregule',
DB_ERROR_INVALID_DATE => 'malregula dato kaj tempo',
DB_ERROR_INVALID_NUMBER => 'malregula nombro',
DB_ERROR_MISMATCH => 'eraro',
DB_ERROR_NODBSELECTED => 'datumbazo ne elektita',
DB_ERROR_NOSUCHFIELD => 'ne ekzistas kampo',
DB_ERROR_NOSUCHTABLE => 'ne ekzistas tabelo',
DB_ERROR_NOT_CAPABLE => 'DBMS ne povas',
DB_ERROR_NOT_FOUND => 'ne trovita',
DB_ERROR_NOT_LOCKED => 'ne blokita',
DB_ERROR_SYNTAX => 'sintaksa eraro',
DB_ERROR_UNSUPPORTED => 'ne apogata',
DB_ERROR_VALUE_COUNT_ON_ROW => 'nombrilo de valoroj en linio',
DB_ERROR_INVALID_DSN => 'malregula DSN-o',
DB_ERROR_CONNECT_FAILED => 'konekto malsukcesa',
0 => 'ĉio bone', // DB_OK