Edit: /opt/dedrads/__pycache__/innodb_converter.cpython-313.pyc (14347B)
}j$ S r SSKJr SSKrSSKrSSKJr SSKrSSKr\R " 5 S:w a \R " S5 \R " S5 r\R \R 5 \R " \R 5 r\R \R$ 5 \R' \5 \R( " S5 r\R \R 5 \R' \5 SS\4S jjrS
\4S jr\" 5 rS
\4S jrS
\S
\\S- \\ S- 4 4S jrS
\S\S
\\S- \S- 4 4S jr S
\S\S
\S- 4S jr!S
\\\4 4S jr"S\S
\4S jr#S\S
\4S jr$S r%\&S:X a \%" 5 gg)z$Converts all MyISAM tables to InnoDB )PathN)ArgumentParserzThis script must be run as rootzinnodb_convert.pyz/var/log/innodb_convert.logcheckc 4 U ( a gSU S3n[ U5 R 5 =( d UnUR 5 S:w aT SU S3n[ U5 R 5 =( d UnUR 5 S:w a [ R " S5 ggg)zIConfirms that backups have been taken, with configurable default (Y or N)NzHave you taken backups? (y/z) yz#Do you wish to continue anyway? (y/z
Exiting...)inputstriplowersysexit)r defaultpromptanswerprompt2answer2s /opt/dedrads/innodb_converter.pyconfirm_backupsr s *7)2
6F
6]
"
-gF
||~7yC.&&(3G==?c!HH\" " returnc @ [ S5 n U R 5 ( d+ [ R S5 [ R
" S5 0 n[
U SS9 nU Hz nUR S5 ( a UR S5 n0 X' M0 UR 5 R S5 u pVUR S S
5 R SS
5 nXaW U' M| SSS5 S
US S US S S[ R R S.nU$ ! , ( d f N<= f)z/Returns a dictionary of the MySQL configurationz
/root/.my.cnfz#Error: /root/.my.cnf does not exist utf-8encoding[z[]
=' "N localhostclientuserpasswordutf8mb4)hostr" r# charsetcursorclass)r existsloggererrorr r open
startswithr splitreplacepymysqlcursors
DictCursor) mysql_cnfmy_cnf_datafilelinesectionkeyvaluedb_config_dicts r
get_db_configr: ( s _%I:;K
i' *dDs##**V,')$!ZZ\//4
c2.66sB?,1G$S)
+ H%f-)*511N #
+ *s
BD
Dc / n [ R " S0 [ D6 nUR 5 nUR S5 UR 5 n U Vs/ s H o3S PM n nU sSSS5 sSSS5 $ s snf ! , ( d f O= f SSS5 g! , ( d f g= f! [ R R a% nSU 3n[ R " U5 SnAgSnAff = f)zReturns a list of all databaseszSHOW DATABASESDatabaseNError: )
r/ connect db_configcursorexecutefetchallerr
MySQLErrorr r ) databases
connectionrA xer* s r list_databasesrJ H s I
__
)y
)Z""$/0"OO- 4=>Iqz]I > %$ *
) ? %$$ *
)
) ;;!! !
sc B* B&A>A9#A>& B/ B* 9A>>
B BB*
B'#B* 'B* *C-C((C-databasec / n [ R " SSU 0[ D6 nUR 5 nUR S5 UR 5 nU Vs/ s H
oDSU - PM nnSU4sSSS5 sSSS5 $ s snf ! , ( d f O= f SSS5 g! , ( d f g= f! [ R R a+ nSU SU 3n[ R U5 US4s SnA$ SnAff = f)z*Returns a list of all tables in a databaserK zSHOW TABLES
Tables_in_N Error on : r> )
r/ r? r@ rA rB rC rD rE r) r* )rK tablesrG rA rH rI r* s r list_tablesrQ W s
F
__
DEfL834fEV| %$ =
< F %$$ =
<
< ;;!! H:Rs+Ud{si B1 B &BB (B- B 6 B1 B
B B B1
B.*B1 .B1 1C: C5/C:5C:tablec [ R " SSU 0[ D6 nUR 5 nSnUR SU45 UR 5 nXES 4sSSS5 sSSS5 $ ! , ( d f O= f SSS5 g! , ( d f g= f! [ R R a. nSU SU SU 3n[ R U5 US4s SnA$ SnAff = f) zReturns the engine of a tablerK NzSHOW TABLE STATUS LIKE %sEnginerN .rO r> )
r/ r? r@ rA rB fetchonerD rE r) r* )rK rR rG rA r* table_statusrI s r check_enginerX g s
__