Skip to content

Commit

Permalink
ready for next release
Browse files Browse the repository at this point in the history
  • Loading branch information
hyee committed Feb 1, 2022
1 parent c6cc615 commit 3ae19b4
Show file tree
Hide file tree
Showing 15 changed files with 1,451 additions and 1,031 deletions.
11 changes: 7 additions & 4 deletions dbcli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ if [[ "$_java" ]]; then
fi
fi

chmod 777 ./jre_$os/bin/* &>/dev/null

if [[ $found < 2 ]]; then
if [[ -x ./jre_$os/bin/java ]]; then
if [[ -f ./jre_$os/bin/unpack200 ]]; then
_java=./jre_$os/bin/java
ver="52"
else
Expand Down Expand Up @@ -102,8 +102,11 @@ if [[ "$os" = mac* ]]; then
fi
# unpack jar files for the first use
unpack="$JAVA_ROOT/bin/unpack200"
if [[ -x ./jre_$os/bin/unpack200 ]]; then
if [[ -f ./jre_$os/bin/unpack200 ]]; then
unpack=./jre_$os/bin/unpack200
if [ ! -x "$unpack" ]; then
chmod +x ./jre_$os/bin/* &>/dev/null
fi
elif [ ! -x "$unpack" ]; then
echo "Cannot find unpack200 executable, exit."
popd
Expand All @@ -118,6 +121,6 @@ wait

trap '' TSTP &>/dev/null

chmod 777 ./lib/$os/luajit &>/dev/null
chmod +x ./lib/$os/luajit &>/dev/null
exec -a "dbcli" ./lib/$os/luajit ./lib/bootstrap.lua "$_java" "$ver" "$@"
popd
Binary file modified lib/dbcli.jar
Binary file not shown.
Binary file modified lib/jnlua.jar
Binary file not shown.
Binary file modified lib/linux/libjnlua5.1.so
Binary file not shown.
Binary file modified lib/mac-arm/libjnlua5.1.so
Binary file not shown.
Binary file modified lib/mac/javavm.so
Binary file not shown.
Binary file modified lib/mac/libjnlua5.1.so
Binary file not shown.
8 changes: 7 additions & 1 deletion lib/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,13 @@ if not table.unpack then table.unpack=function(tab) return unpack(tab) end end
local system=java.system
local clocker=system.currentTimeMillis
function os.timer()
return clocker()/1000
local uv=env.luv
if uv and uv.now then
uv.update_time()
return uv.now()
else
return clocker()/1000
end
end

function string.from(v)
Expand Down
Binary file modified lib/x64/javavm.dll
Binary file not shown.
Binary file modified lib/x64/jnlua5.1.dll
Binary file not shown.
Binary file modified lib/x86/javavm.dll
Binary file not shown.
Binary file modified lib/x86/jnlua5.1.dll
Binary file not shown.
7 changes: 6 additions & 1 deletion lua/db_core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,12 @@ function db_core:connect(attrs,data_source)
env.checkerr(err,tostring(res))

self.conn=res
env.checkerr(self.conn,"Unable to connect to db!")

if type(res)~="userdata" or not self:is_connect() then
self.conn=nil
env.raise("Unable to connect to database, connection !")
end

self.autocommit=cfg.get("AUTOCOMMIT")
self.conn:setAutoCommit(self.autocommit=="on" and true or false)
if event then
Expand Down
Loading

0 comments on commit 3ae19b4

Please sign in to comment.