cvs: pear /MDB2 package.php package_ibase.php package_mssql.php package_mysql.php package_mysqli.php package_oci8.php package_pgsql.php
package_sqlite.php /MDB2/MDB2/Driver/Manager Common.php ibase.php mssql.php mysql.php mysqli.php oci8.php pgsql.php sqlite.php
| From: | Lorenzo Alberton | Date: | Tue, 12 Feb 2008 23:12:28 +0000 |
| Subject: | cvs: pear /MDB2 package.php package_ibase.php package_mssql.php package_mysql.php package_mysqli.php package_oci8.php package_pgsql.php package_sqlite.php /MDB2/MDB2/Driver/Manager Common.php ibase.php mssql.php mysql.php mysqli.php oci8.php pgsql.php sqlite.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-50994@lists.php.net to get a copy of this message | ||
quipo Tue Feb 12 23:12:28 2008 UTC
Modified files:
/pear/MDB2/MDB2/Driver/Manager Common.php ibase.php mssql.php
mysql.php mysqli.php oci8.php
pgsql.php sqlite.php
/pear/MDB2 package.php package_ibase.php package_mssql.php
package_mysql.php package_mysqli.php package_oci8.php
package_pgsql.php package_sqlite.php
Log:
request #12732: added vacuum() in the Manager module for OPTIMIZE/VACUUM TABLE abstraction
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/Common.php?r1=1.70&r2=1.71&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/Common.php diff -u pear/MDB2/MDB2/Driver/Manager/Common.php:1.70 pear/MDB2/MDB2/Driver/Manager/Common.php:1.71 --- pear/MDB2/MDB2/Driver/Manager/Common.php:1.70 Sat Jan 12 13:31:48 2008 +++ pear/MDB2/MDB2/Driver/Manager/Common.php Tue Feb 12 23:12:27 2008 @@ -43,7 +43,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.70 2008/01/12 13:31:48 quipo Exp $ +// $Id: Common.php,v 1.71 2008/02/12 23:12:27 quipo Exp $ // /** @@ -407,6 +407,34 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'method not implemented', __FUNCTION__); + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/ibase.php?r1=1.112&r2=1.113&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/ibase.php diff -u pear/MDB2/MDB2/Driver/Manager/ibase.php:1.112 pear/MDB2/MDB2/Driver/Manager/ibase.php:1.113 --- pear/MDB2/MDB2/Driver/Manager/ibase.php:1.112 Sun Jan 27 18:58:07 2008 +++ pear/MDB2/MDB2/Driver/Manager/ibase.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.112 2008/01/27 18:58:07 quipo Exp $ +// $Id: ibase.php,v 1.113 2008/02/12 23:12:27 quipo Exp $ require_once 'MDB2/Driver/Manager/Common.php'; @@ -400,6 +400,29 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + // not needed in Interbase/Firebird + return MDB2_OK; + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mssql.php?r1=1.99&r2=1.100&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mssql.php diff -u pear/MDB2/MDB2/Driver/Manager/mssql.php:1.99 pear/MDB2/MDB2/Driver/Manager/mssql.php:1.100 --- pear/MDB2/MDB2/Driver/Manager/mssql.php:1.99 Mon Feb 4 18:58:39 2008 +++ pear/MDB2/MDB2/Driver/Manager/mssql.php Tue Feb 12 23:12:27 2008 @@ -44,7 +44,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.99 2008/02/04 18:58:39 afz Exp $ +// $Id: mssql.php,v 1.100 2008/02/12 23:12:27 quipo Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -270,6 +270,42 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * NB: you have to run the NSControl Create utility to enable VACUUM + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + $timeout = isset($options['timeout']) ? (int)$options['timeout'] : 300; + + $query = 'NSControl Create'; + $result = $db->exec($query); + if (PEAR::isError($result)) { + return $result; + } + + return $db->exec('EXEC NSVacuum '.$timeout); + } + + // }}} // {{{ alterTable() /** @@ -420,7 +456,7 @@ if ($query) { $query.= ', '; } else { - $query.= 'ADD '; + $query.= 'ADD COLUMN '; } $query.= $db->getDeclaration($field['type'], $field_name, $field); } @@ -440,7 +476,7 @@ $query.= 'ALTER COLUMN '; } - //MSSQL not support change default value of field in altering mode + //MSSQL doesn't allow changing the DEFAULT value of a field in altering mode if (array_key_exists('default', $field['definition'])) { unset($field['definition']['default']); } http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mysql.php?r1=1.103&r2=1.104&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mysql.php diff -u pear/MDB2/MDB2/Driver/Manager/mysql.php:1.103 pear/MDB2/MDB2/Driver/Manager/mysql.php:1.104 --- pear/MDB2/MDB2/Driver/Manager/mysql.php:1.103 Sun Feb 3 20:12:10 2008 +++ pear/MDB2/MDB2/Driver/Manager/mysql.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.103 2008/02/03 20:12:10 afz Exp $ +// $Id: mysql.php,v 1.104 2008/02/12 23:12:27 quipo Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -285,6 +285,55 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + if (empty($table)) { + $table = $this->listTables(); + if (PEAR::isError($table)) { + return $table; + } + } + if (is_array($table)) { + foreach (array_keys($table) as $k) { + $table[$k] = $db->quoteIdentifier($table[$k]); + } + $table = implode(', ', $table); + } else { + $table = $db->quoteIdentifier($table); + } + + $result = $db->exec('OPTIMIZE TABLE '.$table); + if (PEAR::isError($result)) { + return $result; + } + if (!empty($options['analyze'])) { + return $db->exec('ANALYZE TABLE '.$table); + } + return MDB2_OK; + } + + // }}} // {{{ alterTable() /** @@ -687,33 +736,34 @@ * Get the stucture of a field into an array * * @author Leoncx - * @param string $table name of the table on which the index is to be created - * @param string $name name of the index to be created - * @param array $definition associative array that defines properties of the index to be created. - * Currently, only one property named FIELDS is supported. This property - * is also an associative with the names of the index fields as array - * indexes. Each entry of this array is set to another type of associative - * array that specifies properties of the index that are specific to - * each field. - * - * Currently, only the sorting property is supported. It should be used - * to define the sorting direction of the index. It may be set to either - * ascending or descending. - * - * Not all DBMS support index sorting direction configuration. The DBMS - * drivers of those that do not support it ignore this property. Use the - * function supports() to determine whether the DBMS driver can manage indexes. - * - * Example - * array( - * 'fields' => array( - * 'user_name' => array( - * 'sorting' => 'ascending' - * 'length' => 10 - * ), - * 'last_login' => array() - * ) + * @param string $table name of the table on which the index is to be created + * @param string $name name of the index to be created + * @param array $definition associative array that defines properties of the index to be created. + * Currently, only one property named FIELDS is supported. This property + * is also an associative with the names of the index fields as array + * indexes. Each entry of this array is set to another type of associative + * array that specifies properties of the index that are specific to + * each field. + * + * Currently, only the sorting property is supported. It should be used + * to define the sorting direction of the index. It may be set to either + * ascending or descending. + * + * Not all DBMS support index sorting direction configuration. The DBMS + * drivers of those that do not support it ignore this property. Use the + * function supports() to determine whether the DBMS driver can manage indexes. + * + * Example + * array( + * 'fields' => array( + * 'user_name' => array( + * 'sorting' => 'ascending' + * 'length' => 10 + * ), + * 'last_login' => array() * ) + * ) + * * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mysqli.php?r1=1.90&r2=1.91&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mysqli.php diff -u pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.90 pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.91 --- pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.90 Sun Feb 3 20:13:23 2008 +++ pear/MDB2/MDB2/Driver/Manager/mysqli.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.90 2008/02/03 20:13:23 afz Exp $ +// $Id: mysqli.php,v 1.91 2008/02/12 23:12:27 quipo Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -285,6 +285,55 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + if (empty($table)) { + $table = $this->listTables(); + if (PEAR::isError($table)) { + return $table; + } + } + if (is_array($table)) { + foreach (array_keys($table) as $k) { + $table[$k] = $db->quoteIdentifier($table[$k]); + } + $table = implode(', ', $table); + } else { + $table = $db->quoteIdentifier($table); + } + + $result = $db->exec('OPTIMIZE TABLE '.$table); + if (PEAR::isError($result)) { + return $result; + } + if (!empty($options['analyze'])) { + return $db->exec('ANALYZE TABLE '.$table); + } + return MDB2_OK; + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/oci8.php?r1=1.102&r2=1.103&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/oci8.php diff -u pear/MDB2/MDB2/Driver/Manager/oci8.php:1.102 pear/MDB2/MDB2/Driver/Manager/oci8.php:1.103 --- pear/MDB2/MDB2/Driver/Manager/oci8.php:1.102 Tue Feb 12 21:37:08 2008 +++ pear/MDB2/MDB2/Driver/Manager/oci8.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ -// $Id: oci8.php,v 1.102 2008/02/12 21:37:08 quipo Exp $ +// $Id: oci8.php,v 1.103 2008/02/12 23:12:27 quipo Exp $ require_once 'MDB2/Driver/Manager/Common.php'; @@ -480,6 +480,29 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + // not needed in Oracle + return MDB2_OK; + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/pgsql.php?r1=1.79&r2=1.80&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/pgsql.php diff -u pear/MDB2/MDB2/Driver/Manager/pgsql.php:1.79 pear/MDB2/MDB2/Driver/Manager/pgsql.php:1.80 --- pear/MDB2/MDB2/Driver/Manager/pgsql.php:1.79 Sun Feb 3 20:13:42 2008 +++ pear/MDB2/MDB2/Driver/Manager/pgsql.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.79 2008/02/03 20:13:42 afz Exp $ +// $Id: pgsql.php,v 1.80 2008/02/12 23:12:27 quipo Exp $ require_once 'MDB2/Driver/Manager/Common.php'; @@ -206,6 +206,47 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + $query = 'VACUUM'; + + if (!empty($options['full'])) { + $query .= ' FULL'; + } + if (!empty($options['freeze'])) { + $query .= ' FREEZE'; + } + if (!empty($options['analyze'])) { + $query .= ' ANALYZE'; + } + + if (!empty($table)) { + $query .= ' '.$db->quoteIdentifier($table, true); + } + return $db->exec($query); + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/sqlite.php?r1=1.72&r2=1.73&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/sqlite.php diff -u pear/MDB2/MDB2/Driver/Manager/sqlite.php:1.72 pear/MDB2/MDB2/Driver/Manager/sqlite.php:1.73 --- pear/MDB2/MDB2/Driver/Manager/sqlite.php:1.72 Mon Dec 3 20:59:15 2007 +++ pear/MDB2/MDB2/Driver/Manager/sqlite.php Tue Feb 12 23:12:27 2008 @@ -2,7 +2,7 @@ // +----------------------------------------------------------------------+ // | PHP versions 4 and 5 | // +----------------------------------------------------------------------+ -// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox, | +// | Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox, | // | Stig. S. Bakken, Lukas Smith, Lorenzo Alberton | // | All rights reserved. | // +----------------------------------------------------------------------+ @@ -43,7 +43,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.72 2007/12/03 20:59:15 quipo Exp $ +// $Id: sqlite.php,v 1.73 2008/02/12 23:12:27 quipo Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -404,6 +404,37 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $query = 'VACUUM'; + if (!empty($table)) { + $query .= ' '.$db->quoteIdentifier($table, true); + } + return $db->exec($query); + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/package.php?r1=1.282&r2=1.283&diff_format=u Index: pear/MDB2/package.php diff -u pear/MDB2/package.php:1.282 pear/MDB2/package.php:1.283 --- pear/MDB2/package.php:1.282 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package.php Tue Feb 12 23:12:27 2008 @@ -8,6 +8,7 @@ $state = 'alpha'; $notes = <<<EOT - 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 - fixed bug #12991: new error code in errorInfo() [afz] http://cvs.php.net/viewvc.cgi/pear/MDB2/package_ibase.php?r1=1.142&r2=1.143&diff_format=u Index: pear/MDB2/package_ibase.php diff -u pear/MDB2/package_ibase.php:1.142 pear/MDB2/package_ibase.php:1.143 --- pear/MDB2/package_ibase.php:1.142 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_ibase.php Tue Feb 12 23:12:27 2008 @@ -6,6 +6,8 @@ $version = 'XXX'; $state = 'alpha'; $notes = <<<EOT +- request #12731: added truncateTable() in the Manager module +- request #12732: added vacuum() in the Manager module for OPTIMIZE/VACUUM TABLE abstraction - fixed bug #12924: correctly handle internal expected errors even with custom error handling - fixed bug #12948: removed setCharset(), since "SET NAMES" is only supported in ISQL - fixed bug #12958: support multi autoincrement fields in _makeAutoincrement() [patch by Ali Fazelzade] http://cvs.php.net/viewvc.cgi/pear/MDB2/package_mssql.php?r1=1.111&r2=1.112&diff_format=u Index: pear/MDB2/package_mssql.php diff -u pear/MDB2/package_mssql.php:1.111 pear/MDB2/package_mssql.php:1.112 --- pear/MDB2/package_mssql.php:1.111 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_mssql.php Tue Feb 12 23:12:27 2008 @@ -6,12 +6,14 @@ $version = 'XXX'; $state = 'alpha'; $notes = <<<EOT -- fixed bug #12697: MDB2_Driver_mssql fails to load with the sybase_ct extension +- 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] -- fixed bug #12391: fixed lastInsertID() (thanks to Marius Toma) - added standaloneQuery() and databaseExists() open todo items: http://cvs.php.net/viewvc.cgi/pear/MDB2/package_mysql.php?r1=1.139&r2=1.140&diff_format=u Index: pear/MDB2/package_mysql.php diff -u pear/MDB2/package_mysql.php:1.139 pear/MDB2/package_mysql.php:1.140 --- pear/MDB2/package_mysql.php:1.139 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_mysql.php Tue Feb 12 23:12:27 2008 @@ -9,6 +9,8 @@ - request #11204: support AUTO_INCREMENT for FLOAT data type and UNSIGNED option for FLOAT and DECIMAL data type [afz] - fixed bug #11692: value of $db->supports('transactions') changes after query [afz] +- 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 quoting in createDatabase() in the Manager module - fixed bug #12924: correctly handle internal expected errors even with custom error handling http://cvs.php.net/viewvc.cgi/pear/MDB2/package_mysqli.php?r1=1.143&r2=1.144&diff_format=u Index: pear/MDB2/package_mysqli.php diff -u pear/MDB2/package_mysqli.php:1.143 pear/MDB2/package_mysqli.php:1.144 --- pear/MDB2/package_mysqli.php:1.143 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_mysqli.php Tue Feb 12 23:12:27 2008 @@ -9,6 +9,8 @@ - request #11204: support AUTO_INCREMENT for FLOAT data type and UNSIGNED option for FLOAT and DECIMAL data type [afz] - fixed bug #11692: value of $db->supports('transactions') changes after query [afz] +- 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 quoting in createDatabase() in the Manager module - fixed bug #12924: correctly handle internal expected errors even with custom error handling http://cvs.php.net/viewvc.cgi/pear/MDB2/package_oci8.php?r1=1.142&r2=1.143&diff_format=u Index: pear/MDB2/package_oci8.php diff -u pear/MDB2/package_oci8.php:1.142 pear/MDB2/package_oci8.php:1.143 --- pear/MDB2/package_oci8.php:1.142 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_oci8.php Tue Feb 12 23:12:28 2008 @@ -7,6 +7,8 @@ $state = 'alpha'; $notes = <<<EOT - request #12528: added 'session_mode' DSN parameter +- 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 - fixed bug #12924: correctly handle internal expected errors even with custom error handling - added standaloneQuery() and databaseExists() http://cvs.php.net/viewvc.cgi/pear/MDB2/package_pgsql.php?r1=1.140&r2=1.141&diff_format=u Index: pear/MDB2/package_pgsql.php diff -u pear/MDB2/package_pgsql.php:1.140 pear/MDB2/package_pgsql.php:1.141 --- pear/MDB2/package_pgsql.php:1.140 Tue Feb 12 21:28:30 2008 +++ pear/MDB2/package_pgsql.php Tue Feb 12 23:12:28 2008 @@ -6,9 +6,11 @@ $version = 'XXX'; $state = 'alpha'; $notes = <<<EOT +- 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 - fixed bug #12846: missing escape in getSequenceName() on PostgreSQL 8.2.4 [thanks to Stephane Berthelot] -- request #12800: added alterDatabase() in the Manager module - fixed bug #12920: added new error info and fixed escape method if connection doesn't exist [thanks to Ali Fazelzade] - fixed bug #12922: use standaloneQuery() in alterDatabase() [thanks to Ali Fazelzade] http://cvs.php.net/viewvc.cgi/pear/MDB2/package_sqlite.php?r1=1.112&r2=1.113&diff_format=u Index: pear/MDB2/package_sqlite.php diff -u pear/MDB2/package_sqlite.php:1.112 pear/MDB2/package_sqlite.php:1.113 --- pear/MDB2/package_sqlite.php:1.112 Tue Feb 12 21:28:30 2008 +++ pear/MDB2/package_sqlite.php Tue Feb 12 23:12:28 2008 @@ -6,6 +6,8 @@ $version = 'XXX'; $state = 'alpha'; $notes = <<<EOT +- request #12731: added truncateTable() in the Manager module +- request #12732: added vacuum() in the Manager module for OPTIMIZE/VACUUM TABLE abstraction - fixed bug #12924: correctly handle internal expected errors even with custom error handling - added standaloneQuery() and databaseExists()
http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/Common.php?r1=1.70&r2=1.71&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/Common.php diff -u pear/MDB2/MDB2/Driver/Manager/Common.php:1.70 pear/MDB2/MDB2/Driver/Manager/Common.php:1.71 --- pear/MDB2/MDB2/Driver/Manager/Common.php:1.70 Sat Jan 12 13:31:48 2008 +++ pear/MDB2/MDB2/Driver/Manager/Common.php Tue Feb 12 23:12:27 2008 @@ -43,7 +43,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: Common.php,v 1.70 2008/01/12 13:31:48 quipo Exp $ +// $Id: Common.php,v 1.71 2008/02/12 23:12:27 quipo Exp $ // /** @@ -407,6 +407,34 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + return $db->raiseError(MDB2_ERROR_UNSUPPORTED, null, null, + 'method not implemented', __FUNCTION__); + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/ibase.php?r1=1.112&r2=1.113&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/ibase.php diff -u pear/MDB2/MDB2/Driver/Manager/ibase.php:1.112 pear/MDB2/MDB2/Driver/Manager/ibase.php:1.113 --- pear/MDB2/MDB2/Driver/Manager/ibase.php:1.112 Sun Jan 27 18:58:07 2008 +++ pear/MDB2/MDB2/Driver/Manager/ibase.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: ibase.php,v 1.112 2008/01/27 18:58:07 quipo Exp $ +// $Id: ibase.php,v 1.113 2008/02/12 23:12:27 quipo Exp $ require_once 'MDB2/Driver/Manager/Common.php'; @@ -400,6 +400,29 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + // not needed in Interbase/Firebird + return MDB2_OK; + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mssql.php?r1=1.99&r2=1.100&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mssql.php diff -u pear/MDB2/MDB2/Driver/Manager/mssql.php:1.99 pear/MDB2/MDB2/Driver/Manager/mssql.php:1.100 --- pear/MDB2/MDB2/Driver/Manager/mssql.php:1.99 Mon Feb 4 18:58:39 2008 +++ pear/MDB2/MDB2/Driver/Manager/mssql.php Tue Feb 12 23:12:27 2008 @@ -44,7 +44,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: mssql.php,v 1.99 2008/02/04 18:58:39 afz Exp $ +// $Id: mssql.php,v 1.100 2008/02/12 23:12:27 quipo Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -270,6 +270,42 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * NB: you have to run the NSControl Create utility to enable VACUUM + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + $timeout = isset($options['timeout']) ? (int)$options['timeout'] : 300; + + $query = 'NSControl Create'; + $result = $db->exec($query); + if (PEAR::isError($result)) { + return $result; + } + + return $db->exec('EXEC NSVacuum '.$timeout); + } + + // }}} // {{{ alterTable() /** @@ -420,7 +456,7 @@ if ($query) { $query.= ', '; } else { - $query.= 'ADD '; + $query.= 'ADD COLUMN '; } $query.= $db->getDeclaration($field['type'], $field_name, $field); } @@ -440,7 +476,7 @@ $query.= 'ALTER COLUMN '; } - //MSSQL not support change default value of field in altering mode + //MSSQL doesn't allow changing the DEFAULT value of a field in altering mode if (array_key_exists('default', $field['definition'])) { unset($field['definition']['default']); } http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mysql.php?r1=1.103&r2=1.104&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mysql.php diff -u pear/MDB2/MDB2/Driver/Manager/mysql.php:1.103 pear/MDB2/MDB2/Driver/Manager/mysql.php:1.104 --- pear/MDB2/MDB2/Driver/Manager/mysql.php:1.103 Sun Feb 3 20:12:10 2008 +++ pear/MDB2/MDB2/Driver/Manager/mysql.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysql.php,v 1.103 2008/02/03 20:12:10 afz Exp $ +// $Id: mysql.php,v 1.104 2008/02/12 23:12:27 quipo Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -285,6 +285,55 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + if (empty($table)) { + $table = $this->listTables(); + if (PEAR::isError($table)) { + return $table; + } + } + if (is_array($table)) { + foreach (array_keys($table) as $k) { + $table[$k] = $db->quoteIdentifier($table[$k]); + } + $table = implode(', ', $table); + } else { + $table = $db->quoteIdentifier($table); + } + + $result = $db->exec('OPTIMIZE TABLE '.$table); + if (PEAR::isError($result)) { + return $result; + } + if (!empty($options['analyze'])) { + return $db->exec('ANALYZE TABLE '.$table); + } + return MDB2_OK; + } + + // }}} // {{{ alterTable() /** @@ -687,33 +736,34 @@ * Get the stucture of a field into an array * * @author Leoncx - * @param string $table name of the table on which the index is to be created - * @param string $name name of the index to be created - * @param array $definition associative array that defines properties of the index to be created. - * Currently, only one property named FIELDS is supported. This property - * is also an associative with the names of the index fields as array - * indexes. Each entry of this array is set to another type of associative - * array that specifies properties of the index that are specific to - * each field. - * - * Currently, only the sorting property is supported. It should be used - * to define the sorting direction of the index. It may be set to either - * ascending or descending. - * - * Not all DBMS support index sorting direction configuration. The DBMS - * drivers of those that do not support it ignore this property. Use the - * function supports() to determine whether the DBMS driver can manage indexes. - * - * Example - * array( - * 'fields' => array( - * 'user_name' => array( - * 'sorting' => 'ascending' - * 'length' => 10 - * ), - * 'last_login' => array() - * ) + * @param string $table name of the table on which the index is to be created + * @param string $name name of the index to be created + * @param array $definition associative array that defines properties of the index to be created. + * Currently, only one property named FIELDS is supported. This property + * is also an associative with the names of the index fields as array + * indexes. Each entry of this array is set to another type of associative + * array that specifies properties of the index that are specific to + * each field. + * + * Currently, only the sorting property is supported. It should be used + * to define the sorting direction of the index. It may be set to either + * ascending or descending. + * + * Not all DBMS support index sorting direction configuration. The DBMS + * drivers of those that do not support it ignore this property. Use the + * function supports() to determine whether the DBMS driver can manage indexes. + * + * Example + * array( + * 'fields' => array( + * 'user_name' => array( + * 'sorting' => 'ascending' + * 'length' => 10 + * ), + * 'last_login' => array() * ) + * ) + * * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/mysqli.php?r1=1.90&r2=1.91&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/mysqli.php diff -u pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.90 pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.91 --- pear/MDB2/MDB2/Driver/Manager/mysqli.php:1.90 Sun Feb 3 20:13:23 2008 +++ pear/MDB2/MDB2/Driver/Manager/mysqli.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ // -// $Id: mysqli.php,v 1.90 2008/02/03 20:13:23 afz Exp $ +// $Id: mysqli.php,v 1.91 2008/02/12 23:12:27 quipo Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -285,6 +285,55 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + if (empty($table)) { + $table = $this->listTables(); + if (PEAR::isError($table)) { + return $table; + } + } + if (is_array($table)) { + foreach (array_keys($table) as $k) { + $table[$k] = $db->quoteIdentifier($table[$k]); + } + $table = implode(', ', $table); + } else { + $table = $db->quoteIdentifier($table); + } + + $result = $db->exec('OPTIMIZE TABLE '.$table); + if (PEAR::isError($result)) { + return $result; + } + if (!empty($options['analyze'])) { + return $db->exec('ANALYZE TABLE '.$table); + } + return MDB2_OK; + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/oci8.php?r1=1.102&r2=1.103&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/oci8.php diff -u pear/MDB2/MDB2/Driver/Manager/oci8.php:1.102 pear/MDB2/MDB2/Driver/Manager/oci8.php:1.103 --- pear/MDB2/MDB2/Driver/Manager/oci8.php:1.102 Tue Feb 12 21:37:08 2008 +++ pear/MDB2/MDB2/Driver/Manager/oci8.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Lukas Smith <smith@pooteeweet.org> | // +----------------------------------------------------------------------+ -// $Id: oci8.php,v 1.102 2008/02/12 21:37:08 quipo Exp $ +// $Id: oci8.php,v 1.103 2008/02/12 23:12:27 quipo Exp $ require_once 'MDB2/Driver/Manager/Common.php'; @@ -480,6 +480,29 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + // not needed in Oracle + return MDB2_OK; + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/pgsql.php?r1=1.79&r2=1.80&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/pgsql.php diff -u pear/MDB2/MDB2/Driver/Manager/pgsql.php:1.79 pear/MDB2/MDB2/Driver/Manager/pgsql.php:1.80 --- pear/MDB2/MDB2/Driver/Manager/pgsql.php:1.79 Sun Feb 3 20:13:42 2008 +++ pear/MDB2/MDB2/Driver/Manager/pgsql.php Tue Feb 12 23:12:27 2008 @@ -42,7 +42,7 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: pgsql.php,v 1.79 2008/02/03 20:13:42 afz Exp $ +// $Id: pgsql.php,v 1.80 2008/02/12 23:12:27 quipo Exp $ require_once 'MDB2/Driver/Manager/Common.php'; @@ -206,6 +206,47 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + $query = 'VACUUM'; + + if (!empty($options['full'])) { + $query .= ' FULL'; + } + if (!empty($options['freeze'])) { + $query .= ' FREEZE'; + } + if (!empty($options['analyze'])) { + $query .= ' ANALYZE'; + } + + if (!empty($table)) { + $query .= ' '.$db->quoteIdentifier($table, true); + } + return $db->exec($query); + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/MDB2/Driver/Manager/sqlite.php?r1=1.72&r2=1.73&diff_format=u Index: pear/MDB2/MDB2/Driver/Manager/sqlite.php diff -u pear/MDB2/MDB2/Driver/Manager/sqlite.php:1.72 pear/MDB2/MDB2/Driver/Manager/sqlite.php:1.73 --- pear/MDB2/MDB2/Driver/Manager/sqlite.php:1.72 Mon Dec 3 20:59:15 2007 +++ pear/MDB2/MDB2/Driver/Manager/sqlite.php Tue Feb 12 23:12:27 2008 @@ -2,7 +2,7 @@ // +----------------------------------------------------------------------+ // | PHP versions 4 and 5 | // +----------------------------------------------------------------------+ -// | Copyright (c) 1998-2007 Manuel Lemos, Tomas V.V.Cox, | +// | Copyright (c) 1998-2008 Manuel Lemos, Tomas V.V.Cox, | // | Stig. S. Bakken, Lukas Smith, Lorenzo Alberton | // | All rights reserved. | // +----------------------------------------------------------------------+ @@ -43,7 +43,7 @@ // | Lorenzo Alberton <l.alberton@quipo.it> | // +----------------------------------------------------------------------+ // -// $Id: sqlite.php,v 1.72 2007/12/03 20:59:15 quipo Exp $ +// $Id: sqlite.php,v 1.73 2008/02/12 23:12:27 quipo Exp $ // require_once 'MDB2/Driver/Manager/Common.php'; @@ -404,6 +404,37 @@ } // }}} + // {{{ vacuum() + + /** + * Optimize (vacuum) all the tables in the db (or only the specified table) + * and optionally run ANALYZE. + * + * @param string $table table name (all the tables if empty) + * @param array $options an array with driver-specific options: + * - timeout [int] (in seconds) [mssql-only] + * - analyze [boolean] [pgsql and mysql] + * - full [boolean] [pgsql-only] + * - freeze [boolean] [pgsql-only] + * + * @return mixed MDB2_OK success, a MDB2 error on failure + * @access public + */ + function vacuum($table = null, $options = array()) + { + $db =& $this->getDBInstance(); + if (PEAR::isError($db)) { + return $db; + } + + $query = 'VACUUM'; + if (!empty($table)) { + $query .= ' '.$db->quoteIdentifier($table, true); + } + return $db->exec($query); + } + + // }}} // {{{ alterTable() /** http://cvs.php.net/viewvc.cgi/pear/MDB2/package.php?r1=1.282&r2=1.283&diff_format=u Index: pear/MDB2/package.php diff -u pear/MDB2/package.php:1.282 pear/MDB2/package.php:1.283 --- pear/MDB2/package.php:1.282 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package.php Tue Feb 12 23:12:27 2008 @@ -8,6 +8,7 @@ $state = 'alpha'; $notes = <<<EOT - 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 - fixed bug #12991: new error code in errorInfo() [afz] http://cvs.php.net/viewvc.cgi/pear/MDB2/package_ibase.php?r1=1.142&r2=1.143&diff_format=u Index: pear/MDB2/package_ibase.php diff -u pear/MDB2/package_ibase.php:1.142 pear/MDB2/package_ibase.php:1.143 --- pear/MDB2/package_ibase.php:1.142 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_ibase.php Tue Feb 12 23:12:27 2008 @@ -6,6 +6,8 @@ $version = 'XXX'; $state = 'alpha'; $notes = <<<EOT +- request #12731: added truncateTable() in the Manager module +- request #12732: added vacuum() in the Manager module for OPTIMIZE/VACUUM TABLE abstraction - fixed bug #12924: correctly handle internal expected errors even with custom error handling - fixed bug #12948: removed setCharset(), since "SET NAMES" is only supported in ISQL - fixed bug #12958: support multi autoincrement fields in _makeAutoincrement() [patch by Ali Fazelzade] http://cvs.php.net/viewvc.cgi/pear/MDB2/package_mssql.php?r1=1.111&r2=1.112&diff_format=u Index: pear/MDB2/package_mssql.php diff -u pear/MDB2/package_mssql.php:1.111 pear/MDB2/package_mssql.php:1.112 --- pear/MDB2/package_mssql.php:1.111 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_mssql.php Tue Feb 12 23:12:27 2008 @@ -6,12 +6,14 @@ $version = 'XXX'; $state = 'alpha'; $notes = <<<EOT -- fixed bug #12697: MDB2_Driver_mssql fails to load with the sybase_ct extension +- 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] -- fixed bug #12391: fixed lastInsertID() (thanks to Marius Toma) - added standaloneQuery() and databaseExists() open todo items: http://cvs.php.net/viewvc.cgi/pear/MDB2/package_mysql.php?r1=1.139&r2=1.140&diff_format=u Index: pear/MDB2/package_mysql.php diff -u pear/MDB2/package_mysql.php:1.139 pear/MDB2/package_mysql.php:1.140 --- pear/MDB2/package_mysql.php:1.139 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_mysql.php Tue Feb 12 23:12:27 2008 @@ -9,6 +9,8 @@ - request #11204: support AUTO_INCREMENT for FLOAT data type and UNSIGNED option for FLOAT and DECIMAL data type [afz] - fixed bug #11692: value of $db->supports('transactions') changes after query [afz] +- 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 quoting in createDatabase() in the Manager module - fixed bug #12924: correctly handle internal expected errors even with custom error handling http://cvs.php.net/viewvc.cgi/pear/MDB2/package_mysqli.php?r1=1.143&r2=1.144&diff_format=u Index: pear/MDB2/package_mysqli.php diff -u pear/MDB2/package_mysqli.php:1.143 pear/MDB2/package_mysqli.php:1.144 --- pear/MDB2/package_mysqli.php:1.143 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_mysqli.php Tue Feb 12 23:12:27 2008 @@ -9,6 +9,8 @@ - request #11204: support AUTO_INCREMENT for FLOAT data type and UNSIGNED option for FLOAT and DECIMAL data type [afz] - fixed bug #11692: value of $db->supports('transactions') changes after query [afz] +- 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 quoting in createDatabase() in the Manager module - fixed bug #12924: correctly handle internal expected errors even with custom error handling http://cvs.php.net/viewvc.cgi/pear/MDB2/package_oci8.php?r1=1.142&r2=1.143&diff_format=u Index: pear/MDB2/package_oci8.php diff -u pear/MDB2/package_oci8.php:1.142 pear/MDB2/package_oci8.php:1.143 --- pear/MDB2/package_oci8.php:1.142 Tue Feb 12 21:28:29 2008 +++ pear/MDB2/package_oci8.php Tue Feb 12 23:12:28 2008 @@ -7,6 +7,8 @@ $state = 'alpha'; $notes = <<<EOT - request #12528: added 'session_mode' DSN parameter +- 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 - fixed bug #12924: correctly handle internal expected errors even with custom error handling - added standaloneQuery() and databaseExists() http://cvs.php.net/viewvc.cgi/pear/MDB2/package_pgsql.php?r1=1.140&r2=1.141&diff_format=u Index: pear/MDB2/package_pgsql.php diff -u pear/MDB2/package_pgsql.php:1.140 pear/MDB2/package_pgsql.php:1.141 --- pear/MDB2/package_pgsql.php:1.140 Tue Feb 12 21:28:30 2008 +++ pear/MDB2/package_pgsql.php Tue Feb 12 23:12:28 2008 @@ -6,9 +6,11 @@ $version = 'XXX'; $state = 'alpha'; $notes = <<<EOT +- 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 - fixed bug #12846: missing escape in getSequenceName() on PostgreSQL 8.2.4 [thanks to Stephane Berthelot] -- request #12800: added alterDatabase() in the Manager module - fixed bug #12920: added new error info and fixed escape method if connection doesn't exist [thanks to Ali Fazelzade] - fixed bug #12922: use standaloneQuery() in alterDatabase() [thanks to Ali Fazelzade] http://cvs.php.net/viewvc.cgi/pear/MDB2/package_sqlite.php?r1=1.112&r2=1.113&diff_format=u Index: pear/MDB2/package_sqlite.php diff -u pear/MDB2/package_sqlite.php:1.112 pear/MDB2/package_sqlite.php:1.113 --- pear/MDB2/package_sqlite.php:1.112 Tue Feb 12 21:28:30 2008 +++ pear/MDB2/package_sqlite.php Tue Feb 12 23:12:28 2008 @@ -6,6 +6,8 @@ $version = 'XXX'; $state = 'alpha'; $notes = <<<EOT +- request #12731: added truncateTable() in the Manager module +- request #12732: added vacuum() in the Manager module for OPTIMIZE/VACUUM TABLE abstraction - fixed bug #12924: correctly handle internal expected errors even with custom error handling - added standaloneQuery() and databaseExists()