Merge 2015.2 Gold C/D changes

svn path=/Website/trunk/; revision=26827
This commit is contained in:
Jos Groot Lipman
2015-10-29 15:17:48 +00:00
parent 9a27360fbb
commit 1ca35a54a7
20 changed files with 119 additions and 51 deletions

View File

@@ -117,7 +117,7 @@ function model_reportcolumns(usrrap_key, params)
if (i != -1)
view_name_short = view_name_short.substring(i+1);
var sql = "SELECT object_name, object_type, last_ddl_time"
var sql = "SELECT object_name, object_type, last_ddl_time, status"
+ " FROM user_objects"
+ " WHERE "
+ (user.oslogin() == "_FACILITOR" ? "object_type IN ('VIEW', 'TABLE')" : " object_type = 'VIEW'")
@@ -125,6 +125,20 @@ function model_reportcolumns(usrrap_key, params)
var oRs = Oracle.Execute(sql);
if (oRs.Eof)
abort_with_warning("Unable to determine columns for report view '{0}'!".format(view_name_short));
if (oRs("status").Value != 'VALID') // Gebeurt nog wel eens na een dump-refresh
{
if (oRs("object_type").Value == 'VIEW')
{
__DoLog("Auto compile invalid {0}".format(view_name_short));
Oracle.Execute("ALTER VIEW {0} COMPILE".format(view_name_short));
oRs.Close();
var oRs = Oracle.Execute(sql); // Tweede poging
}
}
if (oRs("status").Value != 'VALID')
abort_with_warning("Report view '{0}' is INVALID!".format(view_name_short));
var view_ddl_time = new Date(oRs("last_ddl_time").Value);
oRs.Close();
var mustRefresh = (oldcols.length == 0 || !lastrefresh || view_ddl_time > lastrefresh);