diff options
| author | Damien Regad <dregad@mantisbt.org> | 2021-03-15 08:41:28 +0100 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2021-03-15 08:41:28 +0100 |
| commit | 93c35d374f0852e435fd343641beef1423a107a7 (patch) | |
| tree | 0cdaa00e2defa525645b1830b9c66f586dff1171 | |
| parent | fd4d6b09577ba461f522ca8f41a717c5c0a1428b (diff) | |
| parent | 099d06fc8f3f5fa8e82c0064c1b9148e89729b4c (diff) | |
| download | adodb-93c35d374f0852e435fd343641beef1423a107a7.tar.gz adodb-93c35d374f0852e435fd343641beef1423a107a7.tar.bz2 adodb-93c35d374f0852e435fd343641beef1423a107a7.zip | |
Merge branch 'hotfix/5.21' into master
| -rw-r--r-- | adodb-datadict.inc.php | 25 | ||||
| -rw-r--r-- | adodb-xmlschema.inc.php | 2 | ||||
| -rw-r--r-- | adodb-xmlschema03.inc.php | 2 | ||||
| -rw-r--r-- | adodb.inc.php | 70 | ||||
| -rw-r--r-- | datadict/datadict-mssqlnative.inc.php | 148 | ||||
| -rw-r--r-- | docs/changelog.md | 2 | ||||
| -rw-r--r-- | drivers/adodb-mssqlnative.inc.php | 74 | ||||
| -rw-r--r-- | replicate/adodb-replicate.inc.php | 4 | ||||
| -rw-r--r-- | tests/test-datadict.php | 2 |
9 files changed, 135 insertions, 194 deletions
diff --git a/adodb-datadict.inc.php b/adodb-datadict.inc.php index 085641a5..f2d7e4d2 100644 --- a/adodb-datadict.inc.php +++ b/adodb-datadict.inc.php @@ -164,6 +164,7 @@ function lens_ParseArgs($args,$endstmtchar=',',$tokenchars='_.-') class ADODB_DataDict { + /** @var ADOConnection */ var $connection; var $debug = false; var $dropTable = 'DROP TABLE %s'; @@ -182,16 +183,18 @@ class ADODB_DataDict { var $invalidResizeTypes4 = array('CLOB','BLOB','TEXT','DATE','TIME'); // for changeTableSQL var $blobSize = 100; /// any varchar/char field this size or greater is treated as a blob /// in other words, we use a text area for editing. + /** @var string Uppercase driver name */ + var $upperName; /* * Indicates whether a BLOB/CLOB field will allow a NOT NULL setting - * The type is whatever is matched to an X or X2 or B type. We must + * The type is whatever is matched to an X or X2 or B type. We must * explicitly set the value in the driver to switch the behaviour on */ public $blobAllowsNotNull; /* * Indicates whether a BLOB/CLOB field will allow a DEFAULT set - * The type is whatever is matched to an X or X2 or B type. We must + * The type is whatever is matched to an X or X2 or B type. We must * explicitly set the value in the driver to switch the behaviour on */ public $blobAllowsDefaultValue; @@ -687,11 +690,11 @@ class ADODB_DataDict { //----------------- // Parse attributes foreach($fld as $attr => $v) { - if ($attr == 2 && is_numeric($v)) + if ($attr == 2 && is_numeric($v)) $attr = 'SIZE'; - elseif ($attr == 2 && strtoupper($ftype) == 'ENUM') + elseif ($attr == 2 && strtoupper($ftype) == 'ENUM') $attr = 'ENUM'; - else if (is_numeric($attr) && $attr > 1 && !is_numeric($v)) + else if (is_numeric($attr) && $attr > 1 && !is_numeric($v)) $attr = strtoupper($v); switch($attr) { @@ -762,9 +765,9 @@ class ADODB_DataDict { * some blob types do not accept nulls, so we override the * previously defined value */ - $fnotnull = false; + $fnotnull = false; - if ($fprimary) + if ($fprimary) $pkey[] = $fname; if (($ty == 'X' || $ty == 'X2' || $ty == 'XL' || $ty == 'B') && !$this->blobAllowsDefaultValue) @@ -861,7 +864,7 @@ class ADODB_DataDict { if (strlen($fprec)) $ftype .= ",".$fprec; $ftype .= ')'; } - + /* * Handle additional options */ @@ -874,12 +877,12 @@ class ADODB_DataDict { case 'ENUM': $ftype .= '(' . $value . ')'; break; - + default: } } } - + return $ftype; } @@ -942,7 +945,7 @@ class ADODB_DataDict { return $sql; } } - + $s = "CREATE TABLE $tabname (\n"; $s .= implode(",\n", $lines); if (sizeof($pkey)>0) { diff --git a/adodb-xmlschema.inc.php b/adodb-xmlschema.inc.php index 3e0086d1..98afde3e 100644 --- a/adodb-xmlschema.inc.php +++ b/adodb-xmlschema.inc.php @@ -1285,7 +1285,7 @@ class adoSchema { function __construct( $db ) { $this->db = $db; $this->debug = $this->db->debug; - $this->dict = NewDataDictionary( $this->db ); + $this->dict = newDataDictionary( $this->db ); $this->sqlArray = array(); $this->schemaVersion = XMLS_SCHEMA_VERSION; $this->executeInline( XMLS_EXECUTE_INLINE ); diff --git a/adodb-xmlschema03.inc.php b/adodb-xmlschema03.inc.php index d738c9f7..53ea7acc 100644 --- a/adodb-xmlschema03.inc.php +++ b/adodb-xmlschema03.inc.php @@ -1401,7 +1401,7 @@ class adoSchema { function __construct( $db ) { $this->db = $db; $this->debug = $this->db->debug; - $this->dict = NewDataDictionary( $this->db ); + $this->dict = newDataDictionary( $this->db ); $this->sqlArray = array(); $this->schemaVersion = XMLS_SCHEMA_VERSION; $this->executeInline( XMLS_EXECUTE_INLINE ); diff --git a/adodb.inc.php b/adodb.inc.php index f59dd9f1..7afdbfcb 100644 --- a/adodb.inc.php +++ b/adodb.inc.php @@ -178,7 +178,7 @@ if (!defined('_ADODB_LAYER')) { define('DB_AUTOQUERY_UPDATE', 2); - + function ADODB_Setup() { GLOBAL $ADODB_vers, // database version @@ -571,22 +571,24 @@ if (!defined('_ADODB_LAYER')) { protected $connectionParameters = array(); /** - * Adds a parameter to the connection string. - * - * These parameters are added to the connection string when connecting, - * if the driver is coded to use it. - * - * @param string $parameter The name of the parameter to set - * @param string $value The value of the parameter - * - * @return null - * - * @example, for mssqlnative driver ('CharacterSet','UTF-8') - */ - final public function setConnectionParameter($parameter,$value) { - - $this->connectionParameters[] = array($parameter=>$value); - + * Adds a parameter to the connection string. + * + * Parameters must be added before the connection is established; + * they are then passed on to the connect statement. + * + * If used in a portable environment, parameters set in this manner should + * be predicated on the database provider, as unexpected results may occur + * if applied to the wrong database. + * + * @param string $parameter The name of the parameter to set + * @param string $value The value of the parameter + * + * @return null + * + * @example, for mssqlnative driver ('CharacterSet','UTF-8') + */ + public function setConnectionParameter($parameter, $value) { + $this->connectionParameters[] = array($parameter => $value); } /** @@ -1546,8 +1548,8 @@ if (!defined('_ADODB_LAYER')) { * * @param string $table * @param string $id - - * @return mixed The last inserted ID. All databases support this, but be + + * @return mixed The last inserted ID. All databases support this, but be * aware of possible problems in multiuser environments. * Heavily test this before deploying. */ @@ -5195,13 +5197,13 @@ class ADORecordSet implements IteratorAggregate { if (!defined('ADODB_ASSOC_CASE')) { define('ADODB_ASSOC_CASE', ADODB_ASSOC_CASE_NATIVE); } - + /* * Are there special characters in the dsn password * that disrupt parse_url */ $needsSpecialCharacterHandling = false; - + $errorfn = (defined('ADODB_ERROR_HANDLER')) ? ADODB_ERROR_HANDLER : false; if (($at = strpos($db,'://')) !== FALSE) { $origdsn = $db; @@ -5228,23 +5230,23 @@ class ADORecordSet implements IteratorAggregate { * Stop # character breaking parse_url */ $cFakedsn = str_replace('#','\035',$fakedsn); - if (strcmp($fakedsn,$cFakedsn) != 0) + if (strcmp($fakedsn,$cFakedsn) != 0) { /* * There is a # in the string */ $needsSpecialCharacterHandling = true; - + /* * This allows us to successfully parse the url */ $fakedsn = $cFakedsn; - + } - + $dsna = parse_url($fakedsn); } - + if (!$dsna) { return false; } @@ -5270,13 +5272,13 @@ class ADORecordSet implements IteratorAggregate { if (!$db) { return false; } - + $dsna['host'] = isset($dsna['host']) ? rawurldecode($dsna['host']) : ''; $dsna['user'] = isset($dsna['user']) ? rawurldecode($dsna['user']) : ''; $dsna['pass'] = isset($dsna['pass']) ? rawurldecode($dsna['pass']) : ''; $dsna['path'] = isset($dsna['path']) ? rawurldecode(substr($dsna['path'],1)) : ''; # strip off initial / - if ($needsSpecialCharacterHandling) + if ($needsSpecialCharacterHandling) { /* * Revert back to the original string @@ -5482,7 +5484,15 @@ class ADORecordSet implements IteratorAggregate { return new $class($conn); } - function NewDataDictionary(&$conn,$drivername=false) { + /** + * Get a new Data Dictionary object for the connection. + * + * @param ADOConnection $conn + * @param string $drivername + * + * @return ADODB_DataDict|false + */ + function newDataDictionary(&$conn, $drivername='') { if (!$drivername) { $drivername = _adodb_getdriver($conn->dataProvider,$conn->databaseType); } @@ -5509,8 +5519,6 @@ class ADORecordSet implements IteratorAggregate { return $dict; } - - /* Perform a print_r, with pre tags for better formatting. */ diff --git a/datadict/datadict-mssqlnative.inc.php b/datadict/datadict-mssqlnative.inc.php index 5f551f3d..ba4a7b5a 100644 --- a/datadict/datadict-mssqlnative.inc.php +++ b/datadict/datadict-mssqlnative.inc.php @@ -45,7 +45,7 @@ if (!defined('ADODB_DIR')) die(); class ADODB2_mssqlnative extends ADODB_DataDict { var $databaseType = 'mssqlnative'; - var $dropIndex = 'DROP INDEX %1$s ON %2$s'; + var $dropIndex = /** @lang text */ 'DROP INDEX %1$s ON %2$s'; var $renameTable = "EXEC sp_rename '%s','%s'"; var $renameColumn = "EXEC sp_rename '%s.%s','%s'"; var $typeX = 'TEXT'; ## Alternatively, set it to VARCHAR(4000) @@ -61,7 +61,6 @@ class ADODB2_mssqlnative extends ADODB_DataDict { if (is_object($t)) { $fieldobj = $t; $t = $fieldobj->type; - $len = $fieldobj->max_length; } @@ -103,11 +102,11 @@ class ADODB2_mssqlnative extends ADODB_DataDict { -3 => 'X' ); - if (isset($_typeConversion[$t])) - return $_typeConversion[$t]; - - return ADODB_DEFAULT_METATYPE; + if (isset($_typeConversion[$t])) { + return $_typeConversion[$t]; + } + return ADODB_DEFAULT_METATYPE; } function ActualType($meta) @@ -155,7 +154,7 @@ class ADODB2_mssqlnative extends ADODB_DataDict { { $tabname = $this->TableName ($tabname); $f = array(); - list($lines,$pkey) = $this->_GenFields($flds); + list($lines,) = $this->_GenFields($flds); $s = "ALTER TABLE $tabname $this->addCol"; foreach($lines as $v) { $f[] = "\n $v"; @@ -165,30 +164,29 @@ class ADODB2_mssqlnative extends ADODB_DataDict { return $sql; } - function DefaultConstraintname($tabname, $colname) + /** + * Get a column's default constraint. + * + * @param string $tabname + * @param string $colname + * @return string|null The Constraint's name, or null if there is none. + */ + function defaultConstraintName($tabname, $colname) { - $constraintname = false; - $rs = $this->connection->Execute( - "SELECT name FROM sys.default_constraints - WHERE object_name(parent_object_id) = '$tabname' - AND col_name(parent_object_id, parent_column_id) = '$colname'" - ); - if ( is_object($rs) ) { - $row = $rs->FetchRow(); - $constraintname = $row['name']; - } - return $constraintname; + $sql = "SELECT name FROM sys.default_constraints + WHERE object_name(parent_object_id) = ? + AND col_name(parent_object_id, parent_column_id) = ?"; + return $this->connection->getOne($sql, [$tabname, $colname]); } - + function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') { $tabname = $this->TableName ($tabname); $sql = array(); - list($lines,$pkey,$idxs) = $this->_GenFields($flds); + list($lines,,$idxs) = $this->_GenFields($flds); $alter = 'ALTER TABLE ' . $tabname . $this->alterCol . ' '; foreach($lines as $v) { - $not_null = false; if ($not_null = preg_match('/NOT NULL/i',$v)) { $v = preg_replace('/NOT NULL/i','',$v); } @@ -196,7 +194,7 @@ class ADODB2_mssqlnative extends ADODB_DataDict { list(,$colname,$default) = $matches; $v = preg_replace('/^' . preg_quote($colname) . '\s/', '', $v); $t = trim(str_replace('DEFAULT '.$default,'',$v)); - if ( $constraintname = $this->DefaultConstraintname($tabname,$colname) ) { + if ( $constraintname = $this->defaultConstraintName($tabname,$colname) ) { $sql[] = 'ALTER TABLE '.$tabname.' DROP CONSTRAINT '. $constraintname; } if ($not_null) { @@ -209,7 +207,7 @@ class ADODB2_mssqlnative extends ADODB_DataDict { . ' DEFAULT ' . $default . ' FOR ' . $colname; } else { $colname = strtok($v," "); - if ( $constraintname = $this->DefaultConstraintname($tabname,$colname) ) { + if ( $constraintname = $this->defaultConstraintName($tabname,$colname) ) { $sql[] = 'ALTER TABLE '.$tabname.' DROP CONSTRAINT '. $constraintname; } if ($not_null) { @@ -237,17 +235,19 @@ class ADODB2_mssqlnative extends ADODB_DataDict { * @param string $tableflds Throwaway value to make the function match the parent * @param string $tableoptions Throway value to make the function match the parent * - * @return string The SQL necessary to drop the column + * @return string[] The SQL necessary to drop the column */ function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='') { $tabname = $this->TableName ($tabname); - if (!is_array($flds)) - $flds = explode(',',$flds); + if (!is_array($flds)) { + /** @noinspection PhpParamsInspection */ + $flds = explode(',', $flds); + } $f = array(); $s = 'ALTER TABLE ' . $tabname; foreach($flds as $v) { - if ( $constraintname = $this->DefaultConstraintname($tabname,$v) ) { + if ( $constraintname = $this->defaultConstraintName($tabname,$v) ) { $sql[] = 'ALTER TABLE ' . $tabname . ' DROP CONSTRAINT ' . $constraintname; } $f[] = ' DROP COLUMN ' . $this->NameQuote($v); @@ -258,6 +258,8 @@ class ADODB2_mssqlnative extends ADODB_DataDict { } // return string must begin with space + + /** @noinspection DuplicatedCode */ function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned) { $suffix = ''; @@ -269,78 +271,7 @@ class ADODB2_mssqlnative extends ADODB_DataDict { return $suffix; } - /* -CREATE TABLE - [ database_name.[ owner ] . | owner. ] table_name - ( { < column_definition > - | column_name AS computed_column_expression - | < table_constraint > ::= [ CONSTRAINT constraint_name ] } - - | [ { PRIMARY KEY | UNIQUE } [ ,...n ] - ) - -[ ON { filegroup | DEFAULT } ] -[ TEXTIMAGE_ON { filegroup | DEFAULT } ] - -< column_definition > ::= { column_name data_type } - [ COLLATE < collation_name > ] - [ [ DEFAULT constant_expression ] - | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ] - ] - [ ROWGUIDCOL] - [ < column_constraint > ] [ ...n ] - -< column_constraint > ::= [ CONSTRAINT constraint_name ] - { [ NULL | NOT NULL ] - | [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - [ WITH FILLFACTOR = fillfactor ] - [ON {filegroup | DEFAULT} ] ] - ] - | [ [ FOREIGN KEY ] - REFERENCES ref_table [ ( ref_column ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - ] - | CHECK [ NOT FOR REPLICATION ] - ( logical_expression ) - } - -< table_constraint > ::= [ CONSTRAINT constraint_name ] - { [ { PRIMARY KEY | UNIQUE } - [ CLUSTERED | NONCLUSTERED ] - { ( column [ ASC | DESC ] [ ,...n ] ) } - [ WITH FILLFACTOR = fillfactor ] - [ ON { filegroup | DEFAULT } ] - ] - | FOREIGN KEY - [ ( column [ ,...n ] ) ] - REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] - [ ON DELETE { CASCADE | NO ACTION } ] - [ ON UPDATE { CASCADE | NO ACTION } ] - [ NOT FOR REPLICATION ] - | CHECK [ NOT FOR REPLICATION ] - ( search_conditions ) - } - - - */ - - /* - CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name - ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) - [ WITH < index_option > [ ,...n] ] - [ ON filegroup ] - < index_option > :: = - { PAD_INDEX | - FILLFACTOR = fillfactor | - IGNORE_DUP_KEY | - DROP_EXISTING | - STATISTICS_NORECOMPUTE | - SORT_IN_TEMPDB - } -*/ + /** @noinspection DuplicatedCode */ function _IndexSQL($idxname, $tabname, $flds, $idxoptions) { $sql = array(); @@ -372,17 +303,18 @@ CREATE TABLE } - function _GetSize($ftype, $ty, $fsize, $fprec,$options=false) + function _GetSize($ftype, $ty, $fsize, $fprec, $options=false) { switch ($ftype) { - case 'INT': - case 'SMALLINT': - case 'TINYINT': - case 'BIGINT': + case 'INT': + case 'SMALLINT': + case 'TINYINT': + case 'BIGINT': + return $ftype; + } + if ($ty == 'T') { return $ftype; } - if ($ty == 'T') return $ftype; - return parent::_GetSize($ftype, $ty, $fsize, $fprec, $options); - + return parent::_GetSize($ftype, $ty, $fsize, $fprec, $options); } } diff --git a/docs/changelog.md b/docs/changelog.md index df841eb5..bf6f274e 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -51,6 +51,8 @@ Older changelogs: ### Fixed +- mssql: PHP warnings in dropColumnSQL() + [#696](https://github.com/ADOdb/ADOdb/issues/696) - mysql: TypeError when calling get/setChangeSet on unset connection (PHP 8) [#686](https://github.com/ADOdb/ADOdb/issues/686) diff --git a/drivers/adodb-mssqlnative.inc.php b/drivers/adodb-mssqlnative.inc.php index aa8bf270..0a3cf3bb 100644 --- a/drivers/adodb-mssqlnative.inc.php +++ b/drivers/adodb-mssqlnative.inc.php @@ -439,9 +439,9 @@ class ADODB_mssqlnative extends ADOConnection { function ErrorNo() { $err = sqlsrv_errors(SQLSRV_ERR_ALL); - if ($err && $err[0]) + if ($err && $err[0]) return $err[0]['code']; - else + else return 0; } @@ -454,13 +454,13 @@ class ADODB_mssqlnative extends ADOConnection { ADOConnection::outp('Microsoft SQL Server native driver (mssqlnative) not installed'); return null; } - + if (!empty($this->port)) /* - * Port uses a comma + * Port uses a comma */ $argHostname .= ",".$this->port; - + $connectionInfo = $this->connectionInfo; $connectionInfo["Database"] = $argDatabasename; if ((string)$argUsername != '' || (string)$argPassword != '') @@ -471,12 +471,12 @@ class ADODB_mssqlnative extends ADOConnection { */ $connectionInfo["UID"] = $argUsername; $connectionInfo["PWD"] = $argPassword; - + if ($this->debug) ADOConnection::outp('userid or password supplied, attempting connection with SQL Server Authentication'); - + } - else + else { /* * If they don't pass either value, we won't add them to the @@ -484,11 +484,11 @@ class ADODB_mssqlnative extends ADOConnection { * to use windows authentication */ if ($this->debug) - + ADOConnection::outp('No userid or password supplied, attempting connection with Windows Authentication'); } - - + + /* * Now merge in the passed connection parameters setting */ @@ -501,7 +501,7 @@ class ADODB_mssqlnative extends ADOConnection { if ($this->debug) ADOConnection::outp("connecting to host: $argHostname params: ".var_export($connectionInfo,true)); if(!($this->_connectionID = @sqlsrv_connect($argHostname,$connectionInfo))) { - if ($this->debug) + if ($this->debug) ADOConnection::outp( 'Connection Failed: '.print_r( sqlsrv_errors(), true)); return false; } @@ -518,6 +518,7 @@ class ADODB_mssqlnative extends ADOConnection { return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename); } + function Prepare($sql) { return $sql; // prepare does not work properly with bind parameters as bind parameters are managed by sqlsrv_prepare! @@ -623,7 +624,7 @@ class ADODB_mssqlnative extends ADOConnection { return $rez; } - + function MetaIndexes($table,$primary=false, $owner = false) { $table = $this->qstr($table); @@ -899,51 +900,48 @@ class ADODB_mssqlnative extends ADOConnection { * @param string $procedureNamePattern (optional) * @param string $catalog (optional) * @param string $schemaPattern (optional) - + * @return array of stored objects in current database. * */ public function metaProcedures($procedureNamePattern = null, $catalog = null, $schemaPattern = null) { - $metaProcedures = array(); $procedureSQL = ''; $catalogSQL = ''; $schemaSQL = ''; - + if ($procedureNamePattern) $procedureSQL = "AND ROUTINE_NAME LIKE " . strtoupper($this->qstr($procedureNamePattern)); - + if ($catalog) $catalogSQL = "AND SPECIFIC_SCHEMA=" . strtoupper($this->qstr($catalog)); - + if ($schemaPattern) $schemaSQL = "AND ROUTINE_SCHEMA LIKE {$this->qstr($schemaPattern)}"; - - + $fields = " ROUTINE_NAME,ROUTINE_TYPE,ROUTINE_SCHEMA,ROUTINE_CATALOG"; - + $SQL = "SELECT $fields - FROM {$this->database}.information_schema.routines - WHERE 1=1 - $procedureSQL - $catalogSQL - $schemaSQL - ORDER BY ROUTINE_NAME - "; - + FROM {$this->database}.information_schema.routines + WHERE 1=1 + $procedureSQL + $catalogSQL + $schemaSQL + ORDER BY ROUTINE_NAME + "; + $result = $this->execute($SQL); - + if (!$result) return false; while ($r = $result->fetchRow()){ - if (!isset($r[0])) /* * Convert to numeric */ $r = array_values($r); - + $procedureName = $r[0]; $schemaName = $r[2]; $routineCatalog= $r[3]; @@ -952,13 +950,11 @@ class ADODB_mssqlnative extends ADOConnection { 'schema' => $schemaName, 'remarks' => '', ); - } - + return $metaProcedures; - } - + } /*-------------------------------------------------------------------------------------- @@ -1075,9 +1071,9 @@ class ADORecordset_mssqlnative extends ADORecordSet { * Too early */ return; - if ($this->fetchMode != ADODB_FETCH_NUM) + if ($this->fetchMode != ADODB_FETCH_NUM) return $this->fields[$colname]; - + if (!$this->bind) { $this->bind = array(); for ($i=0; $i < $this->_numOfFields; $i++) { @@ -1243,7 +1239,7 @@ class ADORecordset_mssqlnative extends ADORecordSet { $this->_queryID = false; return $rez; } - + return true; } diff --git a/replicate/adodb-replicate.inc.php b/replicate/adodb-replicate.inc.php index f13e4af7..f1cdffad 100644 --- a/replicate/adodb-replicate.inc.php +++ b/replicate/adodb-replicate.inc.php @@ -114,8 +114,8 @@ class ADODB_Replicate { $this->connSrc2 = ($connSrc2) ? $connSrc2 : $connSrc; $this->connDest2 = ($connDest2) ? $connDest2 : $connDest; - $this->ddSrc = NewDataDictionary($connSrc); - $this->ddDest = NewDataDictionary($connDest); + $this->ddSrc = newDataDictionary($connSrc); + $this->ddDest = newDataDictionary($connDest); $this->htmlSpecialChars = isset($_SERVER['HTTP_HOST']); } diff --git a/tests/test-datadict.php b/tests/test-datadict.php index c5ea95e0..751ed997 100644 --- a/tests/test-datadict.php +++ b/tests/test-datadict.php @@ -18,7 +18,7 @@ include_once('../adodb.inc.php'); foreach(array('sapdb','sybase','mysql','access','oci8po','odbc_mssql','odbc','db2','firebird','postgres','informix') as $dbType) { echo "<h3>$dbType</h3><p>"; $db = NewADOConnection($dbType); - $dict = NewDataDictionary($db); + $dict = newDataDictionary($db); if (!$dict) continue; $dict->debug = 1; |
