Update sql_mysql.py

pull/632/head
Mr Chen 5 months ago
parent d4f9f5bcfd
commit 3fd55fd5de
  1. 8
      plugins/data_query/sql_mysql.py

@ -80,7 +80,7 @@ class nosqlMySQL():
mysql_pass = self.sqliteDb(sid, 'config').where('id=?', (1,)).getField('mysql_root')
result['password'] = mysql_pass
rep = r'port\s*=\s*(.*)'
port_re = re.search(rep, mydb_content)
if port_re:
@ -475,6 +475,12 @@ class nosqlMySQLCtr():
if IS_SIGNED == 1:
RESIDUAL_AUTO_INCREMENT = int(2147483647 - AUTO_INCREMENT)
if DATA_TYPE == 'mediumint':
if IS_SIGNED == 0:
RESIDUAL_AUTO_INCREMENT = int(16777215 - AUTO_INCREMENT)
if IS_SIGNED == 1:
RESIDUAL_AUTO_INCREMENT = int(8388607 - AUTO_INCREMENT)
if DATA_TYPE == 'bigint':
if IS_SIGNED == 0:
RESIDUAL_AUTO_INCREMENT = Decimal("18446744073709551615") - Decimal(AUTO_INCREMENT)

Loading…
Cancel
Save