DonatShell
Server IP : 180.180.241.3  /  Your IP : 216.73.216.252
Web Server : Microsoft-IIS/7.5
System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
User : IUSR ( 0)
PHP Version : 5.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files (x86)/MySQL/MySQL Workbench 6.1 CE/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/Program Files (x86)/MySQL/MySQL Workbench 6.1 CE/modules/migration_data_transfer.pyc
ó
,¢2Sc@s–ddlZddlZddlZddlZddlmZmZddlmZddlm	Z	defd„ƒYZ
defd„ƒYZdS(	iÿÿÿÿN(t
WizardPagetWizardProgressPage(tDataMigrator(trequest_passwordt
SetupMainViewcBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs’tjtjjƒtjƒ}|j|ƒ|jt||dƒjƒƒ|j	ƒrŽt||dƒj
|jƒƒt||dt
ƒndS(Nt_entryt_check_duplicate(tmformstnewFileChoosertFormt	main_formtSaveFilet	set_titletset_pathtgetattrtget_string_valuet	run_modalt	set_valuetget_pathtsetattrtFalse(tselftoptionttitletform((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyt
_browse_filess
  cs¾tjƒ}|j|ƒ|j|ttƒtjtƒ}|jdƒtjtƒ}|jdƒ|jtj|ƒttƒtj	ƒ}	|	j
ˆˆ‡fd†ƒ|j|	ttƒ|j||d„ƒtjƒ}
|
jdƒ|
jˆ|‡fd†ƒ|j|
ttƒ|j|ttƒtjdƒ}|j
tjƒ|j|ttƒ|jtƒ|j|ttƒtˆˆdtƒtˆˆd|ƒtˆˆd	|	ƒdS(
Nicst|ˆdtƒS(NR(RtTrue(RR(tname(sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyt<lambda>-scSs|j|jƒƒS(N(tset_enabledt
get_active(tboxtcheck((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR/ss	Browse...csˆj||ƒS(N(R(RR(R(sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR2ssZYou should edit this file to add the source and target server passwords before running it.Rt	_checkboxR(RtnewCheckBoxtset_texttaddRRtnewBoxtset_spacingtnewLabeltnewTextEntrytadd_changed_callbacktadd_clicked_callbackt	newButtont	set_styletSmallHelpTextStyleRR(RRRtcaptiontpath_captiontbrowser_captionR tvboxtfile_boxt
file_entrytbuttontlabel((RRsVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyt_add_script_checkbox_option#s2




cCsYtj||dƒ|jj|ddƒtjdƒ}|jj|tt	ƒtj
tjƒ}|jdƒ|jj|tt	ƒtj
tƒ}|j|ƒ|jdƒtjƒ|_|jjdƒ|j|jtt	ƒ|jtjdƒtt	ƒtjdkr(|j|d	d
ddƒn|j|d	d
ddƒtj
tjƒ}|jdƒ|jj|tt	ƒtj
tƒ|_|jjdƒ|jjdƒ|j|jƒtjƒ|_|jjdƒ|jj|jtt	ƒtj
t	ƒ}|jdƒ|jtjdƒtt	ƒtjƒ|_|jjdƒ|jjddƒ|j|jtt	ƒtjddƒ}|jtjƒ|j|t	t	ƒ|jj|tt	ƒtjƒ|_|jjdƒ|jj|jtt	ƒtj
tjƒ|_|jjdƒ|jj|jt	t	ƒtj
tƒ}|jdƒ|jdƒtjdƒ}|jtjƒ|j|tt	ƒtj tj!ƒ|_"|j"j#tj$ddtƒ|j"j#tj%ddt	ƒ|j"j#tj%dd tƒ|j"j&ƒ|j|j"t	t	ƒ|jj|ƒ|j"j'|j(ƒt|_)|jj*tƒdS(!NsData Transfer Setupt
DataMigrationssSelect options for the copy of the migrated schema tables in the target
MySQL server and click [Next >] to execute.s	Data Copyis)Online copy of table data to target RDBMSttwin32tcopy_scripts4Create a batch file to copy the data at another timesBatch File:sSave Ass=Create a shell script to copy the data from outside WorkbenchsShell Script File:tOptionsis@Truncate target tables (ie. delete contents) before copying datasWorker taskst2i2iÿÿÿÿs@Number of tasks to use for data transfer. Each task will open a
sPconnection to both source and target RDBMSs to copy table rows.
Default value 2.s"Enable debug output for table copysTables to CopysòYou can limit the number of rows to be copied for certain tables. Tables that are referenced by
foreign keys from other tables cannot be limited, unless data copy from the referencing tables is also disabled.
All tables are copied by default.tTableiÈs
Limit CopyidsReferencing Tablesiô(+Rt__init__tmaintadd_wizard_pageRR'tcontentR$RRtnewPaneltTitledBoxPanelRR%tset_paddingR"t_copy_dbR#tsystplatformR6toptions_boxR&t_truncate_dbR(t
_worker_countRtset_sizeR,R-t_debug_copyt_advanced_paneltnewTreeNodeViewtTreeDefaultt_treet
add_columntIconStringColumnTypetStringColumnTypetend_columnstset_cell_edited_callbackt_cell_editedt
_advbox_showntshow(RR?R5tpanelRthboxtl((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR>@s|




	


	
	cCs;|jjƒ}y+t|ƒ}|dkr9tdƒ‚nWn.tk
rjtjjdddddƒdSX||jjj	j
d<|jjƒr²|j
jƒ|jjj	j
d<n1|jjj	j
jdƒrã|jjj	j
d=n|jjƒrødnd	|jjj	j
d
<|jjƒr#dnd	|jjj	j
d<|jjƒrNdnd	|jjj	j
d<x´|jjj	j
jƒD]š}|jd
ƒr¨|jjj	j
|=n|jdƒrÍ|jjj	j
|=n|jdƒrò|jjj	j
|=n|jdƒr}|jjj	j
|=q}q}Wg}x¾t|jjƒƒD]§}|jj|ƒ}|j|jƒ}|jdƒ}|s‡|j|ƒq7y<t|ƒ}|d	krÂ||jjj	j
d|j<nWq7tjd|ƒq7Xq7W||jjj	j
d<|jjƒs|jjƒr#tj |ƒS|jj!dƒdSdS(Nis	Bad values
Invalid Values3Worker thread count must be a number larger than 0.tOKR8tworkerCounttGenerateCopyScriptitLiveDataCopytDebugTableCopytTruncateTargetTabless	:rangeKeys:rangeStarts	:rangeEnds	:rowCounts%s:rowCounts,Invalid value in Migration DataCopy tree: %st	tableListi("RJRtintt	ExceptionRt	Utilitiest
show_errorR?tplantstatetdataBulkTransferParamstcopy_script_checkboxRtcopy_script_entrythas_keyRERLRItkeystendswithtrangeRPtcounttnode_at_rowt
_tables_by_idtget_tagt
get_stringtappendt__id__tgrtt	log_errorRtgo_nexttgo_next_page(RtiRptkeyttables_to_copytrowtnttable((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyRyœsV
"+++$
cCsû|rç|jjjjjdtƒr7|jjtƒn|jjtƒ|j	ƒx3|jjjj
jƒD]}|jjjj
|=qjWtj
dkr²tjjtjƒd}ntjjtjƒd}|jj|ƒt|_ntj||ƒdS(Nt
CreateInDBR9s\copy_migrated_tables.cmds/copy_migrated_tables.sh(R?RgRhtobjectCreationParamstgetRREt
set_activeRtrefresh_table_listRiRmRFRGRRetget_special_foldertDesktopRkRtcopy_script_check_duplicateRtpage_activated(Rt	advancingtktfilename((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR‰ãs
c

Cs5|jjƒ|jjjj}i|_i|_x|jD]…}x||j	D]q}||j|j
<xX|jD]M}|jrk|jj
|jj
gƒ}|j|ƒ||j|jj
<qkqkWqKWq;Wt|jƒdk}xU|jD]J}xA|j	D]6}|jjƒ}|jddƒ|rA|jdd|j|jfƒn|jd|jƒ|jrp|jddƒn|jddƒ|jj
|j
gƒ}|rä|jddjtg|D]}	|	jjd	|	j^q·ƒƒƒn5|jddjtg|D]}	|	j^qýƒƒƒ|j|j
ƒqóWqãWdS(
Niisdb.Table.16x16.pngs%s.%st0R8is, t.(RPtclearR?RgtmigrationTargettcatalogRrt_table_referencestschematattablesRvtforeignKeystreferencedTableRƒRutlentadd_nodet
set_icon_patht
set_stringRtcommentedOuttjointsettownertset_tag(
Rttarget_catalogtschemaR€tfkR[tprepend_schematnodetrefsttbl((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR…ús8
			
"#	F5c
Cs|dkrd}|rwy+t|ƒ}|dkrBtdƒ‚nWqwtk
rstjjdddddƒdSXn|dk	r|jj|jƒgƒ}d}x^|t	t
|ƒƒkrt	t
|ƒƒ}x-|D]%}|j|jj|jgƒƒqØWq§W|rötjj
dd	|jdƒg|D]}|j^q-fd
dddƒ}|tjkridSgt
|ƒD]}|j^qv}	xh|D]]}
xTt|jjƒƒD]=}|jj|ƒ}|jƒ|	kr®|jdd
ƒq®q®Wq’Wn|jd|ƒqndS(NiisCan't be negatives
Invalid ValuesfRow limit must be an integer value larger than or equal to 0. To copy all rows, leave the value blank.R\R8sLimit Table Copys5Table %s is directly or indirectly referenced by %s.
sdLimiting the number of rows to be copied will require also disabling copy of the referencing tables.sDisable Copy of ReferencestCancelR(tNoneRct
ValueErrorRReRfR’RƒRsR—RtextendRvtshow_warningRtRtResultCancelRoRPRpRqRš(
RR¤tcolumntvalueRpR¥tcur_sizetrtresultttables_to_disableR€R~R((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyRVs>

',"
(	t__name__t
__module__RR6R>RyR‰R…RV(((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyRs			\	G		$tTransferMainViewcBsteZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
RS(cCsŽtj||ddtƒ|jj|ddƒ|j|jdƒ|j|jdƒ|_|j	|j
dƒ|_|j	|jdƒ|_
dS(NsBulk Data Transfertuse_private_message_handlingR7s!Prepare information for data copys!Create shell script for data copys Determine number of rows to copysCopy data to target RDBMS(RR>RR?R@tadd_taskt
_prepare_copyt_create_copy_scriptt_copy_script_tasktadd_threaded_taskt_count_rowst_migrate_task1t
_migrate_datat_migrate_task2(RR?((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR>GscCs1|r|jjjj}|jddƒ}|jj|dkƒ|jdtƒsd|jdtƒr‡|j	jt
ƒ|jjt
ƒn |j	jtƒ|jjtƒt|_i|_
|jdtƒr·|jjjj}|dkrt|jjjjƒ}n|jjjj}|dkr|jjjjj|jjjjjkr|jjjjjd|jjjjjdkrŠ|}qŠqn|dkrÃt|jjjjƒ}qÃnd}d}t||jjjj|jjjj||jjjj|ƒ|_|jjj|j_ntj||ƒdS(NR^R_tGenerateDumpScripttuserName(R?RgRhRiRƒR¨RºRRR½RR¿t_migrating_datat_progress_per_tabletmigrationSourcetpasswordRt
connectionRthostIdentifiertparameterValuesRt_transferertwbcopytables_pathtcopytable_pathRR‰(RRŠtoptionsR:tsource_passwordttarget_password((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR‰Rs:$		*2cCs|jtƒtj|ƒdS(N(tresetRRtgo_back(R((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyRÐxs
cCs
tj|ƒS(N(Rt
update_status(R((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyRÑ}scCs¢|jjjj}|jjjjd}|jjjjjjj	}|jjjj
ƒ}|jjjj
ƒ}i|_x%|D]}d}xZ|jD]O}|j|jjkr“x-|jD]"}	|	j|jkr¸|	}Pq¸q¸WPq“q“W|s|jd|j|jfƒq}n|rn|j|jjjƒ}
|jrB|j}q•|j|jjƒd|j|jƒ}n'|j|jjƒ}
|j|jƒ}|j|jjƒ}|j|jƒ}
i|d6|
d6|d6|d6|
d6|d	6|j|
d|<g}xt|jD]i}|jjd
|jdƒ}|r[|j|jd|j|jƒƒƒq|j|j|jƒƒqWdj|ƒ|j|
d|d
<q}WdS(NRbs0Source table for %s (%s) not found, skipping...
RŽR€t
source_schematsource_tablet
target_schemattarget_tablettarget_table_objectscolumnTypeCastExpression:%st?s, tselect_expression(R?RgRÄR‘RhRiRÆtdriverRžtdoesSupportCatalogst	module_dbRt_working_setR¨R“RtoldNameR”t
send_errortquoteIdentifiertcolumnst
customDataRƒRutreplaceRœ(Rtsource_catalogR”thas_catalogstsource_db_modulettarget_db_moduleR€tstabletsschematttschema_namet
table_namettarg_schema_namettarg_table_nameRØR­tcast((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR¸sL	
	,
(c
	Csx|jjjjd}|jjjjd}|jjjjd}|jjjjd}t|dƒ}tjdkr‚d„}n&tj|dƒd	„}|j	d
