close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 21 years ago

Closed 17 years ago

#97 closed defect (fixed)

Time sets C, Daily and Diario don't work with higher frequencies

Reported by: Víctor de Buen Remiro Owned by: Víctor de Buen Remiro
Priority: normal Milestone:
Component: TimeSetAlgebra Version: head
Severity: normal Keywords:
Cc:

Description

In the next TOL code you can test how C time set doesn't reset to 0 the time info.

Succ(y2003m06d08h20i26s25.000, C, -1) = y2003m06d07h20i26s25.000
Succ(y2003m06d08h20i26s25.000, H(0), -1) = y2003m06d08
Succ(y2003m06d08h20i26s25.000, WD(1), -1) = y2003m06d02
Succ(y2003m06d08h20i26s25.000, D(1), -1) = y2003m06d01

Date dte = TextToDate("2003-06-08 20:26:25");
WriteLn("Succ("<<dte<<", C, -1) = "<<Date Succ(dte, C, -1));
WriteLn("Succ("<<dte<<", H(0), -1) = "<<Date Succ(dte, H(0), -1));
WriteLn("Succ("<<dte<<", WD(1), -1) = "<<Date Succ(dte, WD(1), -1));
WriteLn("Succ("<<dte<<", D(1), -1) = "<<Date Succ(dte, D(1), -1));

Regards

Change History (6)

comment:1 Changed 18 years ago by Víctor de Buen Remiro

Owner: changed from danirus to Víctor de Buen Remiro

comment:2 Changed 18 years ago by Víctor de Buen Remiro

Problem was solved but not notified.
A test has been added to tol_tests/tol/Bugzilla/bug_000097

Thanks to report

comment:3 Changed 18 years ago by Víctor de Buen Remiro

Resolution: later
Status: newclosed

I propose a temporary solution available when a database is open.

Real SqlLike(Text txt, Text pattern)
{

Text qry = "select '"+txt+"' LIKE '"+pattern+"' from dual";

WriteLn(qry);

Set s = DBTable(qry);
If(Card(s)!=1,?,s[1][1])

};
PutDescription(I2(
"Calls to the currently open database LIKE function.",
"Llama a la función LIKE de la base de datos abierta."),SqlLike);

Real SqlLike("farola","%o%a");

With a AMD64 with local MySQL server the total time for 10000 iterations of SqlLike calls was 3.328 seconds. Calling TextMatch total 1000 times ends in 0.578 seconds.

comment:4 Changed 18 years ago by Víctor de Buen Remiro

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000097

comment:5 Changed 17 years ago by Víctor de Buen Remiro

Resolution: later
Status: closedreopened

comment:6 Changed 17 years ago by Víctor de Buen Remiro

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.