mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-11 19:20:01 +08:00
Fix #18229: Add a flag to set Connection to SyBase mode
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
This commit is contained in:
@@ -5,6 +5,7 @@ Yii Framework 2 Change Log
|
|||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
- Bug #18233: Add PHP 8 support (samdark)
|
- Bug #18233: Add PHP 8 support (samdark)
|
||||||
|
- Bug #18229: Add flag for recognize SyBase databases on uses pdo_dblib (darkdef)
|
||||||
|
|
||||||
|
|
||||||
2.0.37 August 07, 2020
|
2.0.37 August 07, 2020
|
||||||
|
|||||||
@@ -418,6 +418,11 @@ class Connection extends Component
|
|||||||
* @see enableLogging
|
* @see enableLogging
|
||||||
*/
|
*/
|
||||||
public $enableProfiling = true;
|
public $enableProfiling = true;
|
||||||
|
/**
|
||||||
|
* @var bool If the database connected via pdo_dblib is SyBase.
|
||||||
|
* @since 2.0.38
|
||||||
|
*/
|
||||||
|
public $isSybase = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Transaction the currently active transaction
|
* @var Transaction the currently active transaction
|
||||||
@@ -720,7 +725,7 @@ class Connection extends Component
|
|||||||
$this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, $this->emulatePrepare);
|
$this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, $this->emulatePrepare);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (in_array($this->getDriverName(), ['mssql', 'dblib'], true)) {
|
if (!$this->isSybase && in_array($this->getDriverName(), ['mssql', 'dblib'], true)) {
|
||||||
$this->pdo->exec('SET ANSI_NULL_DFLT_ON ON');
|
$this->pdo->exec('SET ANSI_NULL_DFLT_ON ON');
|
||||||
}
|
}
|
||||||
if ($this->charset !== null && in_array($this->getDriverName(), ['pgsql', 'mysql', 'mysqli', 'cubrid'], true)) {
|
if ($this->charset !== null && in_array($this->getDriverName(), ['pgsql', 'mysql', 'mysqli', 'cubrid'], true)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user