ƒ|j	|dƒƒ|j	|dƒƒ|j	|d
ƒƒ|j	|dƒƒ|j	|dƒƒ|j	|d|jjj
jj|jjj
jj
jjfƒƒ|j	|d|jjjjjƒƒ|j	dƒtjdkrÍ|j	dƒ|j	dƒ|j	dƒ|j	dƒ|j	dƒ|j	d|ƒ|j	dƒ|j	dƒ|j	dƒ|j	|rdnddƒ|j	dƒ|j	|r?dnddƒ|j	dƒ|j	dƒd }|j	d!|ƒ|j	d"|ƒx¨|jjƒD]—}g}	|	j|d#ƒ|	j|d$ƒ|	j|d%ƒ|	j|d&ƒ|	j|d'jd(d)ƒƒd*d+j|	ƒ|f}
|j	|
dƒqœW|j	dƒ|j	|jjjƒx(|jjƒD]}|j	d,|ƒqjW|j	d-ƒ|j	d.ƒ|j	dƒ|j	d/ƒ|j	d0|ƒn|j	d1ƒ|j	d2ƒ|j	d3ƒ|j	d4ƒ|j	d5|ƒ|j	d6ƒ|j	dƒ|j	d7ƒ|j	|rKdnd8d9ƒ|j	d:ƒ|j	|rudnd8d;ƒ|j	dƒ|j	|jjjƒx(|jjƒD]}|j	d,|ƒq³W|j	d<ƒ|j	d=ƒxa|jjƒD]P}d>|d#|d$|d%|d&|d'jd(d(ƒf}|j	d?|ƒqøW|j	dƒ|jƒ|jd@|ƒdS(ANR^R`RaR]sw+R9cSsd|dS(NsREM s
((ts((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pytcmtÁsiÀcSsd|dS(Ns# s
((Rï((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyRðÅss
#!/bin/sh
s Workbench Table Data copy scriptR8s=Execute this to copy table data from a source RDBMS to MySQL.sUEdit the options below to customize it. You will need to provide passwords, at least.sSource DB: %s (%s)s
Target DB: %ss

s
@ECHO OFF
s#REM Source and target DB passwords
sset arg_source_password=
sset arg_target_password=
sÄ
IF [%arg_source_password%] == [] (
    IF [%arg_target_password%] == [] (
        ECHO WARNING: Both source and target RDBMSes passwords are empty. You should edit this file to set them.
    )
)
sset arg_worker_count=%d
s<REM Uncomment the following options according to your needs
s
s:REM Whether target tables should be truncated before copy
sREM s*set arg_truncate_target=--truncate-target
sREM Enable debugging output
s(set arg_debug_output=--log-level=debug3
s;REM Creation of file with table definitions for copytable

s "%TMP%\wb_tables_to_migrate.txt"sset table_file=%s
sTYPE NUL > %s
RÒRÓRÔRÕRØt's\'s
ECHO %s >> %ss	s %ssp --source-password="%arg_source_password%" --target-password="%arg_target_password%" --table-file="%table_file%"sK --thread-count=%arg_worker_count% %arg_truncate_target% %arg_debug_output%s0REM Removes the file with the table definitions
sDEL %s
s!# Source and target DB passwords
sarg_source_password=
sarg_target_password=
sº
if [ -z "$arg_source_password" ] && [ -z "$arg_target_password" ] ; then
    echo WARNING: Both source and target RDBMSes passwords are empty. You should edit this file to set them.
fi
sarg_worker_count=%d
s:# Uncomment the following options according to your needs
s8# Whether target tables should be truncated before copy
s# s&arg_truncate_target=--truncate-target
s# Enable debugging output
s$arg_debug_output=--log-level=debug3
sR --source-password="$arg_source_password" --target-password="$arg_target_password"sH --thread-count=$arg_worker_count $arg_truncate_target $arg_debug_outputs --table '%s' '%s' '%s' '%s' '%s't sTable copy script written to %s(R?RgRhRitopenRFRGtostchmodtwriteRÄRÆRÇRÙRžR.RRÜtvaluesRuRâRœRÊRÉthelper_basic_arglisttcloset	send_info(
Rtpathtdebug_table_copyttruncate_target_tablestworker_counttfRðRŒR€tfieldstlinetargtopt((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR¹¹s 	
#&

























9

cCsŽ|jdƒ|jj|jƒ}|jd|t|jƒfƒxE|jjƒD]4}|jd|d|d|jddƒfƒqRWdS(Ns$Counting number of rows in tables...s-%i total rows in %i tables need to be copied:s- %s.%s: %sRÒRÓt	row_countterror(RúRÉtcount_table_rowsRÜR—R÷Rƒ(Rttotalttask((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR¼'s

 c
Csed}t|jƒ}x>|jjƒD]-}||jddƒ7}|j|dƒq%W|jdƒ|jrT|jjjj	jddƒ}|jdƒt
|_t|_
z|jj||jƒ}Wdt|_t
|_
X|jdƒ|jdƒd}x|jjƒD]
}|j|d	d
|ddƒ}|jddƒ}|rZ|\}	}
nd}
t
}	|	ró|
|kró|d}d
|d	|df}d|
||d|df}|jd||ƒ|jd|d	|d|
|fƒq|jd|d	|d|
|fƒqW|jd||fƒ|jjratjdƒ‚qan
|jdƒdS(NiRRÖR8R]isMigrating data...sData copy results:RÔRŽRÕis%s.%ss+Succeeded : copied %s of %s rows from %s.%sRÒRÓs,- %s.%s has succeeded (%s of %s rows copied)s)- %s.%s has FAILED (%s of %s rows copied)s!%i tables of %i were fully copiedsCanceled by usersNothing to be done(R—RÜR÷Rƒtcreate_transfer_logRúR?RgRhRiRt_log_progress_textRRÂRÉtmigrate_dataR¨t
add_log_entrytinterruptedRwt
UserInterrupt(
RRttable_countRtthread_counttsucceeded_taskstfully_copiedtinfoRtokRpRÕtmessage((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR¾0sH
	
			


"
()cCs|jdƒdS(NsKChecking if number of rows copied to target tables matches source tables...(Rú(R((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyt_verify_copyescCs“tjjƒ}||_|jjjjƒ}|j|jj	j
ƒ}|j|jj
ƒ}d||f|_
||_|jjjjj
|ƒdS(Ns%s.%s(RwtclassestGrtLogObjectt	logObjectR?RgRRÛRßRžRRhtdataTransferLogRu(RRÕtlogRæt	logSchematlogTable((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR	is		cCs4x-|jjjjD]}||jkr|SqWdS(N(R?RgRhRR(RRÕR((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pytget_log_objectvscCsD|j|ƒ}tjjƒ}||_||_|jj|ƒdS(N(RRwRtGrtLogEntryt	entryTypeRtentriesRu(RttypeRÕRRtentry((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyR{s
		(R³R´R>R‰RÐRÑR¸R¹R¼R¾RR	RR(((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyRµFs		&			8	n			5		
	(RFRwRRôtworkbench.uiRRRtmigration_source_selectionRRRµ(((sVC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\migration_data_transfer.pyt<module>sÿ-

Anon7 - 2022
AnonSec Team