mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 03:49:25 +08:00
Update sql_mysql.py
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user