Commit 7c59bd5c authored by Carsten  Rose's avatar Carsten Rose
Browse files

Merge branch 'B11325_SQL_CALL' into 'develop'

B11325 SQL CALL is handled seperate. All statements will execute. If only a...

See merge request !414
parents 9c8b5ebb 023711ee
Pipeline #6970 passed with stage
in 1 minute and 51 seconds
......@@ -441,7 +441,6 @@ class Database {
case 'SHOW':
case 'DESCRIBE':
case 'EXPLAIN':
case 'CALL':
if (false === ($result = $this->mysqli_stmt->get_result())) {
throw new \DbException(
json_encode([ERROR_MESSAGE_TO_USER => 'Error DB execute', ERROR_MESSAGE_TO_DEVELOPER => '[ mysqli: ' . $this->mysqli_stmt->errno . ' ] ' . $this->mysqli_stmt->error . $specificMessage]),
......@@ -454,6 +453,19 @@ class Database {
$count = $stat[DB_NUM_ROWS];
$msg = 'Read rows: ' . $stat[DB_NUM_ROWS];
break;
case 'CALL':
$result = $this->mysqli_stmt->get_result();
$queryType = QUERY_TYPE_SELECT;
If($result === false){
$stat[DB_NUM_ROWS] = 0;
$msg = 'Read rows: ' . $stat[DB_NUM_ROWS] . '(No SELECT statement)';
}else{
$this->mysqli_result = $result;
$stat[DB_NUM_ROWS] = $this->mysqli_result->num_rows;
$msg = 'Read rows: ' . $stat[DB_NUM_ROWS];
}
$count = $stat[DB_NUM_ROWS];
break;
case 'REPLACE':
case 'INSERT':
$queryType = QUERY_TYPE_INSERT;
......
Supports Markdown
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