Skip to content

Commit e5e2771

Browse files
committed
Update mysql.lua
3处位操作没改
1 parent 8645061 commit e5e2771

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lualib/mysql.lua

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,7 @@ local function _mysql_login(self,user,password,database)
461461
local more_capabilities
462462
more_capabilities, pos = _get_byte2(packet, pos)
463463

464-
self._server_capabilities = bor(self._server_capabilities,
465-
lshift(more_capabilities, 16))
466-
464+
self._server_capabilities = self._server_capabilities|more_capabilities<<16
467465

468466
local len = 21 - 8 - 1
469467

@@ -524,7 +522,7 @@ local function read_result(self, sock)
524522

525523
if typ == 'OK' then
526524
local res = _parse_ok_packet(packet)
527-
if res and band(res.server_status, SERVER_MORE_RESULTS_EXISTS) ~= 0 then
525+
if res and res.server_status&SERVER_MORE_RESULTS_EXISTS ~= 0 then
528526
return res, "again"
529527
end
530528
return res
@@ -577,7 +575,7 @@ local function read_result(self, sock)
577575
if typ == 'EOF' then
578576
local warning_count, status_flags = _parse_eof_packet(packet)
579577

580-
if band(status_flags, SERVER_MORE_RESULTS_EXISTS) ~= 0 then
578+
if status_flags&SERVER_MORE_RESULTS_EXISTS ~= 0 then
581579
return rows, "again"
582580
end
583581

0 commit comments

Comments
 (0)