import v1.1.0_beta1 | 2009-08-21

This commit is contained in:
2019-07-17 22:16:19 +02:00
parent 2c1152f0d3
commit 8dee6b1a10
2306 changed files with 251360 additions and 23428 deletions

View File

@ -17,7 +17,7 @@
* @subpackage Adapter
* @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: Mysql.php 9101 2008-03-30 19:54:38Z thomas $
* @version $Id: Mysql.php 14953 2009-04-17 00:56:16Z norm2782 $
*/
@ -76,6 +76,26 @@ class Zend_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Abstract
'FLOAT' => Zend_Db::FLOAT_TYPE
);
/**
* Creates a PDO object and connects to the database.
*
* @return void
* @throws Zend_Db_Adapter_Exception
*/
protected function _connect()
{
if ($this->_connection) {
return;
}
if (!empty($this->_config['charset'])) {
$initCommand = "SET NAMES '" . $this->_config['charset'] . "'";
$this->_config['driver_options'][PDO::MYSQL_ATTR_INIT_COMMAND] = $initCommand;
}
parent::_connect();
}
/**
* @return string
*/
@ -161,6 +181,10 @@ class Zend_Db_Adapter_Pdo_Mysql extends Zend_Db_Adapter_Pdo_Abstract
$row[$type] = 'decimal';
$precision = $matches[1];
$scale = $matches[2];
} else if (preg_match('/^float\((\d+),(\d+)\)/', $row[$type], $matches)) {
$row[$type] = 'float';
$precision = $matches[1];
$scale = $matches[2];
} else if (preg_match('/^((?:big|medium|small|tiny)?int)\((\d+)\)/', $row[$type], $matches)) {
$row[$type] = $matches[1];
// The optional argument of a MySQL int type is not precision