Home » Database » MDB2_Driver_mssql
mssql MDB2 driver
This package is unmaintained.
Download latest release 1.5.0b4 (archived versions might be outdated)
License: BSD License
Description
This is the MS SQL Server MDB2 driver.
Maintainers
- David Coallier (davidc) — lead, active
- Lukas Kahwe Smith (lsmith) — lead, inactive
- Nathan Fredrickson (nrf) — lead, active
- Lorenzo Alberton (quipo) — lead, active
- Ali Fazelzadeh (afz) — helper, active
Dependencies
Required
- PHP (>= 5.2.0)
- PEAR Installer (>= 1.9.1)
- MDB2 (>= 2.5.0b4)
- mssql (extension)
Releases
- 1.5.0b4 (beta, 2012-10-23)
Release notes
License: BSD License
- PEAR::isError() -> MDB2::isError(), Bug #19491.
- PEAR::loadExtension() -> extension_loaded(), Bug #19583.
- Fixed boolean type conversion for non-boolean types
- Fix Bug #19262. Updates conditional stagements to use logical operators to include MDB2_FETCHMODE_OBJECT where appropriate. Was broken in r321197.
- Have truncateTable() return MDB2_OK on success, as documented (bug 19201)
- Have dropIndex() return MDB2_OK on success, as documented (bug 19198)
- Have vacuum() return MDB2_OK on success, as documented (bug 19196)
- Have dropSequence() return MDB2_OK on success, as documented (bug 19191).
- FETCHMODE constants are NOT bitwise.
- fixed bug #18203: Type introspection breaks with associative arrays if names are identical (patch by Peter Bex)open todo items:
- explore fast limit/offset emulation (Request #4544) - 1.5.0b3 (beta, 2010-08-29)
Release notes
License: BSD License
- Fixed bug #16612: Added the timestamp database attribute [genericbob]
- fixed bug #16118: escape doesn't take into account trailing backslashes [urkle]
- request #16903: Add ability to use ODBTP extension [hedroom]
- fixed numRows() with setLimit()open todo items:
- explore fast limit/offset emulation (Request #4544) - 1.3.0b2 (beta, 2009-01-14)
Release notes
License: BSD License
- fixed bug #11571: when using setLimit(), numRows() returns wrong values
- fixed bug #12117: disconnect() does not work as documented
- fixed bug #14019: MDB2 is not aware of MS-SQL 'smalldatetime' typeopen todo items:
- explore fast limit/offset emulation (Request #4544) - 1.3.0b1 (beta, 2008-03-15)
Release notes
License: BSD License
- fixed bug #12391: fixed lastInsertID() (thanks to Marius Toma)
- fixed bug #12599: BLOB quoting incorrect (thanks to Ferdy Hanssen)
- fixed bug #12697: MDB2_Driver_mssql fails to load with the sybase_ct extension
- request #12731: added truncateTable() in the Manager module
- request #12732: added vacuum() in the Manager module for OPTIMIZE/VACUUM TABLE abstraction
- request #12800: added alterDatabase() in the Manager module [afz]
- fixed bug #12924: correctly handle internal expected errors even with custom error handling
- extended alterTable() support in the Manager module [afz]
- added standaloneQuery() and databaseExists()
- request #13106: added unixtimestamp() in the Function moduleopen todo items:
- explore fast limit/offset emulation (Request #4544) - 1.3.0a2 (alpha, 2007-12-06)
Release notes
License: BSD License
- fixed bug #11571: when using setLimit(), numRows() returns wrong values
- request #12012: added collation support in createDatabase() and in createTable()
for table fieldsopen todo items:
- explore fast limit/offset emulation (Request #4544) - 1.3.0a1 (alpha, 2007-10-28)
Release notes
License: BSD License
- initial support for FOREIGN KEY and CHECK constraints in the Reverse and Manager modules
- fixed bug #9735, #11175, #11228: two instances fail to keep different databases selected
- request #11297: added support for "schema.table" notation in the Reverse module
- request #11445: added support for unicode datatypes (nchar, nvarchar, ntext)
- fixed bug #11479: wrong query in nextID()
- fixed bug #11790: avoid array_diff() because it has a memory leak in PHP 5.1.x
- request #11797: don't use mssql_field_name() in listTableFields() in the Manager module
since it only returns the first 30 chars
- fixed bug #12010: MDB2_PORTABILITY_RTRIM option was ignored
- fixed bug #12083: createTable() in the Manager module now returns MDB2_OK on success,
as documented
- fixed bug #12269: tableInfo() in the Reverse module detect 'clob' data type
as first optionopen todo items:
- explore fast limit/offset emulation (Request #4544) - 1.2.1 (stable, 2007-05-03)
Release notes
License: BSD License
- return length as "precision,scale" for NUMERIC and DECIMAL fields in mapNativeDatatype()
- in getTableIndexDefinition() and getTableConstraintDefinition() in the Reverse
module, also return the field position in the index/constraintopen todo items:
- explore fast limit/offset emulation (Request #4544) - 1.2.0 (stable, 2007-03-14)
Release notes
License: BSD License
- added ability to escape wildcard characters in escape() and quote()
- added setTransactionIsolation()
- added savepoint support to beginTransaction(), commit() and rollback()
- added debug() call at the end of a query/prepare/execute calling (Request #7933)
- added context array parameter to debug() and make use of it whereever sensible
- added optional method name parameter to raiseError() and use whereever possible
- added ability to escape wildcard characters in escape() and quote()
- added debug() call at the end of a query/prepare/execute calling (Request #7933)
- added 'nativetype' output to tableInfo() and getTableFieldDefinition()
- added 'mdb2type' output to getTableFieldDefinition()
- reworked tableInfo() to use a common implementation based on getTableFieldDefinition()
when a table name is passed (Bug #8124)
- fixed incorrect regex in mapNativeDatatype() (Bug #8256) (thx ioz at ionosfera dot com)
- use old DSN when rolling back open transactions in disconnect()
- MSSQL requires making columns exlicitly NULLable (Bug #8359)
- do not list empty contraints and indexes
- added support for autoincrement via IDENTITY in getDeclaration()
- ALTER TABLE bug when adding more than 1 column (Bug #8373)
- fixed handling return values when disable_query is set in _doQuery() and _execute()
- added dropIndex() to the manager module
- increased MDB2 dependency to XXX
- renamed valid_types property to valid_default_values in the Datatype module
- increased PHP dependency due to bug #31195
- using 'ADD COLUMN' syntax instead of just 'ADD' in alterTable()
- fixed bug #9024: typo in error checking
- fixed inheritance structure of convertResult()
- added support for new 'disable_iso_date' date DSN option (Request #8739)
- fix typos in error handling in a few places (bug #9024)
- do not skip id generation in nextId() when creating a sequence on demand
because this prevents lastInsertID() from working
- added support for more error codes (patch by Adam Harvey)
- migrated to package.xml version 2
- implemented getTableFieldDefinition() in the Reverse module
- implemented getTableIndexDefinition() in the Reverse module
- implemented getTableConstraintDefinition() in the Reverse module
- implemented getTriggerDefinition() in the Reverse module
- implemented listTableConstraints() in the Manager module
- implemented listFunctions() in the Manager module
- implemented listDatabases() in the Manager module
- implemented listUsers() in the Manager module
- implemented guid() in the Function module [globally unique identifier]
- implemented a fallback mechanism within getTableIndexDefinition() in the Reverse
module to ignore the 'idxname_format' option and use the index name as provided
in case of failure before returning an error
- added a 'nativetype_map_callback' option to map native data declarations back to
custom data types (thanks to Andrew Hill).
- added missing integer data types and their length in _mapNativeDatatype()
- phpdoc fixesopen todo items:
- explore fast limit/offset emulation (Request #4544) - 1.1.2 (stable, 2007-01-10)
Release notes
License: BSD License
- removed mysql_select_db and used mssql_select_db
open todo items:
- explore fast limit/offset emulation (Request #4544) - 1.1.1 (stable, 2007-01-09)
- 1.1.0 (stable, 2006-06-15)
Release notes
License: BSD License
- added the listTableTriggers() method to the Manager.
- added the listViews() method to the Manager.
- aligned _modifyQuery() signature and phpdoc
- added the map datatype patch for (bug #6863)
- added support for length in reverse engineering of integer fields
- added 'result_introspection' supported metadata support
- fixed alterTable() when adding/dropping multiple columns
- properly quote table names in tableInfo() (related to bug #6573)
- use connected_server_info in getServerVersion() as a cache cache
- use parent::disconnect() in disconnect()
- added support for length in integer reverse engineering
- some fixes regarding boolean reverse engineering
- protect against sql injection in the reverse and manager module
- explicitly set is_manip parameter to false for transaction debug calls
- various minor tweaks to error messages, phpdoc and adding stub methods to the
common driver
- typo fixes in phpdoc (thx Stoyan)
- added support for fixed and variable types for 'text' in declarations,
as well as in reverse engineering (Request #1523)
- made _doQuery() return a reference
- added userinfo's to all raiseError calls that previously had none
- added 'prepared_statements' supported meta data setting
- limit fetch to 1 row in listTableFields()
- use setCharset() in connect()/_doConnect()
- generalized quoteIdentifier() with a property
- drop parentheses from executeStoredProc() syntax (bug #7855)
- switched most array_key_exists() calls to !empty() to improve readability and performance
- fixed a few edge cases and potential warnings
- added ability to rewrite queries for query(), exec() and prepare() using a debug handler callback
- added implementation for now() and substring() (Request #7774)
- check if result/connection has not yet been freed/dicsonnected before
attempting to free a result set(Bug #7790)
- fix range offsets (bug #7448)
- revert change that would prefer 'clob' over 'text' for TEXT fields
(this was breaking runtime instrospection)
- use SCOPE_IDENTITY() when version >= 8 (SQL Server 2000) otherwise fallback to
@@IDENTITY to retrieve last inserted value (bug #7291)
- implement getServerVersion()
- removed bogus but unharmful code from mapNativeDatatype() - 1.0.0 (stable, 2006-02-09)
Release notes
License: BSD License
- unified case fixing in the list*() methods
- use getConnection() to access connection property
- split index and constraint handling
- quote identifiers where possible inside the manager methods depending on
the new 'quote_identifier' option (defaults to off)
- refactored get*Declaration() methods to use getTypeDeclaration()
- setting in_transaction to false on disconnect
- added new Function modules to handle difference in SQL functions
- force rollback() with open transactions on disconnect
- escape floats to make sure they do not contain evil characters (bug #5608)
- split off manipulation queries into exec() method from the query() method *BC BREAK*
- only if result_types is set to false in prepare() method the query will be
handled as a DML statement *BC BREAK*
- use lastInsertID() method in nextID()
- cleanup _checkSequence() method to not raise errors when no table was found
- added 'mdbtype' to tableInfo() output
- changed 'len' to 'length' in tableInfo() output *BC BREAK*
- explicitly pass if the module is phptype specific in all loadModule calls (bug #6226)
- fixed signature of quoteIdentifier() to make second param optional
- fixed signature of executeStoredProc()
- typo fixes in error handling of nextResult() and numRows() calls
- nextResult() returns false if there are no more result sets to read
- _fixIndexName() now just attempts to remove possible formatting
- renamed _isSequenceName() to _fixSequenceName()
- _fixSequenceName() now just attempts to remove possible formatting, and only
returns a boolean if no formatting was applied when the new "check" parameter is set to true
- added support for length in decimal columns
- removed ugly hack for quote parameter in quote() since it was insufficient
(escaping also needs to be prevented)
- handle null as resource when disable_query option is enabled in result objectopen todo items:
- add missing index/contraint methods to the manager and reverse module methods
- ensure that all primary/unique/foreign key handling is only in the contraint methods
- fix alterTable() - 0.1.2 (alpha, 2005-10-11)
- 0.1.0 (alpha, 2005-06-08)
Release notes
License: BSD License
first unbundled release from MDB2 core
- dont just check for isset() for boolean values in order to support
setting them false as well (bug #4373)
- ensure SQL injection protection in all _quote() methods (was missing in
some decimal, float, time, date and timestamp implementations)
- typo fixes in constructor
- Warning: this release is untested
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #3912 | Closed | Bug | 2005-03-22 | BLOB AND CLOB limit to 4096 under MSSQL | |
| #4544 | Feedback | Req | 2005-06-07 | MSSQL fast Limit emulation | |
| #5080 | No Feedback | Bug | 2005-08-12 | Error message that class not exist | |
| #5507 | Closed | Bug | 2005-09-24 | Squence Emulation don't work for mssql | |
| #5862 | Closed | Bug | 2005-11-03 | Incorrect method call in mssql.php causes liveuser to fail | |
| #6863 | Closed | Req | CVS | 2006-02-21 | Implementation of MDB2_Driver_Datatype_mssql::mapNativeDatatype() |
| #7291 | Closed | Bug | 1.7.6 | 2006-04-04 | Use of @@IDENTITY |
| #7448 | Closed | Bug | 2.0.1 | 2006-04-21 | limit query and driver mssql doesen't works |
| #7855 | Closed | Bug | 1.0.0 | 2006-06-10 | EXECUTE syntax changed in Sql Server 2005 |
| #8206 | Closed | Bug | 1.1.0 | 2006-07-13 | limitQuery not compatible with DISTINCT clause |
| #8347 | Closed | Bug | 1.1.0 | 2006-08-02 | Create Table Error |
| #8373 | Closed | Bug | 1.1.0 | 2006-08-07 | ALTER TABLE bug when adding more than 1 column |
| #8708 | Bogus | Bug | 2.2.2 | 2006-09-15 | PHP script exit without exception after execute |
| #9204 | Closed | Bug | 1.1.0 | 2006-10-31 | Sequences don't work with MSSQL |
| #9410 | Bogus | Bug | 2.3.0 | 2006-11-21 | fread() truncates after execute() |
| #9442 | Closed | Bug | 2.3.0 | 2006-11-24 | Quotes aren't being escaped using autoExecute |
| #9596 | No Feedback | Bug | 1.1.0 | 2006-12-10 | auto increment not work |
| #9723 | Closed | Req | CVS | 2007-01-02 | SQL Server 2005 error codes |
| #9735 | Closed | Bug | 1.1.0 | 2007-01-04 | Two instances fail to keep different databases selected |
| #10233 | Closed | Req | 1.1.2 | 2007-03-01 | Set length property when not null, rather than > 0 |
| #11175 | Closed | Bug | 1.2.1 | 2007-05-29 | see #9735: Two instances fail to keep different databases selected |
| #11445 | Closed | Req | 1.2.1 | 2007-06-26 | Unicode data types in Datatype Module for mssql |
| #11479 | Closed | Bug | 1.2.1 | 2007-06-29 | Bug in nextID (sequence management) |
| #11571 | Closed | Bug | 1.2.1 | 2007-07-09 | Bug in numRows() function |
| #11797 | Closed | Bug | 1.2.1 | 2007-08-08 | mssql_field_name should not be used |
| #11849 | Closed | Bug | 1.2.1 | 2007-08-16 | mssql.datetimeconvert force set to 0 - generate wrong dates |
| #12010 | Closed | Bug | 1.2.1 | 2007-09-08 | MDB2_PORTABILITY_RTRIM not working |
| #12391 | Closed | Bug | 1.3.0a1 | 2007-11-06 | lastInsertID |
| #12397 | Closed | Bug | 1.2.1 | 2007-11-07 | default_text_field_length Not working |
| #12473 | Assigned | Bug | CVS | 2007-11-18 | sequence is off by one |
| #12697 | Closed | Bug | 1.2.1 | 2007-12-14 | Won't use sybase_ct extension |
| #12971 | Duplicate | Bug | 1.2.1 | 2008-01-24 | Sequence emulation broken |
| #12991 | Closed | Bug | CVS | 2008-01-29 | Error number for database already exist |
| #12992 | Closed | Bug | CVS | 2008-01-29 | bug in alterDatabase |
| #13000 | Closed | Bug | CVS | 2008-01-30 | correct definition of null, not null, and empty default value for field |
| #13384 | Closed | Bug | 1.3.0a2 | 2008-03-13 | quoteBLOB Problem |
| #13781 | Bogus | Bug | 1.3.0b1 | 2008-04-26 | Undefined function: executeStoredProc() |
| #14843 | Closed | Bug | 2008-10-21 | alterTable() 'ADD COLUMN' bug in mssql driver | |
| #15327 | Closed | Bug | 1.2.1 | 2008-12-16 | *defalut* constraint in the alterTable() |
| #15328 | Closed | Bug | 1.2.1 | 2008-12-16 | mdb2 *date* data type is not maped correctly in the alterTable() |
| #16159 | No Feedback | Bug | 2009-04-29 | mdb2 iserror is reporting informational messages as errors | |
| #16612 | Closed | Bug | 1.3.0b2 | 2009-09-15 | unknown database attribute type: timestamp |
| #16702 | Closed | Bug | 2009-10-15 | SQL Server TEXT type is deprecated | |
| #16903 | Closed | Req | 1.2.1 | 2009-12-13 | Add ability to use ODBTP extension |
| #17134 | Open | Bug | 1.3.0b2 | 2010-02-18 | Installation problem |
| #17299 | Open | Bug | 1.3.0b2 | 2010-04-08 | Limited queries always return ($limit - 1) rows |
| #17355 | Open | Bug | 1.2.1 | 2010-04-28 | setLimit in conjunction with SELECT DISTINCT builds invalid SQL |
| #18491 | Open | Bug | 1.5.0b3 | 2011-04-29 | MDB2_Driver_mssql - can not alterTable |