WIP: schedulers..
This commit is contained in:
@@ -182,10 +182,6 @@ class MssqlManager extends DBManager
|
||||
}
|
||||
}
|
||||
|
||||
if($this->checkError('Could Not Connect:', $dieOnError))
|
||||
$GLOBALS['log']->info("connected to db");
|
||||
|
||||
$GLOBALS['log']->info("Connect:".$this->database);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -218,7 +214,6 @@ class MssqlManager extends DBManager
|
||||
if (empty($app_strings) or !isset($app_strings['ERR_MSSQL_DB_CONTEXT'])) {
|
||||
//ignore the message from sql-server if $app_strings array is empty. This will happen
|
||||
//only if connection if made before languge is set.
|
||||
$GLOBALS['log']->debug("Ignoring this database message: " . $sqlmsg);
|
||||
$sqlmsg = '';
|
||||
}
|
||||
else {
|
||||
@@ -229,7 +224,6 @@ class MssqlManager extends DBManager
|
||||
}
|
||||
|
||||
if ( strlen($sqlmsg) > 2 ) {
|
||||
$GLOBALS['log']->fatal("SQL Server error: " . $sqlmsg);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -246,12 +240,8 @@ class MssqlManager extends DBManager
|
||||
$suppress = false
|
||||
)
|
||||
{
|
||||
// Flag if there are odd number of single quotes
|
||||
if ((substr_count($sql, "'") & 1))
|
||||
$GLOBALS['log']->error("SQL statement[" . $sql . "] has odd number of single quotes.");
|
||||
|
||||
$this->countQuery($sql);
|
||||
$GLOBALS['log']->info('Query:' . $sql);
|
||||
$this->checkConnection();
|
||||
$this->query_time = microtime(true);
|
||||
|
||||
@@ -268,7 +258,6 @@ class MssqlManager extends DBManager
|
||||
$this->lastmysqlrow = -1;
|
||||
|
||||
$this->query_time = microtime(true) - $this->query_time;
|
||||
$GLOBALS['log']->info('Query Execution Time:'.$this->query_time);
|
||||
|
||||
|
||||
$this->checkError($msg.' Query Failed:' . $sql . '::', $dieOnError);
|
||||
@@ -295,8 +284,6 @@ class MssqlManager extends DBManager
|
||||
if ($start < 0)
|
||||
$start=0;
|
||||
|
||||
$GLOBALS['log']->debug(print_r(func_get_args(),true));
|
||||
|
||||
$this->lastsql = $sql;
|
||||
|
||||
//change the casing to lower for easier string comparison, and trim whitespaces
|
||||
@@ -392,7 +379,6 @@ class MssqlManager extends DBManager
|
||||
else {
|
||||
if ($start < 0)
|
||||
$start = 0;
|
||||
$GLOBALS['log']->debug(print_r(func_get_args(),true));
|
||||
$this->lastsql = $sql;
|
||||
$matches = array();
|
||||
preg_match('/^(.*SELECT )(.*?FROM.*WHERE)(.*)$/isU',$sql, $matches);
|
||||
@@ -547,8 +533,6 @@ class MssqlManager extends DBManager
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$GLOBALS['log']->debug('Limit Query: ' . $newSQL);
|
||||
$result = $this->query($newSQL, $dieOnError, $msg);
|
||||
$this->dump_slow_queries($newSQL);
|
||||
return $result;
|
||||
@@ -779,13 +763,11 @@ class MssqlManager extends DBManager
|
||||
return $col_name;
|
||||
}
|
||||
//break out of here, log this
|
||||
$GLOBALS['log']->debug("No match was found for order by, pass string back untouched as: $orig_order_match");
|
||||
return $orig_order_match;
|
||||
}
|
||||
else {
|
||||
//if found, then parse and return
|
||||
//grab string up to the aliased column
|
||||
$GLOBALS['log']->debug("order by found, process sql string");
|
||||
|
||||
$psql = (trim($this->getAliasFromSQL($sql, $orderMatch )));
|
||||
if (empty($psql))
|
||||
@@ -810,7 +792,6 @@ class MssqlManager extends DBManager
|
||||
$col_name = $col_name. " ". $asc_desc;
|
||||
|
||||
//pass in new order by
|
||||
$GLOBALS['log']->debug("order by being returned is " . $col_name);
|
||||
return $col_name;
|
||||
}
|
||||
}
|
||||
@@ -829,7 +810,6 @@ class MssqlManager extends DBManager
|
||||
{
|
||||
|
||||
global $beanList, $beanFiles;
|
||||
$GLOBALS['log']->debug("Module being processed is " . $module_str);
|
||||
//get the right module files
|
||||
//the module string exists in bean list, then process bean for correct table name
|
||||
//note that we exempt the reports module from this, as queries from reporting module should be parsed for
|
||||
@@ -847,14 +827,12 @@ class MssqlManager extends DBManager
|
||||
$tbl_name = trim($tbl_name);
|
||||
|
||||
if(empty($tbl_name)){
|
||||
$GLOBALS['log']->debug("Could not find table name for module $module_str. ");
|
||||
$tbl_name = $module_str;
|
||||
}
|
||||
}
|
||||
else {
|
||||
//since the module does NOT exist in beanlist, then we have to parse the string
|
||||
//and grab the table name from the passed in sql
|
||||
$GLOBALS['log']->debug("Could not find table name from module in request, retrieve from passed in sql");
|
||||
$tbl_name = $module_str;
|
||||
$sql = strtolower($sql);
|
||||
|
||||
@@ -873,7 +851,6 @@ class MssqlManager extends DBManager
|
||||
if ($next_space > 0) {
|
||||
$tbl_name= substr($tableEnd,0, $next_space);
|
||||
if(empty($tbl_name)){
|
||||
$GLOBALS['log']->debug("Could not find table name sql either, return $module_str. ");
|
||||
$tbl_name = $module_str;
|
||||
}
|
||||
}
|
||||
@@ -911,7 +888,6 @@ class MssqlManager extends DBManager
|
||||
}
|
||||
}
|
||||
//return table name
|
||||
$GLOBALS['log']->debug("Table name for module $module_str is: ".$tbl_name);
|
||||
return $tbl_name;
|
||||
}
|
||||
|
||||
@@ -1066,7 +1042,6 @@ class MssqlManager extends DBManager
|
||||
$tableName
|
||||
)
|
||||
{
|
||||
$GLOBALS['log']->info("tableExists: $tableName");
|
||||
|
||||
$this->checkConnection();
|
||||
$result = $this->query(
|
||||
@@ -1135,7 +1110,6 @@ class MssqlManager extends DBManager
|
||||
*/
|
||||
public function getTablesArray()
|
||||
{
|
||||
$GLOBALS['log']->debug('MSSQL fetching table list');
|
||||
|
||||
if($this->getDatabase()) {
|
||||
$tables = array();
|
||||
@@ -1159,7 +1133,6 @@ class MssqlManager extends DBManager
|
||||
*/
|
||||
public function wakeupFTS()
|
||||
{
|
||||
$GLOBALS['log']->debug('MSSQL about to wakeup FTS');
|
||||
|
||||
if($this->getDatabase()) {
|
||||
//create wakup catalog
|
||||
|
||||
Reference in New Issue
Block a user