一个内存数据库的源代码这是服务器端还有客户端
源代码在线查看: casts.stable.out.linux
stdout of test 'casts` in directory 'tests/gdkTests` itself: # 14:56:01 > # 14:56:01 > Mtimeout -timeout 60 Mserver "--config=/ufs/boncz/MonetDB/linux/etc/monet.conf" --debug=10 --set "monet_mod_path=/ufs/boncz/MonetDB/linux/lib/MonetDB" --set "gdk_dbfarm=/ufs/boncz/MonetDB/linux/var/MonetDB/dbfarm" --set "sql_logdir=/ufs/boncz/MonetDB/linux/var/MonetDB/log" --set mapi_port=52524 --set sql_port=56156 --set monet_prompt= --trace --dbname=mTests_src_gdk < casts.milM # 14:56:01 > # Monet Database Server V4.3.13 # Copyright (c) 1993-2004, CWI. All rights reserved. # compiled for i686-pc-linux-gnu/32bit; dynamically linked. # casting to int [ 0 ] [ 1 ] [ 32767 ] [ 32768 ] [ 32769 ] [ 2147483647 ] [ 2147483648 ] [ 2147483649 ] [ -2147483647 ] [ -2147483648 ] [ -2147483649 ] # from bit [ 1 ] [ 0 ] # from chr [ 97 ] # from sht [ 1 ] [ 32767 ] # from int [ 1 ] [ 32767 ] [ 32768 ] [ 2147483647 ] [ -2147483647 ] [ nil ] [ nil ] # should this produce nil (overflow)? [ -2147483647 ] # should this produce nil (overflow)? [ 2147483647 ] # from lng [ 1 ] [ 2147483647 ] [ nil ] [ nil ] [ -2147483647 ] [ nil ] [ nil ] # from flt [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 1 ] [ 0 ] [ 0 ] [ 0 ] [ -1 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # from dbl [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 1 ] [ 0 ] [ 0 ] [ 0 ] [ -1 ] [ 2147483647 ] [ nil ] [ nil ] [ -2147483647 ] [ nil ] [ nil ] # from oid [ 2 ] [ 2 ] [ 2147483647 ] [ nil ] [ nil ] # from str [ 0 ] [ 32767 ] [ 2147483647 ] [ nil ] [ nil ] [ -2147483647 ] [ nil ] [ nil ] [ nil ] [ nil ] # to bit # from bit [ true ] [ false ] # from chr [ true ] [ false ] # from sht [ false ] [ true ] [ true ] [ true ] # from int [ false ] [ true ] [ true ] [ true ] # from lng [ false ] [ true ] [ true ] [ true ] # from flt [ false ] [ true ] [ true ] [ true ] [ true ] [ true ] # from dbl [ false ] [ true ] [ true ] [ true ] [ true ] [ true ] # from oid [ false ] [ true ] [ true ] [ true ] [ true ] # from str [ true ] [ false ] [ false ] [ true ] [ nil ] [ nil ] # to sht # from bit [ 1 ] [ 0 ] # from chr [ 97 ] [ 0 ] # from int [ 0 ] [ 32767 ] [ nil ] [ nil ] [ -32767 ] [ nil ] [ nil ] [ nil ] # from lng [ 0 ] [ 32767 ] [ nil ] [ nil ] [ -32767 ] [ nil ] [ nil ] [ nil ] # from flt [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 1 ] [ 0 ] [ 0 ] [ 0 ] [ -1 ] [ 32767 ] [ nil ] [ nil ] [ -32767 ] [ nil ] [ nil ] # from dbl [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 1 ] [ 0 ] [ 0 ] [ 0 ] [ -1 ] [ 32767 ] [ nil ] [ nil ] [ -32767 ] [ nil ] [ nil ] # from oid [ 0 ] [ 1 ] [ 4096 ] [ nil ] [ nil ] # from str [ 0 ] [ 32767 ] [ nil ] [ nil ] [ -32767 ] [ nil ] [ nil ] [ nil ] [ nil ] # to long [ 0 ] [ 1 ] [ 32767 ] [ 32768 ] [ 32769 ] [ 2147483647 ] [ 2147483648 ] [ 2147483649 ] [ -2147483647 ] [ -2147483648 ] [ -2147483649 ] [ 9223372036854775807 ] [ nil ] [ nil ] [ -9223372036854775807 ] [ nil ] [ nil ] # from bit [ 1 ] [ 0 ] # from chr [ 97 ] # from sht [ 1 ] [ 32767 ] # from int [ 1 ] [ 32767 ] [ 32768 ] [ 2147483647 ] [ -2147483647 ] [ nil ] [ nil ] # should this produce nil (overflow)? [ -2147483647 ] # should this produce nil (overflow)? [ 2147483647 ] # from lng # from flt [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 1 ] [ 0 ] [ 0 ] [ 0 ] [ -1 ] [ 2147483648 ] [ 2147483648 ] [ 2147483648 ] [ -2147483648 ] [ -2147483648 ] [ -2147483648 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # from dbl [ 0 ] [ 0 ] [ 0 ] [ 0 ] [ 1 ] [ 0 ] [ 0 ] [ 0 ] [ -1 ] [ 2147483647 ] [ 2147483648 ] [ 2147483649 ] [ -2147483647 ] [ -2147483648 ] [ -2147483649 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # from oid [ 2 ] [ 2 ] [ 2147483647 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # from str [ 0 ] [ 32767 ] [ 2147483647 ] [ 2147483648 ] [ 2147483649 ] [ -2147483647 ] [ -2147483648 ] [ -2147483649 ] [ nil ] [ nil ] [ 9223372036854775807 ] [ nil ] [ nil ] [ -9223372036854775807 ] [ nil ] [ nil ] # to flt # from bit [ 1 ] [ 0 ] # from chr [ 97 ] # from sht [ 1 ] [ 32767 ] # from int [ 1 ] [ 32767 ] [ 32768 ] [ 2.14748365e+09 ] [ -2.14748365e+09 ] [ nil ] [ nil ] # should this produce nil (overflow)? [ -2.14748365e+09 ] # should this produce nil (overflow)? [ 2.14748365e+09 ] # from lng [ 1 ] [ 2.14748365e+09 ] [ 2.14748365e+09 ] [ 2.14748365e+09 ] [ -2.14748365e+09 ] [ -2.14748365e+09 ] [ -2.14748365e+09 ] [ 9.22337204e+18 ] [ nil ] [ nil ] [ -9.22337204e+18 ] [ nil ] [ nil ] # from dbl [ 0 ] [ 0.100000001 ] [ 0.5 ] [ 0.899999976 ] [ 1 ] [ -0.100000001 ] [ -0.5 ] [ -0.899999976 ] [ -1 ] [ 2.14748365e+09 ] [ 2.14748365e+09 ] [ 2.14748365e+09 ] [ -2.14748365e+09 ] [ -2.14748365e+09 ] [ -2.14748365e+09 ] # from oid [ 2 ] [ 2 ] [ 2.14748365e+09 ] [ nil ] [ nil ] # from str [ 0 ] [ 32767 ] [ 2.14748365e+09 ] [ 2.14748365e+09 ] [ 2.14748365e+09 ] [ -2.14748365e+09 ] [ -2.14748365e+09 ] [ -2.14748365e+09 ] [ 0 ] [ 0.100000001 ] [ 1 ] [ 1 ] [ 10 ] [ 1e+10 ] [ 1e+10 ] [ 1.00000001e-10 ] [ 1 ] [ 10 ] [ 1e+10 ] [ 1e+10 ] [ 1.00000001e-10 ] [ 1 ] [ 10 ] [ 1e+10 ] [ 1e+10 ] [ 1.00000001e-10 ] [ -0 ] [ -0.100000001 ] [ -1 ] [ -1 ] [ -10 ] [ -1e+10 ] [ -1e+10 ] [ -1.00000001e-10 ] [ -1 ] [ -10 ] [ -1e+10 ] [ -1e+10 ] [ -1.00000001e-10 ] [ -1 ] [ -10 ] [ -1e+10 ] [ -1e+10 ] [ -1.00000001e-10 ] [ 1 ] [ 10 ] [ 1e+10 ] [ 1e+10 ] [ 1.00000001e-10 ] [ 1 ] [ 10 ] [ 1e+10 ] [ 1e+10 ] [ 1.00000001e-10 ] [ 1 ] [ 10 ] [ 1e+10 ] [ 1e+10 ] [ 1.00000001e-10 ] [ -1 ] [ -10 ] [ -1e+10 ] [ -1e+10 ] [ -1.00000001e-10 ] [ -1 ] [ -10 ] [ -1e+10 ] [ -1e+10 ] [ -1.00000001e-10 ] [ -1 ] [ -10 ] [ -1e+10 ] [ -1e+10 ] [ -1.00000001e-10 ] # flt range is -3.402823466E+38F to 3.402823466E+38F which is # -3.4028234663852886e+38 to 3.4028234663852886e+38 in double # precission [ 3.40282347e+38 ] [ 3.40282347e+38 ] [ 3.40282347e+38 ] [ nil ] [ nil ] [ 3.40282347e+38 ] [ 3.40282347e+38 ] [ 3.40282347e+38 ] [ 3.40282347e+38 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # to dbl # from bit [ 1 ] [ 0 ] # from chr [ 97 ] # from sht [ 1 ] [ 32767 ] # from int [ 1 ] [ 32767 ] [ 32768 ] [ 2147483647 ] [ -2147483647 ] [ nil ] [ nil ] # should this produce nil (overflow)? [ -2147483647 ] # should this produce nil (overflow)? [ 2147483647 ] # from lng [ 1 ] [ 2147483647 ] [ 2147483648 ] [ 2147483649 ] [ -2147483647 ] [ -2147483648 ] [ -2147483649 ] [ 9.2233720368547758e+18 ] [ nil ] [ nil ] [ -9.2233720368547758e+18 ] [ nil ] [ nil ] # from flt [ 0 ] [ 0.10000000149011612 ] [ 0.5 ] [ 0.89999997615814209 ] [ 1 ] [ -0.10000000149011612 ] [ -0.5 ] [ -0.89999997615814209 ] [ -1 ] [ 2147483648 ] [ 2147483648 ] [ 2147483648 ] [ -2147483648 ] [ -2147483648 ] [ -2147483648 ] # from oid [ 2 ] [ 2 ] [ 2147483647 ] [ nil ] [ nil ] # from str [ 0 ] [ 32767 ] [ 2147483647 ] [ 2147483648 ] [ 2147483649 ] [ -2147483647 ] [ -2147483648 ] [ -2147483649 ] [ 0 ] [ 0.10000000000000001 ] [ 1 ] [ 1 ] [ 10 ] [ 10000000000 ] [ 10000000000 ] [ 1e-10 ] [ 1 ] [ 10 ] [ 10000000000 ] [ 10000000000 ] [ 1e-10 ] [ 1 ] [ 10 ] [ 10000000000 ] [ 10000000000 ] [ 1e-10 ] [ -0 ] [ -0.10000000000000001 ] [ -1 ] [ -1 ] [ -10 ] [ -10000000000 ] [ -10000000000 ] [ -1e-10 ] [ -1 ] [ -10 ] [ -10000000000 ] [ -10000000000 ] [ -1e-10 ] [ -1 ] [ -10 ] [ -10000000000 ] [ -10000000000 ] [ -1e-10 ] [ 1 ] [ 10 ] [ 10000000000 ] [ 10000000000 ] [ 1e-10 ] [ 1 ] [ 10 ] [ 10000000000 ] [ 10000000000 ] [ 1e-10 ] [ 1 ] [ 10 ] [ 10000000000 ] [ 10000000000 ] [ 1e-10 ] [ -1 ] [ -10 ] [ -10000000000 ] [ -10000000000 ] [ -1e-10 ] [ -1 ] [ -10 ] [ -10000000000 ] [ -10000000000 ] [ -1e-10 ] [ -1 ] [ -10 ] [ -10000000000 ] [ -10000000000 ] [ -1e-10 ] [ 3.4028234660000002e+38 ] [ 3.4028234670000002e+38 ] [ -3.4028234660000002e+38 ] [ -3.4028234670000002e+38 ] [ 3.4028234660000002e+38 ] [ 3.4028234670000002e+38 ] [ 3.4028234660000002e+38 ] [ 3.4028234660000002e+38 ] [ -3.4028234660000002e+38 ] [ -3.4028234670000002e+38 ] [ -3.4028234660000002e+38 ] [ -3.4028234660000002e+38 ] # dbl range is -1.7976931348623157E+308 to 1.7976931348623157E+308. [ 1.7976931348623157e+308 ] [ 1.7976931348623157e+308 ] [ nil ] [ nil ] [ 1.7976931348623157e+308 ] [ 1.7976931348623157e+308 ] [ 1.7976931348623157e+308 ] [ 1.7976931348623157e+308 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # to oid # from bit [ 1@0 ] [ 0@0 ] # from chr [ 97@0 ] # from sht [ 1@0 ] [ 32767@0 ] # from int [ 1@0 ] [ 32767@0 ] [ 32768@0 ] [ 2147483647@0 ] [ nil ] [ nil ] [ nil ] # should this produce nil (overflow)? [ nil ] # should this produce nil (overflow)? [ 2147483647@0 ] # from lng [ 1@0 ] [ 2147483647@0 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # from flt [ 0@0 ] [ 0@0 ] [ 0@0 ] [ 0@0 ] [ 1@0 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # from dbl [ 0@0 ] [ 0@0 ] [ 0@0 ] [ 0@0 ] [ 1@0 ] [ nil ] [ nil ] [ nil ] [ nil ] [ 2147483647@0 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # from oid [ 2@0 ] [ 2@0 ] [ 2147483647@0 ] [ nil ] [ nil ] # from str [ 0@0 ] [ 32767@0 ] [ 2147483647@0 ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] [ nil ] # to str # from bit [ "true" ] [ "false" ] # from chr [ "a" ] # from sht [ "1" ] [ "32767" ] # from int [ "1" ] [ "32767" ] [ "32768" ] [ "2147483647" ] [ "-2147483647" ] [ nil ] [ nil ] # should this produce nil (overflow)? [ "-2147483647" ] # should this produce nil (overflow)? [ "2147483647" ] # from lng [ "1" ] [ "2147483647" ] [ "2147483648" ] [ "2147483649" ] [ "-2147483647" ] [ "-2147483648" ] [ "-2147483649" ] # from flt [ "0" ] [ "0.100000001" ] [ "0.5" ] [ "0.899999976" ] [ "1" ] [ "-0.100000001" ] [ "-0.5" ] [ "-0.899999976" ] [ "-1" ] [ "2.14748365e+09" ] [ "2.14748365e+09" ] [ "2.14748365e+09" ] [ "-2.14748365e+09" ] [ "-2.14748365e+09" ] [ "-2.14748365e+09" ] # from dbl [ "0" ] [ "0.10000000000000001" ] [ "0.5" ] [ "0.90000000000000002" ] [ "1" ] [ "-0.10000000000000001" ] [ "-0.5" ] [ "-0.90000000000000002" ] [ "-1" ] [ "2147483647" ] [ "2147483648" ] [ "2147483649" ] [ "-2147483647" ] [ "-2147483648" ] [ "-2147483649" ] # from oid [ "2@0" ] [ "2@0" ] [ "2147483647@0" ] [ nil ] [ nil ] # from str [ "0" ] [ "32767" ] [ "2147483647" ] [ "2147483648" ] [ "2147483649" ] [ "-2147483647" ] [ "-2147483648" ] [ "-2147483649" ] [ "" ] [ "random string" ] # 14:56:01 > # 14:56:01 > Done. # 14:56:01 >