Update sql_mysql.py

This commit is contained in:
Mr Chen
2024-12-09 20:11:02 +08:00
parent d4f9f5bcfd
commit 3fd55fd5de
+7 -1
View File
@@ -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)