Test cases to show that CURRENT_TIMESTAMP and similar hold the same value
across a transaction. FossilOrigin-Name: 7b2fa20e31b8a0314b9ccb97bb556898d552505dbc5943f248df3f86c0f4e008
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
C Revert\sthe\sbehavior\sof\sdate/time\sfunctions\swith\sno\sarguments\sso\sthat\sthey\nonce\sagain\swork\slike\s'now',\seven\swhile\sCURRENT_TIMESTAMP\sand\ssimilar\swork\nlike\s'txn'.
|
||||
D 2023-02-08T12:01:48.294
|
||||
C Test\scases\sto\sshow\sthat\sCURRENT_TIMESTAMP\sand\ssimilar\shold\sthe\ssame\svalue\nacross\sa\stransaction.
|
||||
D 2023-02-08T12:31:47.043
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
@@ -910,7 +910,7 @@ F test/ctime.test 340f362f41f92972bbd71f44e10569a5cc694062b692231bd08aa6fe6c1c47
|
||||
F test/cursorhint.test 0175e4404181ace3ceca8b114eb0a98eae600d565aa4e2705abbe6614c7fe201
|
||||
F test/cursorhint2.test 6f3aa9cb19e7418967a10ec6905209bcbb5968054da855fc36c8beee9ae9c42f
|
||||
F test/dataversion1.test 6e5e86ac681f0782e766ebcb56c019ae001522d114e0e111e5ebf68ccf2a7bb8
|
||||
F test/date.test 0890bbd03f722169ae34f6d6f7822061d5fda8742355438562638ebed07e227c
|
||||
F test/date.test 8e9ae588d832c54fa2512b0f9789bea48442ada0736dabee54b377dc1b8d4a87
|
||||
F test/date2.test 7e12ec14aaf4d5e6294b4ba140445b0eca06ea50062a9c3a69c4ee13d0b6f8b1
|
||||
F test/date3.test a1b77abf05c6772fe5ca2337cac1398892f2a41e62bce7e6be0f4a08a0e64ae5
|
||||
F test/dbdata.test 042f49acff3438f940eeba5868d3af080ae64ddf26ae78f80c92bec3ca7d8603
|
||||
@@ -2045,8 +2045,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P 1ac78be54502779236645eac35b962797f2fb98307d059d2aa19658c4fa74cb7
|
||||
R 21bc10e166e48f106bd855a3f05d7452
|
||||
P 06180caff0f5d8aba83b9f7be682ccdd6cb2ffc228b557ee6c1fd00fe5c23e92
|
||||
R 191c2a25e4d73ba45ecc912c47f9a8ca
|
||||
U drh
|
||||
Z 81861e88fff679ab1e007b3943020398
|
||||
Z bc216ff029b87470207499db9cc62288
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
06180caff0f5d8aba83b9f7be682ccdd6cb2ffc228b557ee6c1fd00fe5c23e92
|
||||
7b2fa20e31b8a0314b9ccb97bb556898d552505dbc5943f248df3f86c0f4e008
|
||||
+23
-2
@@ -501,7 +501,7 @@ do_test date-15.3 {
|
||||
do_test date-15.4 {
|
||||
db eval {
|
||||
SELECT a==b FROM (SELECT julianday('txn') AS a,
|
||||
sleeper(), julianday('txn') AS b);
|
||||
sleeper(), julianday('now') AS b);
|
||||
}
|
||||
} {0}
|
||||
|
||||
@@ -534,7 +534,28 @@ do_execsql_test date-15.7 {
|
||||
SELECT count(a), count(DISTINCT a) FROM t15;
|
||||
} {4 3}
|
||||
|
||||
|
||||
do_test date-15.10 {
|
||||
unset -nocomplain x
|
||||
db eval {BEGIN;}
|
||||
db eval {
|
||||
SELECT
|
||||
current_time AS ct1,
|
||||
current_date AS cd1,
|
||||
current_timestamp AS cs1,
|
||||
time() AS ct2,
|
||||
datetime() AS cs2;
|
||||
} x {continue}
|
||||
after 1000
|
||||
db eval {
|
||||
SELECT
|
||||
current_time=$x(ct1),
|
||||
current_date=$x(cd1),
|
||||
current_timestamp=$x(cs1),
|
||||
time()=$x(ct2),
|
||||
datetime()=$x(cs2);
|
||||
}
|
||||
} {1 1 1 0 0}
|
||||
db eval {COMMIT}
|
||||
|
||||
# Tests of extreme values in date/time functions. Run with UBSan or the
|
||||
# equivalent to verify no signed interger overflow warnings.
|
||||
|
||||
Reference in New Issue
Block a user