<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikido.isoftdata.com//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jmckinstry</id>
	<title>ISoft Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wikido.isoftdata.com//api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jmckinstry"/>
	<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=Special:Contributions/Jmckinstry"/>
	<updated>2026-05-04T09:18:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=User:Jmckinstry&amp;diff=9768</id>
		<title>User:Jmckinstry</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=User:Jmckinstry&amp;diff=9768"/>
		<updated>2016-12-14T23:29:45Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: /* About Justin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISoft History ==&lt;br /&gt;
Justin was hired in March of 2009, where he began by learning the ins and outs of ITrack Pro and AX.&lt;br /&gt;
&lt;br /&gt;
Currently, he&amp;#039;s the main developer for ITrack AX, Replikwando, and a wide swath of tools both internal and external.  He also does development work on random projects as they come up, guides with tech support in their endeavors, and does his best to keep interdepartmental communications flowing smoothly.  Hats are changed frequently!&lt;br /&gt;
&lt;br /&gt;
== Education and Experience ==&lt;br /&gt;
Justin graduated with a Bachelor&amp;#039;s Degree in Computer Science (minor in Mathematics) in December of 2008.  He&amp;#039;s been doing technical support for computers, printers, network connections and infrastructure, televisions, telephones, and server administration for four years, with another two years of programming.&lt;br /&gt;
&lt;br /&gt;
During his time at ISoft, Justin has:&lt;br /&gt;
* Written code for AX, Pro, Enterprise, and Presage&lt;br /&gt;
* Written web code for LX Warehouse, Presage Scanner, an auction lotting tool (and evaluated/debugged/made suggestions for other large production sites and tools)&lt;br /&gt;
* Written scripts for database updating, timed program checks, massive directory manipulation, bidirectional public key file exchanges&lt;br /&gt;
* Developed/Maintained internal tools (including Replikwando, a mysql tokenizer, a harebrained symmetrical encryption scheme, and a call tracker)&lt;br /&gt;
* Developed external GPL code that ISoft made use of (and made sure the code changes were public, of course):&lt;br /&gt;
** [https://code.launchpad.net/~isoft-data-systems/mysql-binlog-parser/trunk mysql-replication-listener]: Fixed a few bugs, added support for writing binlog statements out (so you can inline edit them!)&lt;br /&gt;
* Participated in the deployment, maintenance, and upkeep of more than a dozen production databases:&lt;br /&gt;
** CPU and Memory utilization&lt;br /&gt;
** Errand program debugging and correction&lt;br /&gt;
** Establishing, maintaining, and debugging networks on both ends of the performance spectrum (servers using erroring T1 lines is interesting)&lt;br /&gt;
* Enjoyed tons of (almost exclusively MySQL and sqlite) database shenanigans:&lt;br /&gt;
** Installing and configuring the servers and related programs&lt;br /&gt;
** Writing, debugging, optimizing, and tracking queries, stored procedures, functions, views&lt;br /&gt;
** Creating and implementing archiving and backup solutions&lt;br /&gt;
** Recovering &amp;#039;lost&amp;#039; data and restoring &amp;#039;lost&amp;#039; databases&lt;br /&gt;
* Created script files for nightly export of large (not terabyte-scale) data sets&lt;br /&gt;
* Learned Javascript from scratch well enough to do group project work within 48 hours&lt;br /&gt;
* Helped Support streamline and correct processes in an effort to keep things running smoothly (bless our Support staff!)&lt;br /&gt;
* Reviewed weekly error logs and reports, distilling recurring issues and relaying the problems and potential causes &amp;amp; solutions to the project managers&lt;br /&gt;
* Assisted in the execution of bi-monthly auction days by clerking, helping maintain data consistency and reporting, proving outcomes to customers, and providing post-auction statistics&lt;br /&gt;
* Created an inventory appraisal tool that (for auctions at least) has had a 5% margin of error for the past two years running&lt;br /&gt;
* Acted as backup System Administrator (mini-Brian, if you will), assisting in recovery from power and network outages, suffering HDD setups, poor network/hardware performance, and making tool recommendations on occasion&lt;br /&gt;
&lt;br /&gt;
And some other stuff. You know. ;)&lt;br /&gt;
&lt;br /&gt;
== Public Keys ==&lt;br /&gt;
* Keybase.io: A817266B53CD3F9AB144416C9ABC91ED61DE9BE0 (https://keybase.io/jmckinstry/key.asc)&lt;br /&gt;
* pgp.mit.edu: 9ABC91ED61DE9BE0 (https://pgp.mit.edu/pks/lookup?op=get&amp;amp;search=0x9ABC91ED61DE9BE0)&lt;br /&gt;
&lt;br /&gt;
== About Justin ==&lt;br /&gt;
While not being an extreme outdoorsman, Justin does like to hunt and fish.  Occasional hiking and biking also occur.  During the rest of his spare time he enjoys reading, drumming, and playing Rock Band and other video games.  He also likes to write small programs using C/C++/javascript/python just for fun.&lt;br /&gt;
&lt;br /&gt;
He once fixed a mangled barcode with a pen and a steady hand.&lt;br /&gt;
&lt;br /&gt;
[[Category:ISoft Employees]]&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=User:Jmckinstry&amp;diff=9703</id>
		<title>User:Jmckinstry</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=User:Jmckinstry&amp;diff=9703"/>
		<updated>2016-11-04T19:53:44Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: /* Education and Experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISoft History ==&lt;br /&gt;
Justin was hired in March of 2009, where he began by learning the ins and outs of ITrack Pro and AX.&lt;br /&gt;
&lt;br /&gt;
Currently, he&amp;#039;s the main developer for ITrack AX, Replikwando, and a wide swath of tools both internal and external.  He also does development work on random projects as they come up, guides with tech support in their endeavors, and does his best to keep interdepartmental communications flowing smoothly.  Hats are changed frequently!&lt;br /&gt;
&lt;br /&gt;
== Education and Experience ==&lt;br /&gt;
Justin graduated with a Bachelor&amp;#039;s Degree in Computer Science (minor in Mathematics) in December of 2008.  He&amp;#039;s been doing technical support for computers, printers, network connections and infrastructure, televisions, telephones, and server administration for four years, with another two years of programming.&lt;br /&gt;
&lt;br /&gt;
During his time at ISoft, Justin has:&lt;br /&gt;
* Written code for AX, Pro, Enterprise, and Presage&lt;br /&gt;
* Written web code for LX Warehouse, Presage Scanner, an auction lotting tool (and evaluated/debugged/made suggestions for other large production sites and tools)&lt;br /&gt;
* Written scripts for database updating, timed program checks, massive directory manipulation, bidirectional public key file exchanges&lt;br /&gt;
* Developed/Maintained internal tools (including Replikwando, a mysql tokenizer, a harebrained symmetrical encryption scheme, and a call tracker)&lt;br /&gt;
* Developed external GPL code that ISoft made use of (and made sure the code changes were public, of course):&lt;br /&gt;
** [https://code.launchpad.net/~isoft-data-systems/mysql-binlog-parser/trunk mysql-replication-listener]: Fixed a few bugs, added support for writing binlog statements out (so you can inline edit them!)&lt;br /&gt;
* Participated in the deployment, maintenance, and upkeep of more than a dozen production databases:&lt;br /&gt;
** CPU and Memory utilization&lt;br /&gt;
** Errand program debugging and correction&lt;br /&gt;
** Establishing, maintaining, and debugging networks on both ends of the performance spectrum (servers using erroring T1 lines is interesting)&lt;br /&gt;
* Enjoyed tons of (almost exclusively MySQL and sqlite) database shenanigans:&lt;br /&gt;
** Installing and configuring the servers and related programs&lt;br /&gt;
** Writing, debugging, optimizing, and tracking queries, stored procedures, functions, views&lt;br /&gt;
** Creating and implementing archiving and backup solutions&lt;br /&gt;
** Recovering &amp;#039;lost&amp;#039; data and restoring &amp;#039;lost&amp;#039; databases&lt;br /&gt;
* Created script files for nightly export of large (not terabyte-scale) data sets&lt;br /&gt;
* Learned Javascript from scratch well enough to do group project work within 48 hours&lt;br /&gt;
* Helped Support streamline and correct processes in an effort to keep things running smoothly (bless our Support staff!)&lt;br /&gt;
* Reviewed weekly error logs and reports, distilling recurring issues and relaying the problems and potential causes &amp;amp; solutions to the project managers&lt;br /&gt;
* Assisted in the execution of bi-monthly auction days by clerking, helping maintain data consistency and reporting, proving outcomes to customers, and providing post-auction statistics&lt;br /&gt;
* Created an inventory appraisal tool that (for auctions at least) has had a 5% margin of error for the past two years running&lt;br /&gt;
* Acted as backup System Administrator (mini-Brian, if you will), assisting in recovery from power and network outages, suffering HDD setups, poor network/hardware performance, and making tool recommendations on occasion&lt;br /&gt;
&lt;br /&gt;
And some other stuff. You know. ;)&lt;br /&gt;
&lt;br /&gt;
== Public Keys ==&lt;br /&gt;
* Keybase.io: A817266B53CD3F9AB144416C9ABC91ED61DE9BE0 (https://keybase.io/jmckinstry/key.asc)&lt;br /&gt;
* pgp.mit.edu: 9ABC91ED61DE9BE0 (https://pgp.mit.edu/pks/lookup?op=get&amp;amp;search=0x9ABC91ED61DE9BE0)&lt;br /&gt;
&lt;br /&gt;
== About Justin ==&lt;br /&gt;
While not being an extreme outdoorsman, Justin does like to hunt and fish.  Occasional hiking and biking also occur.  During the rest of his spare time, he enjoys reading, drumming, and playing Rock Band and other video games.  He also likes to write small programs using C/C++/javascript just for fun.&lt;br /&gt;
&lt;br /&gt;
He once fixed a mangled barcode with a pen and a steady hand.&lt;br /&gt;
&lt;br /&gt;
[[Category:ISoft Employees]]&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=Crash_Dumps&amp;diff=9649</id>
		<title>Crash Dumps</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=Crash_Dumps&amp;diff=9649"/>
		<updated>2016-09-13T19:20:58Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: Created page with &amp;quot;Crash dumps are large generated files when Windows is running a program that has an error that the program cannot survive. This large file contains the entire set of memory the p...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Crash dumps are large generated files when Windows is running a program that has an error that the program cannot survive. This large file contains the entire set of memory the program was using as it crashed, including both stack (the program&amp;#039;s running state) and heap (the generic RAM that&amp;#039;s being used for whatever purpose the program wanted), so depending on the program it can be MASSIVE.&lt;br /&gt;
&lt;br /&gt;
If these files are handed to a developer who knows the version of the program that was running, the dev can then see exactly what the program was doing at the time of the crash, which makes duplication of a crash substantially easier.&lt;br /&gt;
&lt;br /&gt;
Crash dumps are only generated if the machine is asked to generate them.&lt;br /&gt;
&lt;br /&gt;
=Generating Crash Dump Files=&lt;br /&gt;
These are enabled by creating a registry key for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps. There is no other way to turn on crash dumps, the user&amp;#039;s registry must be changed. After making this change, up to 10 full crash dumps will be left in the folder &amp;quot;%TEMP%\crash_dump&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
A crash dump will be made any time any program on the system crashes, and the dump will be named after the executable that crashed.&lt;br /&gt;
&lt;br /&gt;
Crashes that come from debug binaries (which are not normally given to customers) are much easier to debug than release binaries, but both can be used.&lt;br /&gt;
&lt;br /&gt;
A registry script file can be found at [https://svn.isoftdata.com/ITrack/trunk/Utility/Scripts/Crash%20Dumps/Enable%20Error%20Dumps.reg Enable Error Dumps.reg].&lt;br /&gt;
&lt;br /&gt;
=Disabling Crash Dumping=&lt;br /&gt;
Since dump files can be quite large, they should be turned off for normal clients once you have obtained what you need. This is done by removing the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps, and then deleting the crash dump folder (in our case, &amp;quot;%TEMP%\crash_dump&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
A registry script file can be found at [https://svn.isoftdata.com/ITrack/trunk/Utility/Scripts/Crash%20Dumps/Disable%20Error%20Dumps.reg Disable Error Dumps.reg].&lt;br /&gt;
&lt;br /&gt;
=Developer Usage=&lt;br /&gt;
When you receive a crash dump, Visual Studio makes it somewhat easy to dig through it. Just open the dump as a solution, and it will run as one. If Visual Studio can find the files on your machine to link up to what&amp;#039;s being seen in the crash dump, it will work just like a normal Debug run that has been paused at the time of crash.&lt;br /&gt;
&lt;br /&gt;
Crashes that come from debug binaries (which are not normally given to customers) are much easier to debug than release binaries, but both can be used.&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=File:MONYog_DiskInfo_Example.png&amp;diff=9197</id>
		<title>File:MONYog DiskInfo Example.png</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=File:MONYog_DiskInfo_Example.png&amp;diff=9197"/>
		<updated>2016-03-10T17:34:12Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=File:MONYog_Charts.png&amp;diff=9193</id>
		<title>File:MONYog Charts.png</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=File:MONYog_Charts.png&amp;diff=9193"/>
		<updated>2016-03-10T17:19:08Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=File:MONYog_Processlist.png&amp;diff=9191</id>
		<title>File:MONYog Processlist.png</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=File:MONYog_Processlist.png&amp;diff=9191"/>
		<updated>2016-03-10T16:58:41Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=File:MONYog_QueryAnalyzer.png&amp;diff=9189</id>
		<title>File:MONYog QueryAnalyzer.png</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=File:MONYog_QueryAnalyzer.png&amp;diff=9189"/>
		<updated>2016-03-10T16:52:51Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=File:MONYog_RealTime.png&amp;diff=9187</id>
		<title>File:MONYog RealTime.png</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=File:MONYog_RealTime.png&amp;diff=9187"/>
		<updated>2016-03-10T00:15:02Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=File:MONYog_bell.png&amp;diff=9185</id>
		<title>File:MONYog bell.png</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=File:MONYog_bell.png&amp;diff=9185"/>
		<updated>2016-03-09T23:59:06Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=File:Monyog_Server_List.png&amp;diff=9175</id>
		<title>File:Monyog Server List.png</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=File:Monyog_Server_List.png&amp;diff=9175"/>
		<updated>2016-03-04T23:46:39Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: A picture of what the Server List looks like and where to find it.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A picture of what the Server List looks like and where to find it.&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=Writing_MySQL_queries&amp;diff=9016</id>
		<title>Writing MySQL queries</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=Writing_MySQL_queries&amp;diff=9016"/>
		<updated>2016-01-25T17:29:35Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: Protected &amp;quot;Writing MySQL queries&amp;quot;: Duplicates internal documentation. Discussion with page admin is ongoing ([edit=sysop] (indefinite) [move=sysop] (indefinite))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Formatting ==&lt;br /&gt;
When writing queries for production (for use in code, or in reports) there are some steps you can take to make your queries easier to read.&lt;br /&gt;
&lt;br /&gt;
=== Case ===&lt;br /&gt;
Query text that references MySQL elements (basic query syntax, functions, etc) should be in all uppercase letters, while references to elements of a database structure should be in lowercase.  For example, instead of &lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
select PANTS from tableofstuff Where date(teh_date) = Now()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you would write &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT pants FROM tableofstuff WHERE DATE(teh_date) = NOW()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Backticks ===&lt;br /&gt;
When writing production queries, all references to database names, table names, column names, index names, etc should be enclosed in backticks.&lt;br /&gt;
&lt;br /&gt;
For example, instead of &lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT shit FROM creek&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you would write &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT `shit` FROM `creek`&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Newlines ===&lt;br /&gt;
Add a newline before every major part of the query (FROM, JOINs, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT).  i.e., instead of &lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT `butt_size`, `ugliness` FROM `mothers` WHERE `fat` = &amp;#039;True&amp;#039; ORDER BY `ugliness`&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
you would use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT `butt_size`, `ugliness` &lt;br /&gt;
FROM `mothers` &lt;br /&gt;
WHERE `fat` = &amp;#039;True&amp;#039; &lt;br /&gt;
ORDER BY `ugliness`&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Referencing table names ===&lt;br /&gt;
MySQL allows you to reference column names without specifying the table name, as long as the column name is not ambiguous in your query.  In other words, this: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT `hat` FROM `thing1` JOIN `thing2` ON `something` = `somethingelse`&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
is a valid query as long as `hat` is a column in either `thing1` or `thing2`, and not both.  The same goes for the columns `something` and `somethingelse` - they can only be in one of the tables involved in the query.&lt;br /&gt;
&lt;br /&gt;
However, the way you SHOULD write the query is like so: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT `thing1`.`hat` FROM `thing1` JOIN `thing2` ON `thing2`.`something` = `thing1`.`somethingelse`&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In large queries, it is MUCH easier to debug/comprehend queries that tell you the table names of all columns.  Also, if a `hat` column is added to the `thing2` table at some point in the future, the former query will produce an error, while the latter will continue working.&lt;br /&gt;
&lt;br /&gt;
=== Aliases ===&lt;br /&gt;
It is possible to give your tables aliases using the AS command, so that you can refer to them with an alternate name in a query.&lt;br /&gt;
&lt;br /&gt;
If you are joining a table to itself, it is necessary to give the table an alias at least once.&lt;br /&gt;
&lt;br /&gt;
However, in any other case, it is generally not a good idea in production code - when debugging large queries written by someone else, it&amp;#039;s generally a lot easier to figure out where the 20 columns in a SELECT are coming from if the correct table name is used, so you don&amp;#039;t have to figure out what &amp;quot;pl.name&amp;quot; is, or where &amp;quot;is.amount&amp;quot; might be in the database.&lt;br /&gt;
&lt;br /&gt;
== Things you just shouldn&amp;#039;t do ==&lt;br /&gt;
These are not suggestions.  If I catch you doing these things in reports or in code, I *will* find you, and inflict serious physical pain upon you.&lt;br /&gt;
&lt;br /&gt;
I am vigilant, and quick to anger when exposed to shoddy query-writing.  It&amp;#039;s not worth the risk.&lt;br /&gt;
&lt;br /&gt;
=== SELECT * ===&lt;br /&gt;
Sure, it&amp;#039;s fine for quick queries when you want to see what&amp;#039;s sitting in the database.  But when you&amp;#039;re writing queries for a product, just don&amp;#039;t do it.&lt;br /&gt;
&lt;br /&gt;
You should read this [http://parseerror.com/sql/select*isevil.html explanation] of why it&amp;#039;s a bad idea - or you could just take my word for it.  Whatever it takes to keep you from committing a query that will return an undefined number of rows.&lt;br /&gt;
&lt;br /&gt;
=== Reference a comma-separated list of tables ===&lt;br /&gt;
Much to my consternation, most introductions to query-writing seem to start off by showing you an example query like this:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT `table1`.`something`, `table2`.`something_else`&lt;br /&gt;
FROM `table1`, `table2`&lt;br /&gt;
WHERE `table1`.`key` = `table2`.`key`&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Which is perfectly valid SQL, to be sure - but it makes for poor queries, for 2 reasons:&lt;br /&gt;
* It&amp;#039;s often inefficient&lt;br /&gt;
* It takes more work to understand what&amp;#039;s happening in the query&lt;br /&gt;
&lt;br /&gt;
This is the sort of query you should be writing:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;MySQL&amp;quot;&amp;gt;&lt;br /&gt;
SELECT `table1`.`something`, `table2`.`something_else`&lt;br /&gt;
FROM `table1`&lt;br /&gt;
JOIN `table2` ON `table1`.`key` = `table2`.`key`&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== It&amp;#039;s more efficient ====&lt;br /&gt;
As rows from table2 are joined to table1, rows that do not match the requirements of the ON clause are dropped - in a query that references several tables, this is important.&lt;br /&gt;
&lt;br /&gt;
If all the relationships are defined in the WHERE clause, what happens is that MySQL builds a data set that contains the [http://en.wikipedia.org/wiki/Cartesian_product cartesian product] of all the tables and then narrows them down afterward using the WHERE clause.&lt;br /&gt;
&lt;br /&gt;
MySQL tries its best to do this intelligently, but why expect it to read your mind?  Write your JOINs so that after every single JOIN, the dataset will be as small as possible.&lt;br /&gt;
&lt;br /&gt;
==== It&amp;#039;s easier to read ====&lt;br /&gt;
Generally speaking, the tables that you join together will have an established relationship.  When you are reading a query, it should be easy to see how the different parts of it relate to each other.&lt;br /&gt;
&lt;br /&gt;
As long as every JOIN has an ON clause that defines its relationship to the previous tables, this should be the case.&lt;br /&gt;
&lt;br /&gt;
== Common traps ==&lt;br /&gt;
Over the history of ITrack, there have been hundreds of bugs fixed in reports, as well as the software itself, that were the result of a logical error in a query.&lt;br /&gt;
&lt;br /&gt;
By using what you know about the database structure, you should be able to write queries that you can guarantee will always return the correct number of results.  Here are some tips:&lt;br /&gt;
&lt;br /&gt;
=== Stupid table joins ===&lt;br /&gt;
Many of the queries you write will involve 2 tables that have a 1-to-1 or 1-to-many relationship with each other.&lt;br /&gt;
&lt;br /&gt;
This means that you have one table that holds a bunch of records, where each entry links to exactly 1 row in another table - for example, every record in an &amp;quot;inventory&amp;quot; table will have a relationship to a single &amp;quot;inventory type&amp;quot; record in another table.&lt;br /&gt;
&lt;br /&gt;
You may know that inventory records have an inventory type, and you will probably have to write a query that joins them together at least a few times.&lt;br /&gt;
&lt;br /&gt;
When that time comes, you may think to yourself &amp;quot;but how do I know which fields to use to join them together?  What will I be joining on?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Your first step should always be &amp;#039;&amp;#039;&amp;#039;LOOK AT THE PRIMARY KEY&amp;#039;&amp;#039;&amp;#039;.  If you&amp;#039;re joining the inventorytype table onto the inventory table, &amp;#039;&amp;#039;look at the primary key&amp;#039;&amp;#039; of the inventorytype table.  That way, you will know what fields are the bare minimum that must be referenced in your query.&lt;br /&gt;
&lt;br /&gt;
=== Confusing MySQL by treating numbers as strings ===&lt;br /&gt;
The short version: if you are dealing with numbers in MySQL, never enclose them in quotes.  The value &amp;#039;25&amp;#039; is different from the value 25.&lt;br /&gt;
&lt;br /&gt;
The longer version (which isn&amp;#039;t really that long, and you should totally read it right now) is [http://code.openark.org/blog/mysql/beware-of-implicit-casting well-explained by the smart Mr. Noach].&lt;br /&gt;
&lt;br /&gt;
=== Getting bad data when grouping and summarizing information ===&lt;br /&gt;
This is such an important topic that I have written an entire doc on it.&lt;br /&gt;
&lt;br /&gt;
Logical errors won&amp;#039;t stop your query from running, but they will result in bad data.  If you&amp;#039;re writing queries, you need to familiarize yourself with [[The GROUPing pitfall]].&lt;br /&gt;
&lt;br /&gt;
Seriously.  Logical errors in your queries will fuck you over.  Pay attention.&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=User:Jmckinstry&amp;diff=8639</id>
		<title>User:Jmckinstry</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=User:Jmckinstry&amp;diff=8639"/>
		<updated>2015-09-14T22:19:16Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: /* Education and Experience */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ISoft History ==&lt;br /&gt;
Justin was hired in March of 2009, where he began by learning the ins and outs of ITrack Pro and AX.&lt;br /&gt;
&lt;br /&gt;
Currently, he&amp;#039;s the main developer for ITrack AX, Replikwando, and a wide swath of tools both internal and external.  He also does development work on random projects as they come up, guides with tech support in their endeavors, and does his best to keep interdepartmental communications flowing smoothly.  Hats are changed frequently!&lt;br /&gt;
&lt;br /&gt;
== Education and Experience ==&lt;br /&gt;
Justin graduated with a Bachelor&amp;#039;s Degree in Computer Science (minor in Mathematics) in December of 2008.  He&amp;#039;s been doing technical support for computers, printers, network connections and infrastructure, televisions, telephones, and server administration for four years, with another two years of programming.&lt;br /&gt;
&lt;br /&gt;
During his time at ISoft, Justin has:&lt;br /&gt;
* Written code for AX, Pro, Enterprise, and Presage&lt;br /&gt;
* Written web code for LX Warehouse, Presage Scanner, an auction lotting tool (and evaluated/debugged/made suggestions for other large production sites and tools)&lt;br /&gt;
* Written scripts for database updating, timed program checks, massive directory manipulation, bidirectional public key file exchanges&lt;br /&gt;
* Developed/Maintained internal tools (including Replikwando, a mysql tokenizer, a harebrained symmetrical encryption scheme, and a call tracker)&lt;br /&gt;
* Developed external GPL code that ISoft made use of (and made sure the code changes were public, of course):&lt;br /&gt;
** [https://code.launchpad.net/~isoft-data-systems/mysql-binlog-parser/trunk mysql-replication-listener]: Fixed a few bugs, added support for writing binlog statements out (so you can inline edit them!)&lt;br /&gt;
* Participated in the deployment, maintenance, and upkeep of more than a dozen production databases:&lt;br /&gt;
** CPU and Memory utilization&lt;br /&gt;
** Errand program debugging and correction&lt;br /&gt;
** Establishing, maintaining, and debugging networks on both ends of the performance spectrum (servers using erroring T1 lines is interesting)&lt;br /&gt;
* Enjoyed tons of (almost exclusively MySQL and sqlite) database shenanigans:&lt;br /&gt;
** Installing and configuring the servers and related programs&lt;br /&gt;
** Writing, debugging, optimizing, and tracking queries, stored procedures, functions, views&lt;br /&gt;
** Creating and implementing archiving and backup solutions&lt;br /&gt;
** Recovering &amp;#039;lost&amp;#039; data and restoring &amp;#039;lost&amp;#039; databases&lt;br /&gt;
* Created script files for nightly export of large (not terabyte-scale) data sets&lt;br /&gt;
* Learned Javascript from scratch well enough to do group project work within 48 hours&lt;br /&gt;
* Helped Support streamline and correct processes in an effort to keep things running smoothly (bless our Support staff!)&lt;br /&gt;
* Assisted in the execution of bi-monthly auction days by clerking, helping maintain data consistency and reporting, proving outcomes to customers, and providing post-auction statistics&lt;br /&gt;
* Created an inventory appraisal tool that (for auctions at least) has had a 5% margin of error for the past two years running&lt;br /&gt;
&lt;br /&gt;
And some other stuff. You know. ;)&lt;br /&gt;
&lt;br /&gt;
== Public Keys ==&lt;br /&gt;
* Keybase.io: A817266B53CD3F9AB144416C9ABC91ED61DE9BE0 (https://keybase.io/jmckinstry/key.asc)&lt;br /&gt;
* pgp.mit.edu: 9ABC91ED61DE9BE0 (https://pgp.mit.edu/pks/lookup?op=get&amp;amp;search=0x9ABC91ED61DE9BE0)&lt;br /&gt;
&lt;br /&gt;
== About Justin ==&lt;br /&gt;
While not being an extreme outdoorsman, Justin does like to hunt and fish.  Occasional hiking and biking also occur.  During the rest of his spare time, he enjoys reading, drumming, and playing Rock Band and other video games.  He also likes to write small programs using C/C++/javascript just for fun.&lt;br /&gt;
&lt;br /&gt;
He once fixed a mangled barcode with a pen and a steady hand.&lt;br /&gt;
&lt;br /&gt;
[[Category:ISoft Employees]]&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=Replikwando_Messages&amp;diff=8549</id>
		<title>Replikwando Messages</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=Replikwando_Messages&amp;diff=8549"/>
		<updated>2015-08-06T19:54:40Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: /* Checking Who Has Repushed Recently */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Replikwando Messages=&lt;br /&gt;
Replikwando currently has a messaging back-end (using libITMySQLMessageFramework) that allows it to send and receive information.  While there are plans for implementing a GUI interface to do this (at which point this documentation will change to reflect that), these sections will get you by.&lt;br /&gt;
&lt;br /&gt;
==Usage Examples==&lt;br /&gt;
*[[Database:Replikwando_Message#Repush|Repushing]]&lt;br /&gt;
*[[Database:Replikwando_Message#Version%20Update|Update Version]]&lt;br /&gt;
*[[Database:Replikwando_Message#Status|Get Current Status]]&lt;br /&gt;
==Messages==&lt;br /&gt;
===REPLIKWANDO_MESSAGE_REPUSH===&lt;br /&gt;
Inputs&lt;br /&gt;
*RepushTime (seconds, int, optional) - When to restart.  If unspecified, Replikwando will choose&lt;br /&gt;
*PostBack (True/False, enum, optional) - Declares if a response is wanted back.  If unspecified, Replikwando will not respond&lt;br /&gt;
Outputs&lt;br /&gt;
*Success (True/False, enum) - If Replikwando will really restart&lt;br /&gt;
*Reason (error message, string, opt) - The reason Replikwando won&amp;#039;t be restarting, if any&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_RESTART===&lt;br /&gt;
Inputs&lt;br /&gt;
*PostBack (True/False, enum, optional) - Declares if a response is wanted back.  If unspecified, Replikwando will not respond&lt;br /&gt;
Outputs&lt;br /&gt;
*None&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_REQUEST_STATUS===&lt;br /&gt;
Inputs&lt;br /&gt;
*ReplikwandoDataObject (object name, string, optional) - The specific data you wish to get.  If unspecified, Replikwando will respond with a generic string.  See below for object values&lt;br /&gt;
Outputs&lt;br /&gt;
*Value (object value, string) - The object&amp;#039;s value, or a generic output if no object was specified&lt;br /&gt;
&lt;br /&gt;
====Object Values====&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_STARTED_AT        // Returns the date/time Replikwando started at&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_TOTAL_QUERIES     // Total queries executed&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_QUERIES_IN_MEMORY // Number of queries in memory currently&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_QUERIES_IN_TABLE  // Number of queries in the sqlite table&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_CURRENT_STATUS    // Replikwando&amp;#039;s current running status&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_CURRENT_ERROR     // Replikwando&amp;#039;s current stopping error.  Empty String if everything is okay (Not implemented yet)&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_REPUSH_TIME       // The time Replikwando will re-push.  Empty String if no repush is scheduled&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_MOST_RECENT_QUERY // The most recent query Replikwando has handled (includes both successful and failing queries, and is dependent on the state of Replikwando)&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_VERSION           // Replikwando&amp;#039;s static version&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_SKIP_QUERY===&lt;br /&gt;
Inputs&lt;br /&gt;
*PostBack (True/False, enum, optional) - Declares if a response is wanted back.  If unspecified, Replikwando will not respond&lt;br /&gt;
Outputs&lt;br /&gt;
*Success (True/False, enum) - True&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_FINISHED_REPUSH===&lt;br /&gt;
Inputs&lt;br /&gt;
*ToDatabase (table name, string) - The name of the database that had its data finish pushing&lt;br /&gt;
*ToConnection (connection name, string) - The name of the connection that the ToDatabase table can be found in&lt;br /&gt;
Outputs&lt;br /&gt;
*None&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_GET_INI===&lt;br /&gt;
Inputs&lt;br /&gt;
*None&lt;br /&gt;
Outputs&lt;br /&gt;
*Value (ini values, string) - The replication.ini file in all its glory.&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_GET_INI_VALUE===&lt;br /&gt;
Inputs&lt;br /&gt;
*Header (header, string) - The replication.ini value&amp;#039;s header&lt;br /&gt;
*Name (setting name, string) - The replication.ini value&amp;#039;s name&lt;br /&gt;
Outputs&lt;br /&gt;
*Found (True/False, enum) - True if the value was found, and Value will be set, False otherwise and Value will not be set&lt;br /&gt;
*Value (value, string, optional) - The replication.ini&amp;#039;s recorded value for [Header]Name, if any&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_SET_INI_VALUE===&lt;br /&gt;
Inputs&lt;br /&gt;
*Header (header, string) - The replication.ini value&amp;#039;s header&lt;br /&gt;
*Name (setting name, string) - The replication.ini value&amp;#039;s name&lt;br /&gt;
*Value (setting value, string) - The replication.ini value&amp;#039;s actual data&lt;br /&gt;
Outputs&lt;br /&gt;
*None&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_UPDATE===&lt;br /&gt;
Inputs&lt;br /&gt;
*Version (version, string) - The version of Replikwando that the file data represents&lt;br /&gt;
*IsService (True/False, enum) - True if the update included as Data is the service version&lt;br /&gt;
*Data (file data, blob) - The file data that makes up the file.  May be very large&lt;br /&gt;
Outputs&lt;br /&gt;
*None&lt;br /&gt;
&lt;br /&gt;
==Database Interaction==&lt;br /&gt;
The basic setup of a message being sent to replikwando goes like this:&lt;br /&gt;
#Initialize the message&lt;br /&gt;
#If the message requires inputs, add them&lt;br /&gt;
#Post the message&lt;br /&gt;
#If you expect a response, check v_responses until you get one&lt;br /&gt;
#Close the message if you wanted a response&lt;br /&gt;
&lt;br /&gt;
Here are some examples:&lt;br /&gt;
===Getting Status===&lt;br /&gt;
SELECT heartbeat.f_message_init(&amp;#039;&amp;lt;uuid_handle&amp;gt;&amp;#039;) INTO @messageID;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_post(@messageID, &amp;#039;REPLIKWANDO_MESSAGE_REQUEST_STATUS&amp;#039;, &amp;#039;False&amp;#039;, &amp;#039;True&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
SELECT * FROM heartbeat.v_responses where messageid = @messageID;&lt;br /&gt;
&lt;br /&gt;
===Getting Specific Status===&lt;br /&gt;
SELECT heartbeat.f_message_init(&amp;#039;&amp;lt;uuid_handle&amp;gt;&amp;#039;) INTO @messageID;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_attach_data(@messageID, &amp;#039;Input&amp;#039;, &amp;#039;ReplikwandoDataObject&amp;#039;, &amp;#039;REPLIKWANDO_STATUS_OBJECT_STARTED_AT&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_post(@messageID, &amp;#039;REPLIKWANDO_MESSAGE_REQUEST_STATUS&amp;#039;, &amp;#039;True&amp;#039;, &amp;#039;True&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
===Restarting Replikwando===&lt;br /&gt;
SELECT heartbeat.f_message_init(&amp;#039;&amp;lt;uuid_handle&amp;gt;&amp;#039;) INTO @messageID;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_post(@messageID, &amp;#039;REPLIKWANDO_MESSAGE_RESTART&amp;#039;, &amp;#039;False&amp;#039;, &amp;#039;False&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
===Updating Replikwando===&lt;br /&gt;
SELECT heartbeat.f_message_init(&amp;#039;&amp;lt;uuid_handle&amp;gt;&amp;#039;) INTO @messageID;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_attach_data(@messageID, &amp;#039;Input&amp;#039;, &amp;#039;Version&amp;#039;, &amp;#039;&amp;lt;version&amp;gt;&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_attach_data(@messageID, &amp;#039;Input&amp;#039;, &amp;#039;IsService&amp;#039;, &amp;#039;False&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
CREATE TEMPORARY TABLE t_update_data(`data` MEDIUMBLOB);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert the file blob data into `t_update_data`.`data`&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_attach_data(1446, &amp;#039;Input&amp;#039;, &amp;#039;Data&amp;#039;, `data`) FROM t_update_data;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_post(@messageID, &amp;#039;REPLIKWANDO_MESSAGE_UPDATE&amp;#039;, &amp;#039;True&amp;#039;, &amp;#039;False&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
===Checking Who Has Repushed Recently===&lt;br /&gt;
SELECT `timestamp`, `messagetype`, `value` AS `database`, `received` AS `watcher_has_received`, IF(`finished` IS NULL, &amp;#039;False&amp;#039;, &amp;#039;True&amp;#039;) AS `watcher_has_handled`&lt;br /&gt;
FROM heartbeat.message&lt;br /&gt;
LEFT JOIN messagedata USING (messageid)&lt;br /&gt;
WHERE `timestamp` &amp;gt; NOW() - INTERVAL 4 HOUR&lt;br /&gt;
	AND `messagetype` = &amp;#039;REPLIKWANDO_MESSAGE_FINISHED_REPUSH&amp;#039;&lt;br /&gt;
	AND `name` = &amp;#039;ToDatabase&amp;#039;&lt;br /&gt;
ORDER BY `timestamp` DESC;&lt;br /&gt;
&lt;br /&gt;
=Replikwando Statuses=&lt;br /&gt;
*OK: Replikwando believes everything is operating as intended.&lt;br /&gt;
*ErrorWaiting: Replikwando is still pushing data and reporting in, but it will need to repush when its scheduled time comes.&lt;br /&gt;
*Stopped: Replikwando has either been turned off at the local computer or has failed to report in for more than an hour.&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=Replikwando_Messages&amp;diff=8548</id>
		<title>Replikwando Messages</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=Replikwando_Messages&amp;diff=8548"/>
		<updated>2015-08-06T19:52:03Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: /* Database Interaction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Replikwando Messages=&lt;br /&gt;
Replikwando currently has a messaging back-end (using libITMySQLMessageFramework) that allows it to send and receive information.  While there are plans for implementing a GUI interface to do this (at which point this documentation will change to reflect that), these sections will get you by.&lt;br /&gt;
&lt;br /&gt;
==Usage Examples==&lt;br /&gt;
*[[Database:Replikwando_Message#Repush|Repushing]]&lt;br /&gt;
*[[Database:Replikwando_Message#Version%20Update|Update Version]]&lt;br /&gt;
*[[Database:Replikwando_Message#Status|Get Current Status]]&lt;br /&gt;
==Messages==&lt;br /&gt;
===REPLIKWANDO_MESSAGE_REPUSH===&lt;br /&gt;
Inputs&lt;br /&gt;
*RepushTime (seconds, int, optional) - When to restart.  If unspecified, Replikwando will choose&lt;br /&gt;
*PostBack (True/False, enum, optional) - Declares if a response is wanted back.  If unspecified, Replikwando will not respond&lt;br /&gt;
Outputs&lt;br /&gt;
*Success (True/False, enum) - If Replikwando will really restart&lt;br /&gt;
*Reason (error message, string, opt) - The reason Replikwando won&amp;#039;t be restarting, if any&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_RESTART===&lt;br /&gt;
Inputs&lt;br /&gt;
*PostBack (True/False, enum, optional) - Declares if a response is wanted back.  If unspecified, Replikwando will not respond&lt;br /&gt;
Outputs&lt;br /&gt;
*None&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_REQUEST_STATUS===&lt;br /&gt;
Inputs&lt;br /&gt;
*ReplikwandoDataObject (object name, string, optional) - The specific data you wish to get.  If unspecified, Replikwando will respond with a generic string.  See below for object values&lt;br /&gt;
Outputs&lt;br /&gt;
*Value (object value, string) - The object&amp;#039;s value, or a generic output if no object was specified&lt;br /&gt;
&lt;br /&gt;
====Object Values====&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_STARTED_AT        // Returns the date/time Replikwando started at&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_TOTAL_QUERIES     // Total queries executed&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_QUERIES_IN_MEMORY // Number of queries in memory currently&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_QUERIES_IN_TABLE  // Number of queries in the sqlite table&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_CURRENT_STATUS    // Replikwando&amp;#039;s current running status&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_CURRENT_ERROR     // Replikwando&amp;#039;s current stopping error.  Empty String if everything is okay (Not implemented yet)&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_REPUSH_TIME       // The time Replikwando will re-push.  Empty String if no repush is scheduled&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_MOST_RECENT_QUERY // The most recent query Replikwando has handled (includes both successful and failing queries, and is dependent on the state of Replikwando)&lt;br /&gt;
&lt;br /&gt;
REPLIKWANDO_STATUS_OBJECT_VERSION           // Replikwando&amp;#039;s static version&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_SKIP_QUERY===&lt;br /&gt;
Inputs&lt;br /&gt;
*PostBack (True/False, enum, optional) - Declares if a response is wanted back.  If unspecified, Replikwando will not respond&lt;br /&gt;
Outputs&lt;br /&gt;
*Success (True/False, enum) - True&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_FINISHED_REPUSH===&lt;br /&gt;
Inputs&lt;br /&gt;
*ToDatabase (table name, string) - The name of the database that had its data finish pushing&lt;br /&gt;
*ToConnection (connection name, string) - The name of the connection that the ToDatabase table can be found in&lt;br /&gt;
Outputs&lt;br /&gt;
*None&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_GET_INI===&lt;br /&gt;
Inputs&lt;br /&gt;
*None&lt;br /&gt;
Outputs&lt;br /&gt;
*Value (ini values, string) - The replication.ini file in all its glory.&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_GET_INI_VALUE===&lt;br /&gt;
Inputs&lt;br /&gt;
*Header (header, string) - The replication.ini value&amp;#039;s header&lt;br /&gt;
*Name (setting name, string) - The replication.ini value&amp;#039;s name&lt;br /&gt;
Outputs&lt;br /&gt;
*Found (True/False, enum) - True if the value was found, and Value will be set, False otherwise and Value will not be set&lt;br /&gt;
*Value (value, string, optional) - The replication.ini&amp;#039;s recorded value for [Header]Name, if any&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_SET_INI_VALUE===&lt;br /&gt;
Inputs&lt;br /&gt;
*Header (header, string) - The replication.ini value&amp;#039;s header&lt;br /&gt;
*Name (setting name, string) - The replication.ini value&amp;#039;s name&lt;br /&gt;
*Value (setting value, string) - The replication.ini value&amp;#039;s actual data&lt;br /&gt;
Outputs&lt;br /&gt;
*None&lt;br /&gt;
&lt;br /&gt;
===REPLIKWANDO_MESSAGE_UPDATE===&lt;br /&gt;
Inputs&lt;br /&gt;
*Version (version, string) - The version of Replikwando that the file data represents&lt;br /&gt;
*IsService (True/False, enum) - True if the update included as Data is the service version&lt;br /&gt;
*Data (file data, blob) - The file data that makes up the file.  May be very large&lt;br /&gt;
Outputs&lt;br /&gt;
*None&lt;br /&gt;
&lt;br /&gt;
==Database Interaction==&lt;br /&gt;
The basic setup of a message being sent to replikwando goes like this:&lt;br /&gt;
#Initialize the message&lt;br /&gt;
#If the message requires inputs, add them&lt;br /&gt;
#Post the message&lt;br /&gt;
#If you expect a response, check v_responses until you get one&lt;br /&gt;
#Close the message if you wanted a response&lt;br /&gt;
&lt;br /&gt;
Here are some examples:&lt;br /&gt;
===Getting Status===&lt;br /&gt;
SELECT heartbeat.f_message_init(&amp;#039;&amp;lt;uuid_handle&amp;gt;&amp;#039;) INTO @messageID;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_post(@messageID, &amp;#039;REPLIKWANDO_MESSAGE_REQUEST_STATUS&amp;#039;, &amp;#039;False&amp;#039;, &amp;#039;True&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
SELECT * FROM heartbeat.v_responses where messageid = @messageID;&lt;br /&gt;
&lt;br /&gt;
===Getting Specific Status===&lt;br /&gt;
SELECT heartbeat.f_message_init(&amp;#039;&amp;lt;uuid_handle&amp;gt;&amp;#039;) INTO @messageID;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_attach_data(@messageID, &amp;#039;Input&amp;#039;, &amp;#039;ReplikwandoDataObject&amp;#039;, &amp;#039;REPLIKWANDO_STATUS_OBJECT_STARTED_AT&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_post(@messageID, &amp;#039;REPLIKWANDO_MESSAGE_REQUEST_STATUS&amp;#039;, &amp;#039;True&amp;#039;, &amp;#039;True&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
===Restarting Replikwando===&lt;br /&gt;
SELECT heartbeat.f_message_init(&amp;#039;&amp;lt;uuid_handle&amp;gt;&amp;#039;) INTO @messageID;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_post(@messageID, &amp;#039;REPLIKWANDO_MESSAGE_RESTART&amp;#039;, &amp;#039;False&amp;#039;, &amp;#039;False&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
===Updating Replikwando===&lt;br /&gt;
SELECT heartbeat.f_message_init(&amp;#039;&amp;lt;uuid_handle&amp;gt;&amp;#039;) INTO @messageID;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_attach_data(@messageID, &amp;#039;Input&amp;#039;, &amp;#039;Version&amp;#039;, &amp;#039;&amp;lt;version&amp;gt;&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_attach_data(@messageID, &amp;#039;Input&amp;#039;, &amp;#039;IsService&amp;#039;, &amp;#039;False&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
CREATE TEMPORARY TABLE t_update_data(`data` MEDIUMBLOB);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;insert the file blob data into `t_update_data`.`data`&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_attach_data(1446, &amp;#039;Input&amp;#039;, &amp;#039;Data&amp;#039;, `data`) FROM t_update_data;&lt;br /&gt;
&lt;br /&gt;
SELECT heartbeat.f_message_post(@messageID, &amp;#039;REPLIKWANDO_MESSAGE_UPDATE&amp;#039;, &amp;#039;True&amp;#039;, &amp;#039;False&amp;#039;);&lt;br /&gt;
&lt;br /&gt;
===Checking Who Has Repushed Recently===&lt;br /&gt;
SELECT *&lt;br /&gt;
FROM heartbeat.message&lt;br /&gt;
LEFT JOIN messagedata USING (messageid)&lt;br /&gt;
WHERE `timestamp` &amp;gt; NOW() - INTERVAL 4 HOUR&lt;br /&gt;
	AND `messagetype` = &amp;#039;REPLIKWANDO_MESSAGE_FINISHED_REPUSH&amp;#039;&lt;br /&gt;
	AND `name` = &amp;#039;ToDatabase&amp;#039;&lt;br /&gt;
ORDER BY `timestamp` DESC;&lt;br /&gt;
&lt;br /&gt;
=Replikwando Statuses=&lt;br /&gt;
*OK: Replikwando believes everything is operating as intended.&lt;br /&gt;
*ErrorWaiting: Replikwando is still pushing data and reporting in, but it will need to repush when its scheduled time comes.&lt;br /&gt;
*Stopped: Replikwando has either been turned off at the local computer or has failed to report in for more than an hour.&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=Known_Replikwando_Errors&amp;diff=8547</id>
		<title>Known Replikwando Errors</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=Known_Replikwando_Errors&amp;diff=8547"/>
		<updated>2015-08-06T18:29:56Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: /* Bad Behavior */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Errors in Replikwando ==&lt;br /&gt;
Replikwando is made to handle inconsistent internet connections, MySQL databases that get shut off randomly, and things like that.  However, sometimes things happen that Replikwando isn&amp;#039;t able to handle automatically in a smart fashion.  It uses error logs to tell the administrator when something odd has come up and should probably be looked into.&lt;br /&gt;
&lt;br /&gt;
This wiki page is meant to help explain what the different errors are, as well as what needs to be done to handle them (or if they can be safely ignored).&lt;br /&gt;
&lt;br /&gt;
== Error Logs ==&lt;br /&gt;
=== FromConnectionError Log ===&lt;br /&gt;
This error log contains errors and warnings coming from the company&amp;#039;s local database.&lt;br /&gt;
&lt;br /&gt;
==== Lost Connection To The Database ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando wasn&amp;#039;t able to see the local database.  This can happen if the MySQL service is stopped or restarted, or if the process was too busy to respond for a moment, or if the network connection to the server host quit working for a moment (if the MySQL server isn&amp;#039;t hosted locally).&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando is built so that things like this can happen.  Therefore, it&amp;#039;s safe to ignore this error.  Replikwando will just reconnect to the database when it comes back.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Similar Errors&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
MySQL Server Has Gone Away&lt;br /&gt;
&lt;br /&gt;
==== The Following Query Was Reported And Skipped ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Someone enabled the skip-query interface for replikwando and then told it to skip a query.  The query is then logged in the error log to record what was skipped in case the administrator needs to go back and evaluate it.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error can be ignored, as it is purely for informational purposes.&lt;br /&gt;
&lt;br /&gt;
=== ToConnectionError Log ===&lt;br /&gt;
This error log contains errors generated from interacting with the remote MySQL database.&lt;br /&gt;
&lt;br /&gt;
==== Lost Connection To The Database ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando wasn&amp;#039;t able to see the remote database.  This can happen if the MySQL service is stopped or restarted, or if the process was too busy to respond for a moment, or if the internet connection for the site drops.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando is built so that things like this can happen.  Therefore, it&amp;#039;s safe to ignore this error.  Replikwando will just reconnect to the database when it comes back.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Similar Errors&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
MySQL Server Has Gone Away&lt;br /&gt;
&lt;br /&gt;
==== Duplicate Key ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error means that it tried to push a key to the remote database, but it already had the values being specified.  This is normally caused by a query that gets sent, is received by the server, but the server reply just doesn&amp;#039;t get back to Replikwando before it tries again.  That means that if the remote server goes down or the internet connection is interrupted for even a moment, this can occur.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
It is safe to ignore this error.&lt;br /&gt;
Newer versions no longer halt on this error, as it is indicative of the data already being on the remote server.&lt;br /&gt;
&lt;br /&gt;
==== There is no &amp;#039;*&amp;#039;%&amp;#039; registered ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error occurs when the remote server is asked to run a stored procedure (like a function or trigger), but the user who created it or is defined as the executor no longer exists.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do not need to stop Replikwando to fix this issue.&lt;br /&gt;
Dump the functions from the remote database into a text file, find-and-replace all instances of the obsoleted name with the name of a valid user, and re-insert them.&lt;br /&gt;
&lt;br /&gt;
=== QueueConnectionError Log ===&lt;br /&gt;
&lt;br /&gt;
==== Cannot find file: &amp;lt;path&amp;gt;&amp;lt;something.bin&amp;gt; ====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This message appears when Replikwando cannot locate the data file. Replication.ini is probably pointing to the wrong location.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Open the company&amp;#039;s SQLYOG and run this query:&lt;br /&gt;
&amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;&lt;br /&gt;
SHOW VARIABLES LIKE &amp;#039;%data%&amp;#039;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The results list should show you the path to where MySQL looks for the data file. Edit replication.ini and set the binlog path to where SQLYOG says the data file is located.&lt;br /&gt;
&lt;br /&gt;
==== Database Is Locked ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error occurs when one thread/process/person is writing into the SQLite database file while another is trying to use it.  It means that whatever got the error wasn&amp;#039;t able to query the table or write data into it.  It&amp;#039;s most common to see this error when an administrator is running queries against the SQLite database file while Replikwando is running (which is safe to do, but it can get annoying having to run your query more than once).&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
It is safe to ignore this error.&lt;br /&gt;
Replikwando does not halt on this error; it just tries to do what it was doing again, until it succeeds.&lt;br /&gt;
This error should no longer occur (a spinlock was implemented to resolve it).&lt;br /&gt;
&lt;br /&gt;
==== Failed to get the last binlog position ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This warning occurs when Replikwando looks for where it left off last time in your binary log, but can&amp;#039;t find an entry.  This is NORMAL to see when you&amp;#039;re starting up a new session (no LocalQueueFile.sqlite file).  If you see it during normal execution, something bad happened to the binary logging.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
It is safe to ignore this error if you see it when running a new instance of Replikwando.  If it happens during normal operation, you should check to see that&lt;br /&gt;
**MySQL server binary logging is enabled&lt;br /&gt;
**The internal MySQL tables that handle logging aren&amp;#039;t corrupted (use the query &amp;#039;SHOW BINARY LOGS&amp;#039; to verify)&lt;br /&gt;
**The binary log files haven&amp;#039;t been moved or something&lt;br /&gt;
&lt;br /&gt;
== Bad Behavior ==&lt;br /&gt;
===Repushing===&lt;br /&gt;
====Repush finishes, but no record is left in the messages table, so it never resyncs====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If errors occur during repush, Replikwando refuses to notify HTP that the database should be synced, or else data would be lost.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Correct whatever is causing the errors during repush.&lt;br /&gt;
&lt;br /&gt;
As of 1.8.0, the following error will show when this problem occurs: &amp;quot;Repush failed! No message sent to Heartbeat; Database will not sync to HTP!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Tables and views push, but functions and procedures are missing ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This issue occurs when Replikwando does not have permission to SELECT from mysql.proc.  See [http://dev.mysql.com/doc/refman/5.0/en/show-create-procedure.html this MySQL doc page] for more information.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando must be given SELECT privs to mysql.proc.  This table shows functions and procedures associated with all databases on a server, but cannot be altered unless you for some reason give the Replikwando user UPDATE status.  Just don&amp;#039;t do that :)&lt;br /&gt;
&lt;br /&gt;
====Replikwando2.exe sits at &amp;quot;Waiting for Active Thread&amp;quot; and never begins a repush====&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*The client&amp;#039;s database has crashed.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Delete and re-create the client&amp;#039;s database on our side.&lt;br /&gt;
&lt;br /&gt;
==== Replikwando runs and seems to work right, but dies during repushes ====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*MySQL Server version is higher than &amp;lt;replikwando_install_folder&amp;gt;/bin/mysqlbinlog.exe (ie: server is 5.6, mysqlbinlog.exe is 5.5)&lt;br /&gt;
**The ToConnection log will show that queries are getting mangled during the repush.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Update &amp;lt;replikwando_install_folder&amp;gt;/bin/mysqlbinlog.exe with a newer version&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
==== Replikwando2 (the gui version) &amp;#039;works&amp;#039;, but ReplikwandoService doesn&amp;#039;t ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;It doesn&amp;#039;t work&amp;#039; isn&amp;#039;t a working description of an error.&lt;br /&gt;
This problem has several manifestations:&lt;br /&gt;
* ReplikwandoService immediately exits without even getting started&lt;br /&gt;
* ReplikwandoService starts, but won&amp;#039;t repush&lt;br /&gt;
* Repushing works, but keeping up-to-date does not&lt;br /&gt;
* ReplikwandoService will not install&lt;br /&gt;
&lt;br /&gt;
There are a whole bunch of things that could cause this.&lt;br /&gt;
* The service might be running under a user that doesn&amp;#039;t have permissions/access to necessary files&lt;br /&gt;
* File permissions are screwed up&lt;br /&gt;
* Files became corrupted after Replikwando2 got started&lt;br /&gt;
* Magical kernel-level call interception&lt;br /&gt;
* Firewall exceptions exist for one executable or the other&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Make sure the user account being used to run ReplikwandoService has access to all necessary files&lt;br /&gt;
* Turn off antivirus (or, even better, add Replikwandoservice to the whitelist for the AV)&lt;br /&gt;
* Make sure there are entries in any running firewall program&lt;br /&gt;
&lt;br /&gt;
==== Replikwando2 successfully re-pushes, but then pushes tons of junk data ====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible cause&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Replikwando is not using the correct mysqlbinlog.exe file.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Change replication.ini&amp;#039;s [fromserver].mysqlbinpath to be the same bin path that the MySQL instance is running&lt;br /&gt;
**Windows: This query will tell you where to look for the right bin folder: &amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;SHOW VARIABLES LIKE &amp;#039;basedir&amp;#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
**Linux: The Replikwando install creates a bin/mysql/mysqlbinlog.exe entry that you should point to&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible cause&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The client&amp;#039;s binlog file is corrupted. &lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Run this query in their SQLYOG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;&lt;br /&gt;
SHOW BINARY LOGS;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you see any of the following, the binary log is corrupt:&lt;br /&gt;
*Binlog names are inconsistent (&amp;#039;mysqlbinlog-000001.bin&amp;#039;, &amp;#039;servername-000001.bin&amp;#039; in the same list)&lt;br /&gt;
*Binlog names repeat (seeing &amp;#039;mysqlbinlog-000001.bin&amp;#039;,&amp;#039;mysqlbinlog-000001.bin&amp;#039;,&amp;#039;mysqlbinlog-000001.bin&amp;#039; repeated over and over and the file sizes are identical)&lt;br /&gt;
&lt;br /&gt;
*First, make a backup of the client&amp;#039;s entire ITrack database, in case something terrible happens.&lt;br /&gt;
&lt;br /&gt;
*Next, run this query in the client&amp;#039;s SQLYOG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;&lt;br /&gt;
RESET MASTER;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now be able to have Replikwando successfully re-push the client&amp;#039;s data with normal replication afterwards.&lt;br /&gt;
&lt;br /&gt;
====Server is full of mysqlbinlog.exe instances====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Replikwando has lost the handle to mysqlbinlog.exe.&lt;br /&gt;
**It is unknown why this happens, but is a system-level issue.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Kill all but the most recent instance of mysqlbinlog.exe.  Replikwando spawns these regularly, so if a mysqlbinlog.exe process has been around for awhile and is not changing, it&amp;#039;s probably safe to kill it.&lt;br /&gt;
**Do NOT kill an active mysqlbinlog.exe!  Replikwando is actively receiving data from it, and things can go horribly wrong if you kill it!&lt;br /&gt;
*A more permanent resolution is to use a different spawning method (we currently use ::CreateProcess).  I believe (but may be wrong) that this issue occurs because ::CreateProcess returns COULDNT_CREATE_PROCESS or something like that, even though the process is made.  It could also be an error in the handling of the closing of a windows-based thread, both of which should be investigated.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Potentially Resolved&amp;#039;&amp;#039;&amp;#039; in 1.8.0.&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=Known_Replikwando_Errors&amp;diff=8546</id>
		<title>Known Replikwando Errors</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=Known_Replikwando_Errors&amp;diff=8546"/>
		<updated>2015-08-06T18:28:27Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: /* Bad Behavior */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Errors in Replikwando ==&lt;br /&gt;
Replikwando is made to handle inconsistent internet connections, MySQL databases that get shut off randomly, and things like that.  However, sometimes things happen that Replikwando isn&amp;#039;t able to handle automatically in a smart fashion.  It uses error logs to tell the administrator when something odd has come up and should probably be looked into.&lt;br /&gt;
&lt;br /&gt;
This wiki page is meant to help explain what the different errors are, as well as what needs to be done to handle them (or if they can be safely ignored).&lt;br /&gt;
&lt;br /&gt;
== Error Logs ==&lt;br /&gt;
=== FromConnectionError Log ===&lt;br /&gt;
This error log contains errors and warnings coming from the company&amp;#039;s local database.&lt;br /&gt;
&lt;br /&gt;
==== Lost Connection To The Database ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando wasn&amp;#039;t able to see the local database.  This can happen if the MySQL service is stopped or restarted, or if the process was too busy to respond for a moment, or if the network connection to the server host quit working for a moment (if the MySQL server isn&amp;#039;t hosted locally).&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando is built so that things like this can happen.  Therefore, it&amp;#039;s safe to ignore this error.  Replikwando will just reconnect to the database when it comes back.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Similar Errors&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
MySQL Server Has Gone Away&lt;br /&gt;
&lt;br /&gt;
==== The Following Query Was Reported And Skipped ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Someone enabled the skip-query interface for replikwando and then told it to skip a query.  The query is then logged in the error log to record what was skipped in case the administrator needs to go back and evaluate it.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error can be ignored, as it is purely for informational purposes.&lt;br /&gt;
&lt;br /&gt;
=== ToConnectionError Log ===&lt;br /&gt;
This error log contains errors generated from interacting with the remote MySQL database.&lt;br /&gt;
&lt;br /&gt;
==== Lost Connection To The Database ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando wasn&amp;#039;t able to see the remote database.  This can happen if the MySQL service is stopped or restarted, or if the process was too busy to respond for a moment, or if the internet connection for the site drops.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando is built so that things like this can happen.  Therefore, it&amp;#039;s safe to ignore this error.  Replikwando will just reconnect to the database when it comes back.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Similar Errors&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
MySQL Server Has Gone Away&lt;br /&gt;
&lt;br /&gt;
==== Duplicate Key ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error means that it tried to push a key to the remote database, but it already had the values being specified.  This is normally caused by a query that gets sent, is received by the server, but the server reply just doesn&amp;#039;t get back to Replikwando before it tries again.  That means that if the remote server goes down or the internet connection is interrupted for even a moment, this can occur.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
It is safe to ignore this error.&lt;br /&gt;
Newer versions no longer halt on this error, as it is indicative of the data already being on the remote server.&lt;br /&gt;
&lt;br /&gt;
==== There is no &amp;#039;*&amp;#039;%&amp;#039; registered ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error occurs when the remote server is asked to run a stored procedure (like a function or trigger), but the user who created it or is defined as the executor no longer exists.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do not need to stop Replikwando to fix this issue.&lt;br /&gt;
Dump the functions from the remote database into a text file, find-and-replace all instances of the obsoleted name with the name of a valid user, and re-insert them.&lt;br /&gt;
&lt;br /&gt;
=== QueueConnectionError Log ===&lt;br /&gt;
&lt;br /&gt;
==== Cannot find file: &amp;lt;path&amp;gt;&amp;lt;something.bin&amp;gt; ====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This message appears when Replikwando cannot locate the data file. Replication.ini is probably pointing to the wrong location.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Open the company&amp;#039;s SQLYOG and run this query:&lt;br /&gt;
&amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;&lt;br /&gt;
SHOW VARIABLES LIKE &amp;#039;%data%&amp;#039;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The results list should show you the path to where MySQL looks for the data file. Edit replication.ini and set the binlog path to where SQLYOG says the data file is located.&lt;br /&gt;
&lt;br /&gt;
==== Database Is Locked ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error occurs when one thread/process/person is writing into the SQLite database file while another is trying to use it.  It means that whatever got the error wasn&amp;#039;t able to query the table or write data into it.  It&amp;#039;s most common to see this error when an administrator is running queries against the SQLite database file while Replikwando is running (which is safe to do, but it can get annoying having to run your query more than once).&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
It is safe to ignore this error.&lt;br /&gt;
Replikwando does not halt on this error; it just tries to do what it was doing again, until it succeeds.&lt;br /&gt;
This error should no longer occur (a spinlock was implemented to resolve it).&lt;br /&gt;
&lt;br /&gt;
==== Failed to get the last binlog position ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This warning occurs when Replikwando looks for where it left off last time in your binary log, but can&amp;#039;t find an entry.  This is NORMAL to see when you&amp;#039;re starting up a new session (no LocalQueueFile.sqlite file).  If you see it during normal execution, something bad happened to the binary logging.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
It is safe to ignore this error if you see it when running a new instance of Replikwando.  If it happens during normal operation, you should check to see that&lt;br /&gt;
**MySQL server binary logging is enabled&lt;br /&gt;
**The internal MySQL tables that handle logging aren&amp;#039;t corrupted (use the query &amp;#039;SHOW BINARY LOGS&amp;#039; to verify)&lt;br /&gt;
**The binary log files haven&amp;#039;t been moved or something&lt;br /&gt;
&lt;br /&gt;
== Bad Behavior ==&lt;br /&gt;
===Repushing===&lt;br /&gt;
====Repush finishes, but no record is left in the messages table, so it never resyncs====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If errors occur during repush, Replikwando refuses to notify HTP that the database should be synced, or else data would be lost.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Correct whatever is causing the errors during repush.&lt;br /&gt;
&lt;br /&gt;
As of 1.8.0, the following error will show when this problem occurs: &amp;quot;Repush failed! No message sent to Heartbeat; Database will not sync to HTP!&amp;quot;&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
==== Tables and views push, but functions and procedures are missing ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This issue occurs when Replikwando does not have permission to SELECT from mysql.proc.  See [http://dev.mysql.com/doc/refman/5.0/en/show-create-procedure.html this MySQL doc page] for more information.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando must be given SELECT privs to mysql.proc.  This table shows functions and procedures associated with all databases on a server, but cannot be altered unless you for some reason give the Replikwando user UPDATE status.  Just don&amp;#039;t do that :)&lt;br /&gt;
&lt;br /&gt;
==== Replikwando2 (the gui version) &amp;#039;works&amp;#039;, but ReplikwandoService doesn&amp;#039;t ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;It doesn&amp;#039;t work&amp;#039; isn&amp;#039;t a working description of an error.&lt;br /&gt;
This problem has several manifestations:&lt;br /&gt;
* ReplikwandoService immediately exits without even getting started&lt;br /&gt;
* ReplikwandoService starts, but won&amp;#039;t repush&lt;br /&gt;
* Repushing works, but keeping up-to-date does not&lt;br /&gt;
* ReplikwandoService will not install&lt;br /&gt;
&lt;br /&gt;
There are a whole bunch of things that could cause this.&lt;br /&gt;
* The service might be running under a user that doesn&amp;#039;t have permissions/access to necessary files&lt;br /&gt;
* File permissions are screwed up&lt;br /&gt;
* Files became corrupted after Replikwando2 got started&lt;br /&gt;
* Magical kernel-level call interception&lt;br /&gt;
* Firewall exceptions exist for one executable or the other&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Make sure the user account being used to run ReplikwandoService has access to all necessary files&lt;br /&gt;
* Turn off antivirus (or, even better, add Replikwandoservice to the whitelist for the AV)&lt;br /&gt;
* Make sure there are entries in any running firewall program&lt;br /&gt;
&lt;br /&gt;
==== Replikwando2 successfully re-pushes, but then pushes tons of junk data ====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible cause&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Replikwando is not using the correct mysqlbinlog.exe file.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Change replication.ini&amp;#039;s [fromserver].mysqlbinpath to be the same bin path that the MySQL instance is running&lt;br /&gt;
**Windows: This query will tell you where to look for the right bin folder: &amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;SHOW VARIABLES LIKE &amp;#039;basedir&amp;#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
**Linux: The Replikwando install creates a bin/mysql/mysqlbinlog.exe entry that you should point to&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible cause&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The client&amp;#039;s binlog file is corrupted. &lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Run this query in their SQLYOG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;&lt;br /&gt;
SHOW BINARY LOGS;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you see any of the following, the binary log is corrupt:&lt;br /&gt;
*Binlog names are inconsistent (&amp;#039;mysqlbinlog-000001.bin&amp;#039;, &amp;#039;servername-000001.bin&amp;#039; in the same list)&lt;br /&gt;
*Binlog names repeat (seeing &amp;#039;mysqlbinlog-000001.bin&amp;#039;,&amp;#039;mysqlbinlog-000001.bin&amp;#039;,&amp;#039;mysqlbinlog-000001.bin&amp;#039; repeated over and over and the file sizes are identical)&lt;br /&gt;
&lt;br /&gt;
*First, make a backup of the client&amp;#039;s entire ITrack database, in case something terrible happens.&lt;br /&gt;
&lt;br /&gt;
*Next, run this query in the client&amp;#039;s SQLYOG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;&lt;br /&gt;
RESET MASTER;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now be able to have Replikwando successfully re-push the client&amp;#039;s data with normal replication afterwards.&lt;br /&gt;
&lt;br /&gt;
====Replikwando2.exe sits at &amp;quot;Waiting for Active Thread&amp;quot; and never begins a repush====&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*The client&amp;#039;s database has crashed.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Delete and re-create the client&amp;#039;s database on our side.&lt;br /&gt;
&lt;br /&gt;
====Server is full of mysqlbinlog.exe instances====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Replikwando has lost the handle to mysqlbinlog.exe.&lt;br /&gt;
**It is unknown why this happens, but is a system-level issue.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Kill all but the most recent instance of mysqlbinlog.exe.  Replikwando spawns these regularly, so if a mysqlbinlog.exe process has been around for awhile and is not changing, it&amp;#039;s probably safe to kill it.&lt;br /&gt;
**Do NOT kill an active mysqlbinlog.exe!  Replikwando is actively receiving data from it, and things can go horribly wrong if you kill it!&lt;br /&gt;
*A more permanent resolution is to use a different spawning method (we currently use ::CreateProcess).  I believe (but may be wrong) that this issue occurs because ::CreateProcess returns COULDNT_CREATE_PROCESS or something like that, even though the process is made.  It could also be an error in the handling of the closing of a windows-based thread, both of which should be investigated.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Potentially Resolved&amp;#039;&amp;#039;&amp;#039; in 1.8.0.&lt;br /&gt;
&lt;br /&gt;
==== Replikwando runs and seems to work right, but dies during repushes ====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*MySQL Server version is higher than &amp;lt;replikwando_install_folder&amp;gt;/bin/mysqlbinlog.exe (ie: server is 5.6, mysqlbinlog.exe is 5.5)&lt;br /&gt;
**The ToConnection log will show that queries are getting mangled during the repush.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Update &amp;lt;replikwando_install_folder&amp;gt;/bin/mysqlbinlog.exe with a newer version&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=Known_Replikwando_Errors&amp;diff=8545</id>
		<title>Known Replikwando Errors</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=Known_Replikwando_Errors&amp;diff=8545"/>
		<updated>2015-08-06T18:20:20Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: /* Server is full of mysqlbinlog.exe instances */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Errors in Replikwando ==&lt;br /&gt;
Replikwando is made to handle inconsistent internet connections, MySQL databases that get shut off randomly, and things like that.  However, sometimes things happen that Replikwando isn&amp;#039;t able to handle automatically in a smart fashion.  It uses error logs to tell the administrator when something odd has come up and should probably be looked into.&lt;br /&gt;
&lt;br /&gt;
This wiki page is meant to help explain what the different errors are, as well as what needs to be done to handle them (or if they can be safely ignored).&lt;br /&gt;
&lt;br /&gt;
== Error Logs ==&lt;br /&gt;
=== FromConnectionError Log ===&lt;br /&gt;
This error log contains errors and warnings coming from the company&amp;#039;s local database.&lt;br /&gt;
&lt;br /&gt;
==== Lost Connection To The Database ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando wasn&amp;#039;t able to see the local database.  This can happen if the MySQL service is stopped or restarted, or if the process was too busy to respond for a moment, or if the network connection to the server host quit working for a moment (if the MySQL server isn&amp;#039;t hosted locally).&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando is built so that things like this can happen.  Therefore, it&amp;#039;s safe to ignore this error.  Replikwando will just reconnect to the database when it comes back.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Similar Errors&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
MySQL Server Has Gone Away&lt;br /&gt;
&lt;br /&gt;
==== The Following Query Was Reported And Skipped ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Someone enabled the skip-query interface for replikwando and then told it to skip a query.  The query is then logged in the error log to record what was skipped in case the administrator needs to go back and evaluate it.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error can be ignored, as it is purely for informational purposes.&lt;br /&gt;
&lt;br /&gt;
=== ToConnectionError Log ===&lt;br /&gt;
This error log contains errors generated from interacting with the remote MySQL database.&lt;br /&gt;
&lt;br /&gt;
==== Lost Connection To The Database ====&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando wasn&amp;#039;t able to see the remote database.  This can happen if the MySQL service is stopped or restarted, or if the process was too busy to respond for a moment, or if the internet connection for the site drops.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando is built so that things like this can happen.  Therefore, it&amp;#039;s safe to ignore this error.  Replikwando will just reconnect to the database when it comes back.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Similar Errors&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
MySQL Server Has Gone Away&lt;br /&gt;
&lt;br /&gt;
==== Duplicate Key ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error means that it tried to push a key to the remote database, but it already had the values being specified.  This is normally caused by a query that gets sent, is received by the server, but the server reply just doesn&amp;#039;t get back to Replikwando before it tries again.  That means that if the remote server goes down or the internet connection is interrupted for even a moment, this can occur.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
It is safe to ignore this error.&lt;br /&gt;
Newer versions no longer halt on this error, as it is indicative of the data already being on the remote server.&lt;br /&gt;
&lt;br /&gt;
==== There is no &amp;#039;*&amp;#039;%&amp;#039; registered ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error occurs when the remote server is asked to run a stored procedure (like a function or trigger), but the user who created it or is defined as the executor no longer exists.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
You do not need to stop Replikwando to fix this issue.&lt;br /&gt;
Dump the functions from the remote database into a text file, find-and-replace all instances of the obsoleted name with the name of a valid user, and re-insert them.&lt;br /&gt;
&lt;br /&gt;
=== QueueConnectionError Log ===&lt;br /&gt;
&lt;br /&gt;
==== Cannot find file: &amp;lt;path&amp;gt;&amp;lt;something.bin&amp;gt; ====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This message appears when Replikwando cannot locate the data file. Replication.ini is probably pointing to the wrong location.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Open the company&amp;#039;s SQLYOG and run this query:&lt;br /&gt;
&amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;&lt;br /&gt;
SHOW VARIABLES LIKE &amp;#039;%data%&amp;#039;;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The results list should show you the path to where MySQL looks for the data file. Edit replication.ini and set the binlog path to where SQLYOG says the data file is located.&lt;br /&gt;
&lt;br /&gt;
==== Database Is Locked ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This error occurs when one thread/process/person is writing into the SQLite database file while another is trying to use it.  It means that whatever got the error wasn&amp;#039;t able to query the table or write data into it.  It&amp;#039;s most common to see this error when an administrator is running queries against the SQLite database file while Replikwando is running (which is safe to do, but it can get annoying having to run your query more than once).&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
It is safe to ignore this error.&lt;br /&gt;
Replikwando does not halt on this error; it just tries to do what it was doing again, until it succeeds.&lt;br /&gt;
This error should no longer occur (a spinlock was implemented to resolve it).&lt;br /&gt;
&lt;br /&gt;
==== Failed to get the last binlog position ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This warning occurs when Replikwando looks for where it left off last time in your binary log, but can&amp;#039;t find an entry.  This is NORMAL to see when you&amp;#039;re starting up a new session (no LocalQueueFile.sqlite file).  If you see it during normal execution, something bad happened to the binary logging.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
It is safe to ignore this error if you see it when running a new instance of Replikwando.  If it happens during normal operation, you should check to see that&lt;br /&gt;
**MySQL server binary logging is enabled&lt;br /&gt;
**The internal MySQL tables that handle logging aren&amp;#039;t corrupted (use the query &amp;#039;SHOW BINARY LOGS&amp;#039; to verify)&lt;br /&gt;
**The binary log files haven&amp;#039;t been moved or something&lt;br /&gt;
&lt;br /&gt;
== Bad Behavior ==&lt;br /&gt;
==== Tables and views push, but functions and procedures are missing ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This issue occurs when Replikwando does not have permission to SELECT from mysql.proc.  See [http://dev.mysql.com/doc/refman/5.0/en/show-create-procedure.html this MySQL doc page] for more information.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Replikwando must be given SELECT privs to mysql.proc.  This table shows functions and procedures associated with all databases on a server, but cannot be altered unless you for some reason give the Replikwando user UPDATE status.  Just don&amp;#039;t do that :)&lt;br /&gt;
&lt;br /&gt;
==== Replikwando2 (the gui version) &amp;#039;works&amp;#039;, but ReplikwandoService doesn&amp;#039;t ====&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;#039;It doesn&amp;#039;t work&amp;#039; isn&amp;#039;t a working description of an error.&lt;br /&gt;
This problem has several manifestations:&lt;br /&gt;
* ReplikwandoService immediately exits without even getting started&lt;br /&gt;
* ReplikwandoService starts, but won&amp;#039;t repush&lt;br /&gt;
* Repushing works, but keeping up-to-date does not&lt;br /&gt;
* ReplikwandoService will not install&lt;br /&gt;
&lt;br /&gt;
There are a whole bunch of things that could cause this.&lt;br /&gt;
* The service might be running under a user that doesn&amp;#039;t have permissions/access to necessary files&lt;br /&gt;
* File permissions are screwed up&lt;br /&gt;
* Files became corrupted after Replikwando2 got started&lt;br /&gt;
* Magical kernel-level call interception&lt;br /&gt;
* Firewall exceptions exist for one executable or the other&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* Make sure the user account being used to run ReplikwandoService has access to all necessary files&lt;br /&gt;
* Turn off antivirus (or, even better, add Replikwandoservice to the whitelist for the AV)&lt;br /&gt;
* Make sure there are entries in any running firewall program&lt;br /&gt;
&lt;br /&gt;
==== Replikwando2 successfully re-pushes, but then pushes tons of junk data ====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible cause&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Replikwando is not using the correct mysqlbinlog.exe file.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Change replication.ini&amp;#039;s [fromserver].mysqlbinpath to be the same bin path that the MySQL instance is running&lt;br /&gt;
**Windows: This query will tell you where to look for the right bin folder: &amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;SHOW VARIABLES LIKE &amp;#039;basedir&amp;#039;;&amp;lt;/source&amp;gt;&lt;br /&gt;
**Linux: The Replikwando install creates a bin/mysql/mysqlbinlog.exe entry that you should point to&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible cause&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
The client&amp;#039;s binlog file is corrupted. &lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
*Run this query in their SQLYOG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;&lt;br /&gt;
SHOW BINARY LOGS;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you see any of the following, the binary log is corrupt:&lt;br /&gt;
*Binlog names are inconsistent (&amp;#039;mysqlbinlog-000001.bin&amp;#039;, &amp;#039;servername-000001.bin&amp;#039; in the same list)&lt;br /&gt;
*Binlog names repeat (seeing &amp;#039;mysqlbinlog-000001.bin&amp;#039;,&amp;#039;mysqlbinlog-000001.bin&amp;#039;,&amp;#039;mysqlbinlog-000001.bin&amp;#039; repeated over and over and the file sizes are identical)&lt;br /&gt;
&lt;br /&gt;
*First, make a backup of the client&amp;#039;s entire ITrack database, in case something terrible happens.&lt;br /&gt;
&lt;br /&gt;
*Next, run this query in the client&amp;#039;s SQLYOG:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;#039;MySQL&amp;#039;&amp;gt;&lt;br /&gt;
RESET MASTER;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should now be able to have Replikwando successfully re-push the client&amp;#039;s data with normal replication afterwards.&lt;br /&gt;
&lt;br /&gt;
====Replikwando2.exe sits at &amp;quot;Waiting for Active Thread&amp;quot; and never begins a repush====&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*The client&amp;#039;s database has crashed.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Delete and re-create the client&amp;#039;s database on our side.&lt;br /&gt;
&lt;br /&gt;
====Server is full of mysqlbinlog.exe instances====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Replikwando has lost the handle to mysqlbinlog.exe.&lt;br /&gt;
**It is unknown why this happens, but is a system-level issue.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Kill all but the most recent instance of mysqlbinlog.exe.  Replikwando spawns these regularly, so if a mysqlbinlog.exe process has been around for awhile and is not changing, it&amp;#039;s probably safe to kill it.&lt;br /&gt;
**Do NOT kill an active mysqlbinlog.exe!  Replikwando is actively receiving data from it, and things can go horribly wrong if you kill it!&lt;br /&gt;
*A more permanent resolution is to use a different spawning method (we currently use ::CreateProcess).  I believe (but may be wrong) that this issue occurs because ::CreateProcess returns COULDNT_CREATE_PROCESS or something like that, even though the process is made.  It could also be an error in the handling of the closing of a windows-based thread, both of which should be investigated.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Potentially Resolved&amp;#039;&amp;#039;&amp;#039; in 1.8.0.&lt;br /&gt;
&lt;br /&gt;
==== Replikwando runs and seems to work right, but dies during repushes ====&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Possible Cause&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*MySQL Server version is higher than &amp;lt;replikwando_install_folder&amp;gt;/bin/mysqlbinlog.exe (ie: server is 5.6, mysqlbinlog.exe is 5.5)&lt;br /&gt;
**The ToConnection log will show that queries are getting mangled during the repush.&lt;br /&gt;
&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Resolution&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
*Update &amp;lt;replikwando_install_folder&amp;gt;/bin/mysqlbinlog.exe with a newer version&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
	<entry>
		<id>https://wikido.isoftdata.com//index.php?title=Replikwando_Changelog&amp;diff=8521</id>
		<title>Replikwando Changelog</title>
		<link rel="alternate" type="text/html" href="https://wikido.isoftdata.com//index.php?title=Replikwando_Changelog&amp;diff=8521"/>
		<updated>2015-07-22T21:00:21Z</updated>

		<summary type="html">&lt;p&gt;Jmckinstry: /* Initial */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Notes=&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Current Version: 1.1.7b&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
=Versions=&lt;br /&gt;
==Replikwando 1.8.0==&lt;br /&gt;
Major version release.&lt;br /&gt;
Version numbering scheme changed:&lt;br /&gt;
* &amp;lt;MAJ&amp;gt;.&amp;lt;MIN&amp;gt;.&amp;lt;MINMIN&amp;gt;[rev]&lt;br /&gt;
* to&lt;br /&gt;
* &amp;lt;MAJ&amp;gt;.&amp;lt;MIN&amp;gt;.&amp;lt;rev&amp;gt;[sub]&lt;br /&gt;
&lt;br /&gt;
=== Initial ===&lt;br /&gt;
Added ability to handle ROW-based replication.&lt;br /&gt;
&lt;br /&gt;
* CRITICAL - Fixed: If the last query handled by Replikwando since the most recent binlog check was ROLLBACK, and the most recent query processed from the current binlog check was ROLLBACK, then any query that came after it would be erroneously dropped until TopQuery (the UI&amp;#039;s last known processed query) was updated.&lt;br /&gt;
* CRITICAL - Fixed: Comments that start with `!&amp;lt;number&amp;gt;` no longer have IsTokenComment return TRUE as they are actually MySQL statements protected by version checks.&lt;br /&gt;
* CRITICAL - Fixed: A bug where query errors on repush could end up not getting reported or marking the repush as failed.&lt;br /&gt;
* Fixed: mysqlbinlog.exe zombie process and pipe handling.&lt;br /&gt;
* Fixed: Replikwando begins logging details immediately on startup, instead of when it&amp;#039;s knee-deep in connection handling.&lt;br /&gt;
* Changed: Promoted fresh sqlite file notification log level from NOTIFY to GENERAL.&lt;br /&gt;
* Fixed: TO thread now sleeps between cycles instead of spinlocking and consuming system resources.&lt;br /&gt;
* Fixed: BASE64 tokens not being tokenized correctly.&lt;br /&gt;
* Changed: BINLOG statements are now replicated instead of being discarded.&lt;br /&gt;
* Fixed: A bug where failed To Connection attempts would erroneously report as Heartbeat failures.&lt;br /&gt;
* Added: Many string efficiency changes.&lt;br /&gt;
* Added: Deeper logging for internal Query Pipes.&lt;br /&gt;
* Added: Little notes for the GUI and log for when different repush sections are reached. For debugging.&lt;br /&gt;
* Added: Support for Socket/Named-Pipe connections instead of TCP where available.&lt;br /&gt;
&lt;br /&gt;
==Replikwando 1.1.7==&lt;br /&gt;
First released version.&lt;br /&gt;
&lt;br /&gt;
===Replikwando 1.1.7b===&lt;br /&gt;
Major logging changes documented at [[Replikwando Error Logging]].&lt;/div&gt;</summary>
		<author><name>Jmckinstry</name></author>
	</entry>
</feed>