summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2025-03-22Merge branch 'hotfix/5.22'Damien Regad1-7/+13
# Conflicts: # adodb.inc.php # docs/changelog.md
2025-03-22Fix SQLite error reportingraspopov1-7/+13
Without debug flag, the library returns '0' instead of error messages and correct SQLite error codes. Fixes #1061, PR #1062
2025-01-25Merge tag 'v5.22.8'Damien Regad2-14/+72
ADOdb version 5.22.8 released 2025-01-25 # Conflicts: # adodb.inc.php # docs/changelog.md # drivers/adodb-postgres64.inc.php
2025-01-25mysqli: Improve setConnectionParameterlook-was-here1-8/+60
- Simplify control statements with single if expressions. - Updated phpdoc with additional details on how to set connection property values. - Removed to-do that seemed wrong since the user should use setConnectionParameter for those or set the property directly. - Allow setting of ssl cert property values, clientFlags, port, and socket using the standard setConnectionParameter functionality. Feedback updates: - Return false for special cases with type checks on sslsert, socket, clientflags, or port fail - Added invalid connection param to output. - Simplified isset checks. - Changed sslcert to ssl and simplified subkeys to ('key', 'cert', 'ca', 'capath', 'cipher'). - Removed code duplication. - is_numeric should be checking value not parameter Fixes #1044
2025-01-25mysql: SSL not working due to wrong socket/flagslook-was-here1-2/+7
- Remove inappropriate setting of socket. - Updated to use appropriate bitwise operations to check for set SSL client flags and update the default to not overwrite set user flags. - Add friendly error to let user know they need to add a SSL client flag when using certificates. Fixes #919, #1043 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2025-01-25pgsql: fix serverInfo() version numberDamien Regad1-6/+5
In ADOdb versions < 5.21.0-beta.1, serverInfo()['version'] returned just the version number (e.g. `15.10`), which was extracted from the version string using ADOConnection::_findVers(). Commit f2b88e063d61b12a1df9090b8d0c68831ed0f447 removed the _findVers() call, so serverInfo() could potentially return additional information depending on the actual value returned by pg_version() (e.g. `15.10 (Debian 15.10-0+deb12u1)`. This could cause subsequent version comparisons to fail, e.g. in metaTables(). Fixes #1059
2024-12-23Fix typosAndreas Deininger7-11/+11
2024-12-15Merge branch 'hotfix/5.22'Damien Regad2-18/+43
# Conflicts: # adodb-datadict.inc.php
2024-08-28Fixing DB2 *LOCAL connectionCalvin Buckley1-9/+4
Per https://github.com/ADOdb/ADOdb/pull/1034#issuecomment-2136155259 Signed-off-by: Damien Regad <dregad@mantisbt.org> Fixed conflict resolution when applying patch.
2024-08-28move local schema outside of debug blockMark Newnham1-2/+5
2024-08-28Added SCHEMA to *LOCALMark Newnham1-8/+6
2024-08-28Added SET SCHEMA supportMark Newnham1-0/+8
2024-08-28Handle connection re-use using *LOCALMark Newnham1-13/+36
2024-05-26oci8: fix warning in qStr() with NULL on PHP 8.1Damien Regad1-5/+2
This is a follow-up commit on 1501ccd07868d626a51802d14ed41ed05a3532ad, as the original fix for #999 (see PR #1005) did not fully address the problem. Another PHP deprecated warning is thrown: strlen(): Passing null to parameter 1 ($string) of type string is deprecated. Fixes #1012 Backported from commit 8d88183538ae08b86c30af5b0f3280c2accd71c3.
2024-05-26Reset fetch mode before return from MetaColumns()Damien Regad1-5/+3
Commit 249b7fb08569ce576cd1bf26098e00701145c6ec (PR #1017) introduced a regression caused by returning from the function without resetting $ADODB_FETCH_MODE to its original value. Fixes #1016
2024-05-26Fixes per code reviewMark Newnham1-11/+7
2024-05-26Fix static analysis warningsDamien Regad1-1/+6
- remove unused variable - ignore changed method parameter name - add missing break statements in switch
2024-05-26Whitespace, coding guidelinesDamien Regad1-170/+145
2024-05-26PHPDoc fixes and improvementsDamien Regad1-16/+17
2024-05-26Update of LDAP DriverMark Newnham1-126/+302
- Now supports all ADOdb methods - Honors ADODB_ASSOC_CASE - Honors ADODB_FETCH_MODE - Supports setConnectionParameter()
2024-04-30Merge branch 'hotfix/5.22'Damien Regad1-0/+23
2024-04-30MySQL: allow forcing emulated prepared statementsPaweł Kudzia1-0/+23
ADOdb 5.22.0 introduced use of bound variables and prepared statements, which broke compatibility with Manticore Search and ClickHouse. Adding $doNotUseBoundVariables property, allowing to revert to emulated prepared statements, used in ADODb until v5.21. Fixes #1028, PR #1029 Co-authored-by: Damien Regad <dregad@mantisbt.org> Reworded and formatted PHPDoc block, fixed coding guidelines.
2024-03-22Merge branch 'hotfix/5.22'Damien Regad1-1/+1
2024-03-22ldap: PHP 8.2 error when $LDAP_CONNECT_OPTIONS not setDamien Regad1-1/+1
Calling connect() method When the $LDAP_CONNECT_OPTIONS global variable is not set results in PHP Fatal error: Uncaught TypeError: count(): Argument 1 ($value) must be of type Countable|array, null given. Replacing count()>0 by !empty() to avoid the problem. Fixes #1009
2024-01-12Fix static analysis warningsDamien Regad1-36/+44
2024-01-11Merge branch 'hotfix/5.22'Damien Regad1-0/+4
Signed-off-by: Damien Regad <dregad@mantisbt.org> # Conflicts: # adodb.inc.php # docs/changelog.md
2024-01-10Catch getAssoc() execution error in metaColumns()Jessie den Ridder1-0/+4
When getAssoc() returns false, metaColumns() throws PHP Fatal error on array_change_key_case, bool given instead of array. We now check that getAssoc() completed successfully before continuing, and abort if not. Fixes #1016 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2023-11-18oci8: fix warning in qStr() with NULL on PHP 8.1Damien Regad1-5/+2
This is a follow-up commit on 1501ccd07868d626a51802d14ed41ed05a3532ad, as the original fix for #999 (see PR #1005) did not fully address the problem. Another PHP deprecated warning is thrown: strlen(): Passing null to parameter 1 ($string) of type string is deprecated. Fixes #1012
2023-11-04Merge tag 'v5.22.7'Damien Regad1-1/+1
# Conflicts: # adodb.inc.php # docs/changelog.md
2023-11-04oci8: Fix Automatic conversion of false to arrayDamien Regad1-1/+1
On PHP 8.1, when the _query() method is called, the oci8 driver throws Automatic conversion of false to array is deprecated. Fixes #998
2023-11-04PDO oci: wrong max_length when precision > 0Damien Regad1-2/+4
When metaColumns() is called for a table having a NUMBER column with a non-zero scale (e.g. NUMBER(8,2)), the PDO oci driver incorrectly sets the ADOFieldObject's max_length to the column's length instead of its precision. Align handling of number fields in ADODB_pdo_oci::metaColumns() to match the oci8 driver's correct behavior. Fixes #1007
2023-11-04Remove unused ADORecordSet_ext_oci8 classDamien Regad1-8/+0
This legacy class is a leftover of the old ADOdb extension, which should have been removed as part of 376249c45f9e51e327ab0af22e9bfc9918abc0b4 (see #270).
2023-11-04Fix static analysis, coding guidelinesDamien Regad2-13/+12
2023-11-04oci8: replace CAT synonym by USER_CATALOGDamien Regad4-4/+20
Update $metaTablesSQL to use standard USER_CATALOG view name instead of CAT synonym, and standardize the query across the whole Oracle drivers family.
2023-11-04oci8: replace usage of deprecated COL viewDamien Regad4-11/+32
Update the $metaColumnsSQL statements in oci8, oci8po, pdo_oci and odbc_oracle drivers to use USER_TAB_COLUMNS instead of COL. Change was not applied to the deprecated oracle driver. Since the contents of the COL.NULLS column (`NULL` / `NOT NULL`) is not the same as the equivalent USER_TAB_COLUMNS.NULLABLE (`Y` / `N`), we can get rid of the CASE statement in $metaColumnsSQL2 and simplify the processing in metaColumns() method, to use a simple string comparison instead of a strncmp() call to populate ADOFieldObject's not_null property. Fixes #1006
2023-11-01Merge branch 'hotfix/5.22'Damien Regad2-0/+5
2023-11-01Fix mysqli bulkBind reset after one callSidney Beck Nys1-0/+2
Stored the current bulkBind value in a variable so $this->bulkBind can be reset after being set to false. Fixes #1000 (PR #1300)
2023-11-01Prevent str_replace NULL test error in PHP 8.1 (#1005)Mark Newnham1-0/+3
2023-10-18Remove remaining ADOdb date/time function callsJoe Bordes9-23/+19
This is a follow-up on commit bffa42e206d758af3095b8a0bdbf3c3ad8fb5e51. Following removal of adodb-time library, some function calls were not cleaned up in the code base. This fixes that. Includes a standalone test script to validate the functionality. Fixes #970 (PR #1002)
2023-07-25Merge branch 'hotfix/5.22'Damien Regad1-27/+27
2023-07-25Remove unnecessary is_array() checkDamien Regad1-23/+22
2023-07-25oci8: deprecation warning in selecLimit() on PHP 8.1wesyah2341-4/+5
'Automatic conversion of false to array is deprecated' warning is triggered when $inputarr parameter is not provided (defaulted to false). Fixes #992
2023-06-12Merge branch 'hotfix/5.22'Damien Regad1-1/+1
# Conflicts: # adodb.inc.php # docs/changelog.md
2023-06-12Update ADODB_db2::_query() declaration to match parentDamien Regad1-1/+1
Regression from ae2438b731d24bf0bb159a738599b9266120e96e. Fixes #987
2023-06-11Merge branch 'hotfix/5.22'Damien Regad2-4/+24
2023-06-11PR #779 follow-upDamien Regad1-6/+12
- Add missing global var declaration - Coding guidelines - Comment usage of @ operator - Update changelog
2023-06-11pgsql: avoid Insert_ID() failing when lastval() is not setNathan Gibbs1-5/+11
If Insert_ID() is executed before nextval() has been called in the current session, SELECT lastval() will fail with `ERROR: lastval is not yet defined in this session`. When using Exceptions, this causes one to be thrown but this is not the expected behavior, as the function is expected to just return false in this case. Fixes #978 Signed-off-by: Damien Regad <dregad@mantisbt.org> Rewritten commit message
2023-06-10Incorrect ADORecordset::$fetchMode initializationDamien Regad9-13/+9
Regression introduced by 5c9e24cf98409004da2a5e5bd80eeec82c5a3997 For some drivers using native fetch mode constants, the $fetchMode property was not set properly as the switch statement assigning its value was driven by the constructor's $mode parameter instead of the parent constructor's $adodbFetchMode property. Fixes #980
2023-05-24Fail connection if mysqlnd is not availableDamien Regad1-0/+8
Since 5.22.0, the mysqli driver relies on the mysqli_stmt_get_result() function, which is only available in the MySQL Native Driver, to execute queries. An attempt to connect on a system using libmysqlclient should fail with an error message, to avoid problems down the line. Fixes #967
2023-05-22Merge branch 'hotfix/5.22'Damien Regad4-4/+7