Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
28d9ee7c
Commit
28d9ee7c
authored
Oct 15, 2013
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adjusted cubrid version in schema quote
parent
a6222545
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
Schema.php
framework/yii/db/cubrid/Schema.php
+2
-1
cubrid-setup.sh
tests/unit/data/travis/cubrid-setup.sh
+13
-4
No files found.
framework/yii/db/cubrid/Schema.php
View file @
28d9ee7c
...
@@ -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
);
...
...
tests/unit/data/travis/cubrid-setup.sh
View file @
28d9ee7c
...
@@ -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
`
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment