mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-21 18:24:38 +00:00
85 lines
57 KiB
HTML
85 lines
57 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
|
|
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>pt_table_sync</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
|
|
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
|
|
|
|
<!-- Generated by Natural Docs, version 1.52 -->
|
|
<!-- http://www.naturaldocs.org -->
|
|
|
|
<!-- saved from url=(0026)http://www.naturaldocs.org -->
|
|
|
|
|
|
|
|
|
|
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="pt_table_sync"></a>pt_table_sync</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#pt_table_sync" >pt_table_sync</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#pt_table_sync.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.dsn_for" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">%dsn_for</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#pt_table_sync.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.main" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">main</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.lock_and_rename" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">lock_and_rename</a></td><td class=SDescription>Lock and rename a table.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.sync_one_table" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">sync_one_table</a></td><td class=SDescription>Sync one table between one source host and multiple destination hosts. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.sync_via_replication" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">sync_via_replication</a></td><td class=SDescription>Sync multiple destination hosts to one source host via replication. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.sync_all" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">sync_all</a></td><td class=SDescription>Sync every table between one source host and multiple destination hosts. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.lock_server" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">lock_server</a></td><td class=SDescription>Lock a host with FLUSH TABLES WITH READ LOCK. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.unlock_server" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">unlock_server</a></td><td class=SDescription>Unlock a host with UNLOCK TABLES. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.sync_a_table" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">sync_a_table</a></td><td class=SDescription>Sync the destination host table to the source host table. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.get_change_dbh" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">get_change_dbh</a></td><td class=SDescription>Return the dbh to write to for syncing changes. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.make_action_subs" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">make_action_subs</a></td><td class=SDescription>Make callbacks for <a href="../modules/ChangeHandler-pm.html#ChangeHandler.new" class=LFunction id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">ChangeHandler::new()</a> actions argument. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.print_err" >print_err</a></td><td class=SDescription>Try to extract the MySQL error message and print it.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.get_cxn" >get_cxn</a></td><td class=SDescription>Connect to host specified by DSN.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.ok_to_sync" >ok_to_sync</a></td><td class=SDescription>Check that the destination host table can be synced to the source host table. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.filter_diffs" >filter_diffs</a></td><td class=SDescription>Filter different slave tables according to the various schema object filters. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.disconnect" >disconnect</a></td><td class=SDescription>Disconnect host dbhs created by <a href="#pt_table_sync.get_cxn" class=LFunction id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">get_cxn()</a>. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.print_sql" >print_sql</a></td><td class=SDescription>Callback for <a href="../modules/TableSyncer-pm.html#TableSyncer.sync_table" class=LFunction id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">TableSyncer::sync_table()</a> if --print --verbose --verbose is specified. </td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.cmd_conflict_col" >cmd_conflict_col</a></td><td class=SDescription>Compare --conflict-column values for --bidirectional. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.set_bidirectional_callbacks" >set_bidirectional_callbacks</a></td><td class=SDescription>Set syncer plugin callbacks for --bidirectional.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#pt_table_sync.get_plugins" >get_plugins</a></td><td class=SDescription>Get internal TableSync* plugins.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#pt_table_sync.get_server_time" >get_server_time</a></td><td class=SDescription>Return HH:MM:SS of SELECT NOW() from the server.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.Variables"></a>Variables</h3></div></div>
|
|
|
|
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.dsn_for"></a>%dsn_for</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">my %dsn_for</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.Functions"></a>Functions</h3></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.main"></a>main</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub main</td></tr></table></blockquote></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.lock_and_rename"></a>lock_and_rename</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub lock_and_rename</td></tr></table></blockquote><p>Lock and rename a table.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dsns</td><td class=CDLDescription>Arrayref of DSNs</td></tr><tr><td class=CDLEntry>plugins</td><td class=CDLDescription>Arrayref of TableSync* objects</td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link15 onMouseOver="ShowTip(event, 'tt15', 'link15')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr><tr><td class=CDLEntry>DSNParser</td><td class=CDLDescription><a href="../modules/DSNParser-pm.html#DSNParser" class=LClass id=link16 onMouseOver="ShowTip(event, 'tt16', 'link16')" onMouseOut="HideTip('tt16')">DSNParser</a> object</td></tr><tr><td class=CDLEntry>Quoter</td><td class=CDLDescription><a href="../modules/Quoter-pm.html#Quoter" class=LClass id=link17 onMouseOver="ShowTip(event, 'tt17', 'link17')" onMouseOut="HideTip('tt17')">Quoter</a> object</td></tr></table><h4 class=CHeading>Returns</h4><p>Exit status</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.sync_one_table"></a>sync_one_table</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub sync_one_table</td></tr></table></blockquote><p>Sync one table between one source host and multiple destination hosts. The first DSN in $args{dsns} specifies the source host, database (D), and table (t). The other DSNs are the destination hosts. If a destination DSN does not specify a database or table, the source database or table are used as defaults. Else, the destination-specific database or table are used. This allows you to sync tables with different names.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dsns</td><td class=CDLDescription>Arrayref of DSNs</td></tr><tr><td class=CDLEntry>plugins</td><td class=CDLDescription>Arrayref of TableSync* objects</td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link18 onMouseOver="ShowTip(event, 'tt15', 'link18')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr><tr><td class=CDLEntry>DSNParser</td><td class=CDLDescription><a href="../modules/DSNParser-pm.html#DSNParser" class=LClass id=link19 onMouseOver="ShowTip(event, 'tt16', 'link19')" onMouseOut="HideTip('tt16')">DSNParser</a> object</td></tr><tr><td class=CDLEntry>Quoter</td><td class=CDLDescription><a href="../modules/Quoter-pm.html#Quoter" class=LClass id=link20 onMouseOver="ShowTip(event, 'tt17', 'link20')" onMouseOut="HideTip('tt17')">Quoter</a> object</td></tr><tr><td class=CDLEntry>VersionParser</td><td class=CDLDescription><a href="../modules/VersionParser-pm.html#VersionParser" class=LClass id=link21 onMouseOver="ShowTip(event, 'tt18', 'link21')" onMouseOut="HideTip('tt18')">VersionParser</a> object</td></tr></table><h4 class=CHeading>Returns</h4><p>Exit status</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.sync_via_replication"></a>sync_via_replication</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub sync_via_replication</td></tr></table></blockquote><p>Sync multiple destination hosts to one source host via replication. The first DSN in $args{dsns} specifies the source host. If --sync-to-master is specified, then the source host is a master and there is only one destination host which is its slave. Else, destination hosts are auto-discovered with <a href="../modules/MasterSlave-pm.html#MasterSlave.recurse_to_slaves" class=LFunction id=link22 onMouseOver="ShowTip(event, 'tt19', 'link22')" onMouseOut="HideTip('tt19')">MasterSlave::recurse_to_slaves()</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dsns</td><td class=CDLDescription>Arrayref of DSNs</td></tr><tr><td class=CDLEntry>plugins</td><td class=CDLDescription>Arrayref of TableSync* objects</td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link23 onMouseOver="ShowTip(event, 'tt15', 'link23')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr><tr><td class=CDLEntry>DSNParser</td><td class=CDLDescription><a href="../modules/DSNParser-pm.html#DSNParser" class=LClass id=link24 onMouseOver="ShowTip(event, 'tt16', 'link24')" onMouseOut="HideTip('tt16')">DSNParser</a> object</td></tr><tr><td class=CDLEntry>Quoter</td><td class=CDLDescription><a href="../modules/Quoter-pm.html#Quoter" class=LClass id=link25 onMouseOver="ShowTip(event, 'tt17', 'link25')" onMouseOut="HideTip('tt17')">Quoter</a> object</td></tr><tr><td class=CDLEntry>VersionParser</td><td class=CDLDescription><a href="../modules/VersionParser-pm.html#VersionParser" class=LClass id=link26 onMouseOver="ShowTip(event, 'tt18', 'link26')" onMouseOut="HideTip('tt18')">VersionParser</a> object</td></tr><tr><td class=CDLEntry>TableChecksum</td><td class=CDLDescription><a href="../modules/TableChecksum-pm.html#TableChecksum" class=LClass id=link27 onMouseOver="ShowTip(event, 'tt20', 'link27')" onMouseOut="HideTip('tt20')">TableChecksum</a> object</td></tr><tr><td class=CDLEntry>MasterSlave</td><td class=CDLDescription><a href="../modules/MasterSlave-pm.html#MasterSlave" class=LClass id=link28 onMouseOver="ShowTip(event, 'tt21', 'link28')" onMouseOut="HideTip('tt21')">MasterSlave</a> object</td></tr></table><h4 class=CHeading>Returns</h4><p>Exit status</p><h4 class=CHeading>See Also</h4><p><a href="#pt_table_sync.filter_diffs" class=LFunction id=link29 onMouseOver="ShowTip(event, 'tt22', 'link29')" onMouseOut="HideTip('tt22')">filter_diffs()</a></p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.sync_all"></a>sync_all</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub sync_all</td></tr></table></blockquote><p>Sync every table between one source host and multiple destination hosts. The first DSN in $args{dsns} specifies the source host. The other DSNs are the destination hosts. Unlike <a href="#pt_table_sync.sync_one_table" class=LFunction id=link30 onMouseOver="ShowTip(event, 'tt4', 'link30')" onMouseOut="HideTip('tt4')">sync_one_table</a>, the database and table names must be the same on the source and destination hosts.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>dsns</td><td class=CDLDescription>Arrayref of DSNs</td></tr><tr><td class=CDLEntry>plugins</td><td class=CDLDescription>Arrayref of TableSync* objects</td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link31 onMouseOver="ShowTip(event, 'tt15', 'link31')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr><tr><td class=CDLEntry>DSNParser</td><td class=CDLDescription><a href="../modules/DSNParser-pm.html#DSNParser" class=LClass id=link32 onMouseOver="ShowTip(event, 'tt16', 'link32')" onMouseOut="HideTip('tt16')">DSNParser</a> object</td></tr><tr><td class=CDLEntry>Quoter</td><td class=CDLDescription><a href="../modules/Quoter-pm.html#Quoter" class=LClass id=link33 onMouseOver="ShowTip(event, 'tt17', 'link33')" onMouseOut="HideTip('tt17')">Quoter</a> object</td></tr><tr><td class=CDLEntry>VersionParser</td><td class=CDLDescription><a href="../modules/VersionParser-pm.html#VersionParser" class=LClass id=link34 onMouseOver="ShowTip(event, 'tt18', 'link34')" onMouseOut="HideTip('tt18')">VersionParser</a> object</td></tr><tr><td class=CDLEntry>TableParser</td><td class=CDLDescription><a href="../modules/TableParser-pm.html#TableParser" class=LClass id=link35 onMouseOver="ShowTip(event, 'tt23', 'link35')" onMouseOut="HideTip('tt23')">TableParser</a> object</td></tr><tr><td class=CDLEntry>MySQLDump</td><td class=CDLDescription><a href="../modules/MySQLDump-pm.html#MySQLDump" class=LClass id=link36 onMouseOver="ShowTip(event, 'tt24', 'link36')" onMouseOut="HideTip('tt24')">MySQLDump</a> object</td></tr></table><h4 class=CHeading>Returns</h4><p>Exit status</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.lock_server"></a>lock_server</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub lock_server</td></tr></table></blockquote><p>Lock a host with FLUSH TABLES WITH READ LOCK. This implements --lock 3 by calling <a href="../modules/TableSyncer-pm.html#TableSyncer.lock_and_wait" class=LFunction id=link37 onMouseOver="ShowTip(event, 'tt25', 'link37')" onMouseOut="HideTip('tt25')">TableSyncer::lock_and_wait()</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>src</td><td class=CDLDescription>Hashref with source host information</td></tr><tr><td class=CDLEntry>dst</td><td class=CDLDescription>Hashref with destination host information</td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link38 onMouseOver="ShowTip(event, 'tt15', 'link38')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr><tr><td class=CDLEntry>DSNParser</td><td class=CDLDescription><a href="../modules/DSNParser-pm.html#DSNParser" class=LClass id=link39 onMouseOver="ShowTip(event, 'tt16', 'link39')" onMouseOut="HideTip('tt16')">DSNParser</a> object</td></tr><tr><td class=CDLEntry>TableSyncer</td><td class=CDLDescription><a href="../modules/TableSyncer-pm.html#TableSyncer" class=LClass id=link40 onMouseOver="ShowTip(event, 'tt26', 'link40')" onMouseOut="HideTip('tt26')">TableSyncer</a> object</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.unlock_server"></a>unlock_server</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub unlock_server</td></tr></table></blockquote><p>Unlock a host with UNLOCK TABLES. This implements --lock 3 by calling <a href="../modules/TableSyncer-pm.html#TableSyncer.unlock" class=LFunction id=link41 onMouseOver="ShowTip(event, 'tt27', 'link41')" onMouseOut="HideTip('tt27')">TableSyncer::unlock()</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>src</td><td class=CDLDescription>Hashref with source host information</td></tr><tr><td class=CDLEntry>dst</td><td class=CDLDescription>Hashref with destination host information</td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link42 onMouseOver="ShowTip(event, 'tt15', 'link42')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr><tr><td class=CDLEntry>DSNParser</td><td class=CDLDescription><a href="../modules/DSNParser-pm.html#DSNParser" class=LClass id=link43 onMouseOver="ShowTip(event, 'tt16', 'link43')" onMouseOut="HideTip('tt16')">DSNParser</a> object</td></tr><tr><td class=CDLEntry>TableSyncer</td><td class=CDLDescription><a href="../modules/TableSyncer-pm.html#TableSyncer" class=LClass id=link44 onMouseOver="ShowTip(event, 'tt26', 'link44')" onMouseOut="HideTip('tt26')">TableSyncer</a> object</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.sync_a_table"></a>sync_a_table</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub sync_a_table</td></tr></table></blockquote><p>Sync the destination host table to the source host table. This sub is not called directly but indirectly via the other sync_* subs. In turn, this sub calls <a href="../modules/TableSyncer-pm.html#TableSyncer.sync_table" class=LFunction id=link45 onMouseOver="ShowTip(event, 'tt14', 'link45')" onMouseOut="HideTip('tt14')">TableSyncer::sync_table()</a> which actually does the sync work. Calling sync_table() requires a fair amount of prep work that this sub does/simplifies. New <a href="../modules/RowDiff-pm.html#RowDiff" class=LClass id=link46 onMouseOver="ShowTip(event, 'tt28', 'link46')" onMouseOut="HideTip('tt28')">RowDiff</a> and <a href="../modules/ChangeHandler-pm.html#ChangeHandler" class=LClass id=link47 onMouseOver="ShowTip(event, 'tt29', 'link47')" onMouseOut="HideTip('tt29')">ChangeHandler</a> objects are created, so those packages need to be available.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>src</td><td class=CDLDescription>Hashref with source host information</td></tr><tr><td class=CDLEntry>dst</td><td class=CDLDescription>Hashref with destination host information</td></tr><tr><td class=CDLEntry>plugins</td><td class=CDLDescription>Arrayref of TableSync* objects</td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link48 onMouseOver="ShowTip(event, 'tt15', 'link48')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr><tr><td class=CDLEntry>Quoter</td><td class=CDLDescription><a href="../modules/Quoter-pm.html#Quoter" class=LClass id=link49 onMouseOver="ShowTip(event, 'tt17', 'link49')" onMouseOut="HideTip('tt17')">Quoter</a> object</td></tr><tr><td class=CDLEntry>TableParser</td><td class=CDLDescription><a href="../modules/TableParser-pm.html#TableParser" class=LClass id=link50 onMouseOver="ShowTip(event, 'tt23', 'link50')" onMouseOut="HideTip('tt23')">TableParser</a> object</td></tr><tr><td class=CDLEntry>MySQLDump</td><td class=CDLDescription><a href="../modules/MySQLDump-pm.html#MySQLDump" class=LClass id=link51 onMouseOver="ShowTip(event, 'tt24', 'link51')" onMouseOut="HideTip('tt24')">MySQLDump</a> object</td></tr><tr><td class=CDLEntry>TableSyncer</td><td class=CDLDescription><a href="../modules/TableSyncer-pm.html#TableSyncer" class=LClass id=link52 onMouseOver="ShowTip(event, 'tt26', 'link52')" onMouseOut="HideTip('tt26')">TableSyncer</a> object</td></tr></table><h4 class=CHeading>Returns</h4><p>Exit status</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.get_change_dbh"></a>get_change_dbh</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_change_dbh</td></tr></table></blockquote><p>Return the dbh to write to for syncing changes. Write statements are executed on the “change dbh”. If --sync-to-master or --replicate is specified, the source (master) dbh is the “change dbh”. This means changes replicate to all slaves. Else, the destination dbh is the change dbh. This is the case when two independent servers (or perhaps one table on the same server) are synced. This sub implements --[no]check-slave because writing to a slave is generally a bad thing.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>src</td><td class=CDLDescription>Hashref with source host information</td></tr><tr><td class=CDLEntry>dst</td><td class=CDLDescription>Hashref with destination host information</td></tr><tr><td class=CDLEntry>tbl_struct</td><td class=CDLDescription>Hashref returned by <a href="../modules/TableParser-pm.html#TableParser.parse" class=LFunction id=link53 onMouseOver="ShowTip(event, 'tt30', 'link53')" onMouseOut="HideTip('tt30')">TableParser::parse()</a></td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link54 onMouseOver="ShowTip(event, 'tt15', 'link54')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr><tr><td class=CDLEntry>DSNParser</td><td class=CDLDescription><a href="../modules/DSNParser-pm.html#DSNParser" class=LClass id=link55 onMouseOver="ShowTip(event, 'tt16', 'link55')" onMouseOut="HideTip('tt16')">DSNParser</a> object</td></tr><tr><td class=CDLEntry>MasterSlave</td><td class=CDLDescription><a href="../modules/MasterSlave-pm.html#MasterSlave" class=LClass id=link56 onMouseOver="ShowTip(event, 'tt21', 'link56')" onMouseOut="HideTip('tt21')">MasterSlave</a> object</td></tr></table><h4 class=CHeading>Returns</h4><p>Either $args{src}->{dbh} or $args{dst}->{dbh} if no checks fail.</p><h4 class=CHeading>See Also</h4><p><a href="#pt_table_sync.make_action_subs" class=LFunction id=link57 onMouseOver="ShowTip(event, 'tt11', 'link57')" onMouseOut="HideTip('tt11')">make_action_subs()</a></p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.make_action_subs"></a>make_action_subs</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub make_action_subs</td></tr></table></blockquote><p>Make callbacks for <a href="../modules/ChangeHandler-pm.html#ChangeHandler.new" class=LFunction id=link58 onMouseOver="ShowTip(event, 'tt12', 'link58')" onMouseOut="HideTip('tt12')">ChangeHandler::new()</a> actions argument. This sub implements --print and --execute.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>change_dbh</td><td class=CDLDescription>dbh returned by <a href="#pt_table_sync.get_change_dbh" class=LFunction id=link59 onMouseOver="ShowTip(event, 'tt10', 'link59')" onMouseOut="HideTip('tt10')">get_change_dbh</a></td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link60 onMouseOver="ShowTip(event, 'tt15', 'link60')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr></table><h4 class=CHeading>Returns</h4><p>Arrayref of callbacks (coderefs)</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.print_err"></a>print_err</h3><div class=CBody><p>Try to extract the MySQL error message and print it.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$msg</td><td class=CDLDescription>Error message</td></tr><tr><td class=CDLEntry>$database</td><td class=CDLDescription>Database name being synced when error occurred</td></tr><tr><td class=CDLEntry>$table</td><td class=CDLDescription>Table name being synced when error occurred</td></tr><tr><td class=CDLEntry>$host</td><td class=CDLDescription>Host name error occurred on</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.get_cxn"></a>get_cxn</h3><div class=CBody><p>Connect to host specified by DSN.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$dsn</td><td class=CDLDescription>Host DSN</td></tr><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>OptionaParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link61 onMouseOver="ShowTip(event, 'tt15', 'link61')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr><tr><td class=CDLEntry>DSNParser</td><td class=CDLDescription><a href="../modules/DSNParser-pm.html#DSNParser" class=LClass id=link62 onMouseOver="ShowTip(event, 'tt16', 'link62')" onMouseOut="HideTip('tt16')">DSNParser</a> object</td></tr></table><h4 class=CHeading>Returns</h4><p>dbh</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.ok_to_sync"></a>ok_to_sync</h3><div class=CBody><p>Check that the destination host table can be synced to the source host table. All sorts of sanity checks are performed to help ensure that syncing the table won’t cause problems in <a href="#pt_table_sync.sync_a_table" class=LFunction id=link63 onMouseOver="ShowTip(event, 'tt9', 'link63')" onMouseOut="HideTip('tt9')">sync_a_table()</a> or <a href="../modules/TableSyncer-pm.html#TableSyncer.sync_table" class=LFunction id=link64 onMouseOver="ShowTip(event, 'tt14', 'link64')" onMouseOut="HideTip('tt14')">TableSyncer::sync_table()</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>src</td><td class=CDLDescription>Hashref with source host information</td></tr><tr><td class=CDLEntry>dst</td><td class=CDLDescription>Hashref with destination host information</td></tr><tr><td class=CDLEntry>DSNParser</td><td class=CDLDescription><a href="../modules/DSNParser-pm.html#DSNParser" class=LClass id=link65 onMouseOver="ShowTip(event, 'tt16', 'link65')" onMouseOut="HideTip('tt16')">DSNParser</a> object</td></tr><tr><td class=CDLEntry>Quoter</td><td class=CDLDescription><a href="../modules/Quoter-pm.html#Quoter" class=LClass id=link66 onMouseOver="ShowTip(event, 'tt17', 'link66')" onMouseOut="HideTip('tt17')">Quoter</a> object</td></tr><tr><td class=CDLEntry>VersionParser</td><td class=CDLDescription><a href="../modules/VersionParser-pm.html#VersionParser" class=LClass id=link67 onMouseOver="ShowTip(event, 'tt18', 'link67')" onMouseOut="HideTip('tt18')">VersionParser</a> object</td></tr><tr><td class=CDLEntry>TableParser</td><td class=CDLDescription><a href="../modules/TableParser-pm.html#TableParser" class=LClass id=link68 onMouseOver="ShowTip(event, 'tt23', 'link68')" onMouseOut="HideTip('tt23')">TableParser</a> object</td></tr><tr><td class=CDLEntry>MySQLDump</td><td class=CDLDescription><a href="../modules/MySQLDump-pm.html#MySQLDump" class=LClass id=link69 onMouseOver="ShowTip(event, 'tt24', 'link69')" onMouseOut="HideTip('tt24')">MySQLDump</a> object</td></tr><tr><td class=CDLEntry>TableSyncer</td><td class=CDLDescription><a href="../modules/TableSyncer-pm.html#TableSyncer" class=LClass id=link70 onMouseOver="ShowTip(event, 'tt26', 'link70')" onMouseOut="HideTip('tt26')">TableSyncer</a> object</td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link71 onMouseOver="ShowTip(event, 'tt15', 'link71')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr></table><h4 class=CHeading>Returns</h4><p>Table structure (from <a href="../modules/TableParser-pm.html#TableParser.parse" class=LFunction id=link72 onMouseOver="ShowTip(event, 'tt30', 'link72')" onMouseOut="HideTip('tt30')">TableParser::parse()</a>) if ok to sync, else it dies.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.filter_diffs"></a>filter_diffs</h3><div class=CBody><p>Filter different slave tables according to the various schema object filters. This sub is called in <a href="#pt_table_sync.sync_via_replication" class=LFunction id=link73 onMouseOver="ShowTip(event, 'tt5', 'link73')" onMouseOut="HideTip('tt5')">sync_via_replication()</a> to implement schema object filters like --databases and --tables.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$skip_table</td><td class=CDLDescription>Hashref of databases and tables to skip</td></tr><tr><td class=CDLEntry>$databases</td><td class=CDLDescription>Hashref of databases to skip</td></tr><tr><td class=CDLEntry>$tables</td><td class=CDLDescription>Hashref of tables to skip</td></tr><tr><td class=CDLEntry>@diffs</td><td class=CDLDescription>Array of hashrefs, one for each different slave table</td></tr></table><h4 class=CHeading>Returns</h4><p>Array of different slave tables that pass the filters</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.disconnect"></a>disconnect</h3><div class=CBody><p>Disconnect host dbhs created by <a href="#pt_table_sync.get_cxn" class=LFunction id=link74 onMouseOver="ShowTip(event, 'tt13', 'link74')" onMouseOut="HideTip('tt13')">get_cxn()</a>. To make sure all dbh are closed, pt-table-sync keeps track of the dbh it opens and this sub helps keep track of the dbh that are closed.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>@hosts</td><td class=CDLDescription>Array of hashrefs with host information, one for each host</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.print_sql"></a>print_sql</h3><div class=CBody><p>Callback for <a href="../modules/TableSyncer-pm.html#TableSyncer.sync_table" class=LFunction id=link75 onMouseOver="ShowTip(event, 'tt14', 'link75')" onMouseOut="HideTip('tt14')">TableSyncer::sync_table()</a> if --print --verbose --verbose is specified. The callback simply prints the SQL statements passed to it by sync_table(). They’re usually (always?) identical statements.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$src_sql</td><td class=CDLDescription>SQL statement to be executed on the sourch host</td></tr><tr><td class=CDLEntry>$dst_sql</td><td class=CDLDescription>SQL statement to be executed on the destination host</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.cmd_conflict_col"></a>cmd_conflict_col</h3><div class=CBody><p>Compare --conflict-column values for --bidirectional. This sub is used as a callback in <a href="#pt_table_sync.set_bidirectional_callbacks" class=LFunction id=link76 onMouseOver="ShowTip(event, 'tt31', 'link76')" onMouseOut="HideTip('tt31')">set_bidirectional_callbacks()</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$left_val</td><td class=CDLDescription>Column value from left (usually the source host)</td></tr><tr><td class=CDLEntry>$right_val</td><td class=CDLDescription>Column value from right (usually the destination host)</td></tr><tr><td class=CDLEntry>$cmp</td><td class=CDLDescription>Type of conflict comparison, --conflict-comparison</td></tr><tr><td class=CDLEntry>$val</td><td class=CDLDescription>Value for certain types of comparisons, --conflict-value</td></tr><tr><td class=CDLEntry>$thr</td><td class=CDLDescription>Threshold for certain types of comparisons, --conflict-threshold</td></tr></table><h4 class=CHeading>Returns</h4><p>One of the constants above, UPDATE_* or FAILED_THRESHOLD</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.set_bidirectional_callbacks"></a>set_bidirectional_callbacks</h3><div class=CBody><p>Set syncer plugin callbacks for --bidirectional.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>%args</td><td class=CDLDescription>Arguments</td></tr></table><h4 class=CHeading>Required Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>plugin</td><td class=CDLDescription>TableSync* object</td></tr><tr><td class=CDLEntry>OptionParser</td><td class=CDLDescription><a href="../modules/OptionParser-pm.html#OptionParser" class=LClass id=link77 onMouseOver="ShowTip(event, 'tt15', 'link77')" onMouseOut="HideTip('tt15')">OptionParser</a> object</td></tr></table></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.get_plugins"></a>get_plugins</h3><div class=CBody><p>Get internal TableSync* plugins.</p><h4 class=CHeading>Returns</h4><p>Hash of available algoritms and the plugin/module names that implement them, like “chunk => TableSyncChunk”.</p></div></div></div>
|
|
|
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="pt_table_sync.get_server_time"></a>get_server_time</h3><div class=CBody><p>Return HH:MM:SS of SELECT NOW() from the server.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>$dbh</td><td class=CDLDescription>dbh</td></tr></table></div></div></div>
|
|
|
|
</div><!--Content-->
|
|
|
|
|
|
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
|
|
|
|
|
|
<div id=Menu><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Modules</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../modules/Advisor-pm.html">Advisor</a></div></div><div class=MEntry><div class=MFile><a href="../modules/AdvisorRules-pm.html">AdvisorRules</a></div></div><div class=MEntry><div class=MFile><a href="../modules/BinaryLogParser-pm.html">BinaryLogParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/ChangeHandler-pm.html">ChangeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../modules/CompareQueryTimes-pm.html">CompareQueryTimes</a></div></div><div class=MEntry><div class=MFile><a href="../modules/CompareResults-pm.html">CompareResults</a></div></div><div class=MEntry><div class=MFile><a href="../modules/CompareTableStructs-pm.html">CompareTableStructs</a></div></div><div class=MEntry><div class=MFile><a href="../modules/CompareWarnings-pm.html">CompareWarnings</a></div></div><div class=MEntry><div class=MFile><a href="../modules/CopyRowsInsertSelect-pm.html">CopyRowsInsertSelect</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Daemon-pm.html">Daemon</a></div></div><div class=MEntry><div class=MFile><a href="../modules/DSNParser-pm.html">DSNParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/DuplicateKeyFinder-pm.html">DuplicateKeyFinder</a></div></div><div class=MEntry><div class=MFile><a href="../modules/EventAggregator-pm.html">EventAggregator</a></div></div><div class=MEntry><div class=MFile><a href="../modules/EventTimeline-pm.html">EventTimeline</a></div></div><div class=MEntry><div class=MFile><a href="../modules/ExecutionThrottler-pm.html">ExecutionThrottler</a></div></div><div class=MEntry><div class=MFile><a href="../modules/ExplainAnalyzer-pm.html">ExplainAnalyzer</a></div></div><div class=MEntry><div class=MFile><a href="../modules/FileIterator-pm.html">FileIterator</a></div></div><div class=MEntry><div class=MFile><a href="../modules/ForeignKeyIterator-pm.html">ForeignKeyIterator</a></div></div><div class=MEntry><div class=MFile><a href="../modules/GeneralLogParser-pm.html">GeneralLogParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/HTTPProtocolParser-pm.html">HTTPProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/IndexUsage-pm.html">IndexUsage</a></div></div><div class=MEntry><div class=MFile><a href="../modules/InnoDBStatusParser-pm.html">InnoDBStatusParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/KeySize-pm.html">KeySize</a></div></div><div class=MEntry><div class=MFile><a href="../modules/LogSplitter-pm.html">LogSplitter</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MaatkitTest-pm.html">MaatkitTest</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MasterSlave-pm.html">MasterSlave</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MemcachedEvent-pm.html">MemcachedEvent</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MemcachedProtocolParser-pm.html">MemcachedProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MockSth-pm.html">MockSth</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MockSync-pm.html">MockSync</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MockSyncStream-pm.html">MockSyncStream</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MySQLConfig-pm.html">MySQLConfig</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MySQLConfigComparer-pm.html">MySQLConfigComparer</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MySQLDump-pm.html">MySQLDump</a></div></div><div class=MEntry><div class=MFile><a href="../modules/MySQLProtocolParser-pm.html">MySQLProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/OptionParser-pm.html">OptionParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/OSCCaptureSync-pm.html">OSCCaptureSync</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Outfile-pm.html">Outfile</a></div></div><div class=MEntry><div class=MFile><a href="../modules/PgLogParser-pm.html">PgLogParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Pipeline-pm.html">Pipeline</a></div></div><div class=MEntry><div class=MFile><a href="../modules/PodParser-pm.html">PodParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Processlist-pm.html">Processlist</a></div></div><div class=MEntry><div class=MFile><a href="../modules/ProcesslistAggregator-pm.html">ProcesslistAggregator</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Progress-pm.html">Progress</a></div></div><div class=MEntry><div class=MFile><a href="../modules/ProtocolParser-pm.html">ProtocolParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/QueryAdvisorRules-pm.html">QueryAdvisorRules</a></div></div><div class=MEntry><div class=MFile><a href="../modules/QueryParser-pm.html">QueryParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/QueryReportFormatter-pm.html">QueryReportFormatter</a></div></div><div class=MEntry><div class=MFile><a href="../modules/QueryReview-pm.html">QueryReview</a></div></div><div class=MEntry><div class=MFile><a href="../modules/QueryRewriter-pm.html">QueryRewriter</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Quoter-pm.html">Quoter</a></div></div><div class=MEntry><div class=MFile><a href="../modules/ReportFormatter-pm.html">ReportFormatter</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Retry-pm.html">Retry</a></div></div><div class=MEntry><div class=MFile><a href="../modules/RowDiff-pm.html">RowDiff</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Runtime-pm.html">Runtime</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Sandbox-pm.html">Sandbox</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Schema-pm.html">Schema</a></div></div><div class=MEntry><div class=MFile><a href="../modules/SchemaIterator-pm.html">SchemaIterator</a></div></div><div class=MEntry><div class=MFile><a href="../modules/SimpleTCPDumpParser-pm.html">SimpleTCPDumpParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/SlowLogParser-pm.html">SlowLogParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/SlowLogWriter-pm.html">SlowLogWriter</a></div></div><div class=MEntry><div class=MFile><a href="../modules/SQLParser-pm.html">SQLParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/SysLogParser-pm.html">SysLogParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableChecksum-pm.html">TableChecksum</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableChunker-pm.html">TableChunker</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableNibbler-pm.html">TableNibbler</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableParser-pm.html">TableParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableSyncChunk-pm.html">TableSyncChunk</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableSyncer-pm.html">TableSyncer</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableSyncGroupBy-pm.html">TableSyncGroupBy</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableSyncNibble-pm.html">TableSyncNibble</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableSyncStream-pm.html">TableSyncStream</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TableUsage-pm.html">TableUsage</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TcpdumpParser-pm.html">TcpdumpParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TCPRequestAggregator-pm.html">TCPRequestAggregator</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TextResultSetParser-pm.html">TextResultSetParser</a></div></div><div class=MEntry><div class=MFile><a href="../modules/TimeSeriesTrender-pm.html">TimeSeriesTrender</a></div></div><div class=MEntry><div class=MFile><a href="../modules/Transformers-pm.html">Transformers</a></div></div><div class=MEntry><div class=MFile><a href="../modules/UpgradeReportFormatter-pm.html">UpgradeReportFormatter</a></div></div><div class=MEntry><div class=MFile><a href="../modules/VariableAdvisorRules-pm.html">VariableAdvisorRules</a></div></div><div class=MEntry><div class=MFile><a href="../modules/VersionParser-pm.html">VersionParser</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Tools</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="pt-archiver-pm.html">pt_archiver</a></div></div><div class=MEntry><div class=MFile><a href="pt-config-diff-pm.html">pt_config_diff</a></div></div><div class=MEntry><div class=MFile><a href="pt-deadlock-logger-pm.html">pt_deadlock_logger</a></div></div><div class=MEntry><div class=MFile><a href="pt-duplicate-key-checker-pm.html">pt_duplicate_key_checker</a></div></div><div class=MEntry><div class=MFile><a href="pt-fifo-split-pm.html">pt_fifo_split</a></div></div><div class=MEntry><div class=MFile><a href="pt-find-pm.html">pt_find</a></div></div><div class=MEntry><div class=MFile><a href="pt-fk-error-logger-pm.html">pt_fk_error_logger</a></div></div><div class=MEntry><div class=MFile><a href="pt-heartbeat-pm.html">pt_heartbeat</a></div></div><div class=MEntry><div class=MFile><a href="pt-index-usage-pm.html">pt_index_usage</a></div></div><div class=MEntry><div class=MFile><a href="pt-kill-pm.html">pt_kill</a></div></div><div class=MEntry><div class=MFile><a href="pt-log-player-pm.html">pt_log_player</a></div></div><div class=MEntry><div class=MFile><a href="pt-online-schema-change-pm.html">pt_online_schema_change</a></div></div><div class=MEntry><div class=MFile><a href="pt-profile-compact-pm.html">pt_profile_compact</a></div></div><div class=MEntry><div class=MFile><a href="pt-query-advisor-pm.html">pt_query_advisor</a></div></div><div class=MEntry><div class=MFile><a href="pt-query-digest-pm.html">pt_query_digest</a></div></div><div class=MEntry><div class=MFile><a href="pt-query-profiler-pm.html">pt_query_profiler</a></div></div><div class=MEntry><div class=MFile><a href="pt-schema-advisor-pm.html">pt_schema_advisor</a></div></div><div class=MEntry><div class=MFile><a href="pt-show-grants-pm.html">pt_show_grants</a></div></div><div class=MEntry><div class=MFile><a href="pt-slave-delay-pm.html">pt_slave_delay</a></div></div><div class=MEntry><div class=MFile><a href="pt-slave-find-pm.html">pt_slave_find</a></div></div><div class=MEntry><div class=MFile><a href="pt-slave-restart-pm.html">pt_slave_restart</a></div></div><div class=MEntry><div class=MFile><a href="pt-table-checksum-pm.html">pt_table_checksum</a></div></div><div class=MEntry><div class=MFile id=MSelected>pt_table_sync</div></div><div class=MEntry><div class=MFile><a href="pt-table-usage-pm.html">pt_table_usage</a></div></div><div class=MEntry><div class=MFile><a href="pt-tcp-model-pm.html">pt_tcp_model</a></div></div><div class=MEntry><div class=MFile><a href="pt-trend-pm.html">pt_trend</a></div></div><div class=MEntry><div class=MFile><a href="pt-upgrade-pm.html">pt_upgrade</a></div></div><div class=MEntry><div class=MFile><a href="pt-variable-advisor-pm.html">pt_variable_advisor</a></div></div><div class=MEntry><div class=MFile><a href="pt-visual-explain-pm.html">pt_visual_explain</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Index</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MIndex><a href="../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
|
|
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
|
|
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
|
|
HideAllBut([2], 4);// --></script></div><!--Menu-->
|
|
|
|
|
|
|
|
<!--START_ND_TOOLTIPS-->
|
|
<div class=CToolTip id="tt1"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">my %dsn_for</td></tr></table></blockquote></div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub main</td></tr></table></blockquote></div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub lock_and_rename</td></tr></table></blockquote>Lock and rename a table.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub sync_one_table</td></tr></table></blockquote>Sync one table between one source host and multiple destination hosts. </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub sync_via_replication</td></tr></table></blockquote>Sync multiple destination hosts to one source host via replication. </div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub sync_all</td></tr></table></blockquote>Sync every table between one source host and multiple destination hosts. </div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub lock_server</td></tr></table></blockquote>Lock a host with FLUSH TABLES WITH READ LOCK. </div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub unlock_server</td></tr></table></blockquote>Unlock a host with UNLOCK TABLES. </div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub sync_a_table</td></tr></table></blockquote>Sync the destination host table to the source host table. </div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub get_change_dbh</td></tr></table></blockquote>Return the dbh to write to for syncing changes. </div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub make_action_subs</td></tr></table></blockquote>Make callbacks for ChangeHandler::new() actions argument. </div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub new</td></tr></table></blockquote></div></div><div class=CToolTip id="tt13"><div class=CFunction>Connect to host specified by DSN.</div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub sync_table</td></tr></table></blockquote></div></div><div class=CToolTip id="tt15"><div class=CClass>OptionParser parses command line options from a tool’s POD. </div></div><div class=CToolTip id="tt16"><div class=CClass>DSNParser parses DSNs and creates connections to MySQL using DBI and DBD::mysql.</div></div><div class=CToolTip id="tt17"><div class=CClass>Quoter handles value quoting, unquoting, escaping, etc.</div></div><div class=CToolTip id="tt18"><div class=CClass>VersionParser parses a MySQL version string.</div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub recurse_to_slaves</td></tr></table></blockquote>Descend to slaves by examining SHOW SLAVE HOSTS. </div></div><div class=CToolTip id="tt20"><div class=CClass>TableChecksum checksums tables.</div></div><div class=CToolTip id="tt21"><div class=CClass>MasterSlave handles common tasks related to master-slave setups.</div></div><div class=CToolTip id="tt22"><div class=CFunction>Filter different slave tables according to the various schema object filters. </div></div><div class=CToolTip id="tt23"><div class=CClass>TableParser parses SHOW CREATE TABLE.</div></div><div class=CToolTip id="tt24"><div class=CClass>MySQLDump gets CREATE TABLE defs from MySQL.</div></div><div class=CToolTip id="tt25"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub lock_and_wait</td></tr></table></blockquote></div></div><div class=CToolTip id="tt26"><div class=CClass>TableSyncer helps sync tables with various table sync algo modules.</div></div><div class=CToolTip id="tt27"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub unlock</td></tr></table></blockquote></div></div><div class=CToolTip id="tt28"><div class=CClass>RowDiff compares two sets of rows to find ones that are different.</div></div><div class=CToolTip id="tt29"><div class=CClass>ChangeHandler creates SQL statements for changing rows in a table.</div></div><div class=CToolTip id="tt30"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">sub parse</td></tr></table></blockquote>Parse SHOW CREATE TABLE.</div></div><div class=CToolTip id="tt31"><div class=CFunction>Set syncer plugin callbacks for --bidirectional.</div></div><!--END_ND_TOOLTIPS-->
|
|
|
|
|
|
|
|
|
|
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
|
|
|
|
|
|
<script language=JavaScript><!--
|
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html> |