Warning: Table '.\dcgforum\cache_page' is marked as crashed and should be repaired query: SELECT data, created, headers, expire FROM cache_page WHERE cid = 'http://forums.dataphor.org/index.php?q=node/26' in C:\Sites\DCGForum\includes\database.mysql.inc on line 172
IsSpecial() doesn't work | Dataphor Forums

IsSpecial() doesn't work

create type Foo {
representation Foo { AsString : String },
special Bar Foo("Bar")
};

create table Baz in System.Temp {
Foo : Foo
};

insert table {
row { Foo("Hallo") Foo },
row { FooBar() Foo }
} into Baz;

select Foo("Hallo"); // Hallo
select FooBar(); // Bar
select Foo("Hello").IsSpecial(); // False
select Foo("Bar").IsSpecial(); // True
select Foo("Bar").IsBar(); // True
select FooBar().IsSpecial(); // True
select FooBar().IsBar(); // True
select Baz; // Bar, Hallo
select Baz where Foo = Foo("Bar"); // Bar
select Baz where Foo = FooBar(); // Bar
select Baz where Foo.IsSpecial(); // fail
select Baz where Foo.IsBar(); // fail

/* This works when running in-process, but when running against the service, the last two queries fail with the following error message:

Application:105149 --->
Unable to resolve operator reference ".Test.IsSpecial" with signature "(Test.Foo)".
---- Server Context ----
at Alphora.Dataphor.DAE.Server.ServerBatch.Alphora.Dataphor.DAE.IServerBatch.Execute(DataParams AParams)
at Alphora.Dataphor.DAE.Server.ServerScript.Alphora.Dataphor.DAE.IServerScript.Execute(DataParams AParams)
at Alphora.Dataphor.DAE.Server.LocalExpressionPlan.GetDataType()
Application:106185 --->
Errors occurred while deserializing client cache time stamp (56).
---- Server Context ----
at Alphora.Dataphor.DAE.Server.LocalExpressionPlan.GetDataType()
at Alphora.Dataphor.DAE.Server.LocalExpressionPlan..ctor(LocalProcess AProcess, IRemoteServerExpressionPlan APlan, PlanDescriptor APlanDescriptor, DataParams AParams)
at Alphora.Dataphor.DAE.Server.LocalBatch.PrepareExpression(DataParams AParams)
at Alphora.Dataphor.DAE.Client.ScriptExecutionUtility.ExecuteScript(IServerProcess AProcess, String AScript, ScriptExecuteOption AOptions, ErrorList& AErrors, TimeSpan& ATimeElapsed, ReportScriptProgressHandler AReportScriptProgress)
*/

Defect Reported

Hi Jon,

Thank you for the reproduction. Unfortunately I do not have a workaround for this at this point. The defect has been added to the list, and we will try to get a resolution posted as soon as we can.

Bryn Rhodes
Database Consulting Group LLC


Warning: Table '.\dcgforum\watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Table &amp;#039;.\\dcgforum\\cache_page&amp;#039; is marked as crashed and should be repaired\nquery: LOCK TABLES cache_page WRITE</em> in <em>C:\\Sites\\DCGForum\\includes\\database.mysql.inc</em> on line <em>172</em>.', 2, '', 'http://forums.dataphor.org/index.php?q=node/26', '', '54.196.190.32', 1542385844) in C:\Sites\DCGForum\includes\database.mysql.inc on line 172

Warning: Table '.\dcgforum\watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Table &amp;#039;.\\dcgforum\\cache_page&amp;#039; is marked as crashed and should be repaired\nquery: UPDATE cache_page SET data = &amp;#039;\\0\\0\\0\\0\\0\\0n{9\\r(ZrCRϱą8\\&amp;quot;^rݥe=/s8$%)RĿڙg]_@S_^]?ς|z|3 {p% u\\\\ hb/B]po\\r f+֏tMy2SqёC 1\\&amp;#039;Y&amp;lt;hA41G %}g4KuӐ *{toDB[MDHx%dQJ\\Z)&amp;lt;&amp;gt;Xw&amp;amp;2M3O9 tocO{N LTT ==&amp;amp;OFe ){\\n9ՃD SDnsrgVx@#RwXH\\n\\n*AJ#Fܛ|\\&amp;quot;* LD^dX\\&amp;quot;(SKi\\ZDtN\\n#t X(*1͍c ET!|ȑ\\Zz%Ca7u(۹ezvMo}6 in C:\Sites\DCGForum\includes\database.mysql.inc on line 172

Warning: Table '.\dcgforum\watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>Incorrect string value: &amp;#039;\\x8B\\x08\\0\\0...&amp;#039; for column &amp;#039;session&amp;#039; at row 1\nquery: INSERT INTO sessions (sid, uid, cache, hostname, session, timestamp) VALUES (&amp;#039;lbbf8bcl97tn51nvj73eo5pu86&amp;#039;, 0, 0, &amp;#039;54.196.190.32&amp;#039;, &amp;#039;messages|a:1:{s:5:\\&amp;quot;error\\&amp;quot;;a:2:{i:0;s:195:\\&amp;quot;user warning: Table &amp;amp;#039;.\\\\dcgforum\\\\cache_page&amp;amp;#039; is marked as crashed and should be repaired\\nquery: LOCK TABLES cache_page WRITE in C:\\\\Sites\\\\DCGForum\\\\includes\\\\database.mysql.inc on line 172.\\&amp;quot;;i:1;s:3015:\\&amp;quot;user warning: Table &amp;amp;#039;.\\\\dcgforum\\\\cache_page&amp;amp;#039; is mark in C:\Sites\DCGForum\includes\database.mysql.inc on line 172