X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=tests%2Ftest-basic.lisp;fp=tests%2Ftest-basic.lisp;h=4ccc02d97b11acfc4223412c1ffc1d59d43b5433;hp=24129e63adc189fc1044c554117134d9f70e8fb0;hb=8997e2789a6677f5d5c78e0b630090824be30307;hpb=5bb8544ca8a58d10b57f751bad2c9abf4d7a13c8 diff --git a/tests/test-basic.lisp b/tests/test-basic.lisp index 24129e6..4ccc02d 100644 --- a/tests/test-basic.lisp +++ b/tests/test-basic.lisp @@ -226,6 +226,22 @@ "mismatch on randomized bigtext(~a) inserted: ~s returned: ~s" len str a)) )))) nil) + + (deftest :basic/reallybigintegers/1 + (with-dataset *ds-reallybigintegers* + (let ((a (1- (expt 2 64))) + (b (- (expt 2 64) 2)) + (c (expt 2 63)) + (d (expt 2 62))) + (query + (format nil "INSERT INTO testreallybigintegers + VALUES (~A, ~A, ~A, ~A)" + a b c d)) + (let ((results + (query + (format nil "SELECT * FROM testreallybigintegers")))) + (equal `(,a ,b ,c ,d) (car results))))) + t) )) @@ -285,3 +301,14 @@ (def-dataset *ds-bigtext* (:setup "CREATE TABLE testbigtext(a varchar(7500))") (:cleanup "DROP TABLE testbigtext")) + +(def-dataset *ds-reallybigintegers* + (:setup (lambda () + (ignore-errors + (clsql:execute-command "DROP TABLE testreallybigintegers")) + (clsql:execute-command + "CREATE TABLE testreallybigintegers( a BIGINT UNSIGNED, + b BIGINT UNSIGNED, + c BIGINT UNSIGNED, + d BIGINT UNSIGNED )"))) + (:cleanup "DROP TABLE testreallybigintegers"))