-
Bug
-
Resolution: Done
-
Major
-
10.1
-
None
Run the following queries:
BEGIN declare timestamp ts1 = select now(); DECLARE integer c = 20000; WHILE (c > 0) BEGIN c= c-1; END declare timestamp ts2 = select now(); select ts1, ts2; END ;;
and
BEGIN DECLARE integer c = 20000; create local temporary table #tem(ts timestamp); WHILE (c > 0) BEGIN INSERT INTO #tem VALUES((select NOW())); c= c-1; END select * from #tem; END ;;
NOW() function returns the same value for each call in BEGIN...END block and it doesn't matter if it is atomic or not.