Commit 28d9ee7c by Carsten Brandt

adjusted cubrid version in schema quote

parent a6222545
...@@ -101,7 +101,8 @@ class Schema extends \yii\db\Schema ...@@ -101,7 +101,8 @@ class Schema extends \yii\db\Schema
$this->db->open(); $this->db->open();
// workaround for broken PDO::quote() implementation in CUBRID 9.1.0 http://jira.cubrid.org/browse/APIS-658 // workaround for broken PDO::quote() implementation in CUBRID 9.1.0 http://jira.cubrid.org/browse/APIS-658
if (version_compare($this->db->pdo->getAttribute(\PDO::ATTR_CLIENT_VERSION), '9.1.0', '<=')) { $version = $this->db->pdo->getAttribute(\PDO::ATTR_CLIENT_VERSION);
if (version_compare($version, '8.4.4.0002', '<') || $version[0] == '9' && version_compare($version, '9.2.0.0002', '<=')) {
return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'"; return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'";
} else { } else {
return $this->db->pdo->quote($str); return $this->db->pdo->quote($str);
......
...@@ -10,7 +10,16 @@ sudo apt-get install cubrid ...@@ -10,7 +10,16 @@ sudo apt-get install cubrid
sudo apt-get install cubrid-demodb sudo apt-get install cubrid-demodb
# cubrid pdo # cubrid pdo
sudo apt-get install php5-cubrid install_pdo_cubrid() {
echo '/opt/cubrid/' | pecl install pdo_cubrid wget "http://pecl.php.net/get/PDO_CUBRID-9.2.0.0001.tgz" &&
echo "extension=pdo_cubrid.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini tar -zxf "PDO_CUBRID-9.2.0.0001.tgz" &&
/etc/profile.d/cubrid.sh sh -c "cd PDO_CUBRID-9.2.0.0001 && phpize && ./configure && make && sudo make install"
echo "extension=pdo_cubrid.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
return $?
}
install_pdo_cubrid > ~/pdo_cubrid.log || ( echo "=== PDO CUBRID BUILD FAILED ==="; cat ~/pdo_cubrid.log )
echo "Installed CUBRID `dpkg -s cubrid |grep Version`"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment