Commit 11676e51 authored by Thiago Ornellas's avatar Thiago Ornellas Committed by Steve Müller

Fixing the command when option is CURRENT_SCHEMA

The schema's name in the alter session command must not be quoted
https://docs.oracle.com/cd/B28359_01/server.111/b28310/general009.htm

fixes #1352
parent b1cbe8c7
...@@ -69,7 +69,11 @@ class OracleSessionInit implements EventSubscriber ...@@ -69,7 +69,11 @@ class OracleSessionInit implements EventSubscriber
array_change_key_case($this->_defaultSessionVars, \CASE_UPPER); array_change_key_case($this->_defaultSessionVars, \CASE_UPPER);
$vars = array(); $vars = array();
foreach ($this->_defaultSessionVars as $option => $value) { foreach ($this->_defaultSessionVars as $option => $value) {
$vars[] = $option." = '".$value."'"; if($option === 'CURRENT_SCHEMA') {
$vars[] = $option . " = " . $value;
} else {
$vars[] = $option . " = '" . $value . "'";
}
} }
$sql = "ALTER SESSION SET ".implode(" ", $vars); $sql = "ALTER SESSION SET ".implode(" ", $vars);
$args->getConnection()->executeUpdate($sql); $args->getConnection()->executeUpdate($sql);
......
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