<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Free MySQL - It&#039;s Your Data</title>
	<atom:link href="http://www.freemysql.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.freemysql.net</link>
	<description>Database Hosting Made Free</description>
	<lastBuildDate>Fri, 18 May 2012 06:38:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=192</generator>
		<item>
		<title>MySQL Handshake and Encryption</title>
		<link>http://www.freemysql.net/2012/05/18/mysql-handshake-and-encryption/</link>
		<comments>http://www.freemysql.net/2012/05/18/mysql-handshake-and-encryption/#comments</comments>
		<pubDate>Fri, 18 May 2012 06:38:38 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/18/mysql-handshake-and-encryption/</guid>
		<description><![CDATA[Interestingly, I have given the presentation on MySQL and Security at least 4 times in the past 6 weeks* and it was only last night, with the sharp minds at Baron’s Central Virginia MySQL Meetup Group (sadly Baron was not there!), that someone asked about when encryption happens in the MySQL handshake. We had been [...]]]></description>
			<content:encoded><![CDATA[<p>Interestingly, I have given the presentation on MySQL and Security at least 4 times in the past 6 weeks* and it was only last night, with the sharp minds at Baron’s <a href="http://www.meetup.com/Central-Virginia-MySQL-Meetup/events/61075982/">Central Virginia MySQL Meetup Group</a> (sadly Baron was not there!), that someone asked about when encryption happens in the MySQL handshake.</p>
<p>We had been talking about how MySQL authenticates users, and how if there are no ACL’s set for a given host, MySQL will reject connections from that host – even “telnet host 3306″ will be refused – and that’s when a clever audience member asked where in the handshake process encryption started. Is it before the username is sent? Before the password is sent? Does it encrypt all traffic, even the handshake traffic?</p>
<p>I think that’s an excellent question, and I know there’s a few sharp minds out there who probably know the answer….otherwise I will research the answer this weekend, when I’m back home in Boston.</p>
<p>* <a href="http://ny.effectivemysql.com/events/55213632/">Effective MySQL User Group</a>, as part of a tutorial for <a href="http://www.percona.com/live/mysql-conference-2012/">Percona Live: MySQL Conference and Expo</a> , at the <a href="http://www.picconf.org/picc-12-talkspapers/#6">Professional IT Community Conference</a> last week, and last night at the <a href="http://www.meetup.com/Central-Virginia-MySQL-Meetup/events/61075982/">Central Virginia MySQL Meetup Group</a></p>
<p>Article source: <a href="http://www.sheeri.com/content/mysql-handshake-and-encryption">http://www.sheeri.com/content/mysql-handshake-and-encryption</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/18/mysql-handshake-and-encryption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL: Overview of the ALTER TABLE Statement</title>
		<link>http://www.freemysql.net/2012/05/17/mysql-overview-of-the-alter-table-statement/</link>
		<comments>http://www.freemysql.net/2012/05/17/mysql-overview-of-the-alter-table-statement/#comments</comments>
		<pubDate>Thu, 17 May 2012 18:37:21 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/17/mysql-overview-of-the-alter-table-statement/</guid>
		<description><![CDATA[In the past, we showed you just how easy it is to create a table in MySQL.  Tables are an essential building block in MySQL that help to form and sculpt the overall structure of your database.  We noted that once you have created a database, the time comes when you need to determine what [...]]]></description>
			<content:encoded><![CDATA[<p>In the past, we showed you just how easy it is to create a table in MySQL.  Tables are an essential building block in MySQL that help to form and sculpt the overall structure of your database.  We noted that once you have created a database, the time comes when you need to determine what type of structure you want it to have.  In other words, a few questions come to mind, such as what specific tables do you want your database to have?  What type of information do you want each of these tables to store?  Also, what columns do you want each of your tables to have?  These are just some questions to ponder when determining your database layout in terms of tables.  </p>
<p>Now, answering such questions right off the bat may be a bit difficult if you do not have a clear plan as to how you want your database to be organized.  Sure, it is great to be very descriptive when creating columns and the like, but you do not want to do it in an excessive manner.  So, keeping this in mind, what do you do if you decide that you need to change the structure or certain characteristics of your tables in MySQL at a later date?  Do you have to create them all over again?  The answer, thankfully, is no.  Thanks to the ALTER TABLE statement, you can change a table’s structure in various ways.  </p>
<p>For instance, in the case of columns, you can add them, delete them, or even change their types.  Want to rename a column with a label that is more appropriate to your needs, you can do so with ALTER TABLE.  Other examples of things you can do with the ALTER TABLE statement include renaming tables, creating indexes, destroying indexes, and the list goes on.</p>
<p>As for the format of the ALTER TABLE statement, here it is in basic form:</p>
<p><em><i>ALTER TABLE table_name alter_specification1 [,alter_specification 2,…]</i></em></p>
<p>A closer look at this syntax reveals that we begin with the ALTER TABLE statement itself.  Next we list the name of the table whose structure or characteristics we want to change.  After the table name, comes the specific alterations that we want to perform.  To make life easier on you, MySQL allows you to execute multiple alterations at the same time.  Just remember to separate each by a comma in the syntax.  </p>
<p>You have many options when it comes to alter specifications, as mentioned earlier.  You can get the full list of these options by visiting the official MySQL website and viewing the ALTER TABLE section of its online manual.</p>
<p>Now that you have a basic overview of the ALTER TABLE statement and its importance, it is time to take a look at a few examples ALTER TABLE in action.  As is usually the case with tutorials, these are simple our own examples, so you can look them over to get an understanding of how they work and then apply them to your own tables.</p>
<p>Before we begin using ALTER TABLE, let’s create a sample table for the purposes of this tutorial.</p>
<p><em><i>CREATE  TABLE &#8216;assignments&#8217; (<br />  &#8216;assignment_id&#8217; INT NOT NULL ,<br />  &#8216;topic&#8217; VARCHAR(45) NULL ,<br />  &#8216;start_date&#8217; DATETIME NULL ,<br />  &#8216;end_date&#8217; DATETIME NULL ,<br />  &#8216;notes&#8217; VARCHAR(200) NULL ,<br />  PRIMARY KEY (&#8216;assignment_id&#8217;) ,<br />  UNIQUE INDEX &#8216;assignment_id_UNIQUE&#8217; (&#8216;assignment_id&#8217; ASC) );</i></em></p>
<p>This created a table named assignments that we will use for our upcoming examples.</p>
<p><strong><b>How to Use the ALTER TABLE Statement to rename a table in MySQL</b></strong></p>
<p>For our first example, we will focus on renaming a table in MySQL via the ALTER TABLE statement.  This is a task that you may need to accomplish for one reason or another when working in MySQL, so it is one worth learning.  Luckily, it is very simple in its format, which is the following: </p>
<p><em><i>ALTER TABLE &#8216;assignments&#8217;<br />RENAME TO  &#8216;duties&#8217; ;</i></em></p>
<p>This changes the name of our assignments table to the name of duties.</p>
<p><strong><b>How to Use the ALTER TABLE Statement to add a column to a table in MySQL</b></strong></p>
<p>Since our table deals with assignments, or duties, as it is now called, let’s say we want to add a column that shows the progress of each of our duties.  Here is how we can do so:</p>
<p><em><i>ALTER TABLE duties ADD COLUMN &#8216;progress&#8217; DECIMAL(2,1) NULL<br />AFTER &#8216;notes&#8217; ;</i></em></p>
<p>This alters the duties table by adding the progress column after the notes column.</p>
<p><strong><b>How to Use the ALTER TABLE Statement to delete or drop a column from a table in MySQL</b></strong></p>
<p>What if we want to do the opposite of adding a column to our table, and want to delete or drop one that we really do not need?  Here is how:</p>
<p><em><i>ALTER TABLE duties<br />DROP COLUMN notes ;</i></em></p>
<p>This alters our duties table by dropping the notes column.</p>
<p><strong><b>Conclusion</b></strong></p>
<p>This concludes our tutorial on the ALTER TABLE statement.  Earlier we mentioned the various tasks that could be executed via this statement to give you a glimpse into just how useful it can be when working in MySQL.  To put its usefulness into action, we showed you examples on how to use the ALTER TABLE statement to rename a table, add a column to a table, and delete a column from a table.  As you can see from our examples, using ALTER TABLE is quite simple, yet effective when you want to change the structure of your tables in MySQL.</p>
<p>There are obviously many more ways in which ALTER TABLE can be implemented, but hopefully the few examples in this tutorial served to give you a brief understanding of its functionality.  With that basic knowledge now in your possession, you can research other ways in which you can make the ALTER TABLE statement work for you.</p>
<p>Feel free to leave any comments you may have on this tutorial in the comment section, and be sure to visit us once again at Dev Shed for more MySQL tutorials in the future.</p>
<p><img src="http://www.freemysql.net/wp-content/plugins/rss-poster/cache/3e973_spacer.gif" /><br />Please enable JavaScript to view the <a rel="external" href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a><a rel="external" href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a><br class="clearfix" /></p>
<p>Article source: <a href="http://www.devshed.com/c/a/MySQL/MySQL-Overview-of-the-ALTER-TABLE-Statement-39933/">http://www.devshed.com/c/a/MySQL/MySQL-Overview-of-the-ALTER-TABLE-Statement-39933/</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/17/mysql-overview-of-the-alter-table-statement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bug.mysql.com and Contributions!</title>
		<link>http://www.freemysql.net/2012/05/17/bug-mysql-com-and-contributions/</link>
		<comments>http://www.freemysql.net/2012/05/17/bug-mysql-com-and-contributions/#comments</comments>
		<pubDate>Thu, 17 May 2012 18:37:19 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/17/bug-mysql-com-and-contributions/</guid>
		<description><![CDATA[Oracle enhanced the bugs.mysql.com site to provide a better experience for users to submit contributions ! A new &#8216;Contributions&#8217; tab has been added to the bugs.mysql.com user interface. This tab will allow users to have a defined space for their contributions. An Oracle Contributor Agreement (OCA) will still be required for all contributions. If needed, [...]]]></description>
			<content:encoded><![CDATA[<p>Oracle enhanced the <a href="http://bugs.mysql.com/">bugs.mysql.com</a> site to provide a better experience for users to submit contributions !
<p>
A new &#8216;Contributions&#8217; tab has been added to the <a href="http://bugs.mysql.com/">bugs.mysql.com</a> user interface. This tab will allow users to have a defined space for their contributions. An Oracle Contributor Agreement (<a href="http://www.oracle.com/technetwork/community/oca-486395.html">OCA</a>) will still be required for all contributions. If needed, the <a href="http://www.oracle.com/technetwork/community/oca-486395.html">OCA</a> FAQ is posted <a href="http://www.oracle.com/technetwork/oca-faq-405384.pdf" target="">here</a>. </p>
<p>
Please take advantage of this new feature when you help support and enhance MySQL !</p>
<p></p>
<p>Article source: <a href="http://sqlhjalp.blogspot.com/2012/05/bugmysqlcom-and-contributions.html">http://sqlhjalp.blogspot.com/2012/05/bugmysqlcom-and-contributions.html</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/17/bug-mysql-com-and-contributions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joins: inner, outer, left, right</title>
		<link>http://www.freemysql.net/2012/05/17/joins-inner-outer-left-right/</link>
		<comments>http://www.freemysql.net/2012/05/17/joins-inner-outer-left-right/#comments</comments>
		<pubDate>Thu, 17 May 2012 06:34:22 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/17/joins-inner-outer-left-right/</guid>
		<description><![CDATA[In (My)SQL, join is a means for combining records from two tables into a single set which can be either returned as is or used in another join. In order to perform the operation a join has to define the relationship between records in either table, as well as the way it will evaluate the [...]]]></description>
			<content:encoded><![CDATA[<p>In (My)SQL, join is a means for combining records from two tables into a single set which can be either returned as is or used in another join. In order to perform the operation a join has to define the relationship between records in either table, as well as the way it will evaluate the relationship. The relationship itself is created through <strong>a set of conditions that are part of the join</strong> and usually are put inside <em>ON</em> clause. The rest is determined through a join type, which can either be an <strong>inner join</strong> or an <strong>outer join</strong>. </p>
<p><span></span></p>
<p>The SQL clauses that set the respective join type in a query are <em>[INNER] JOIN</em> and <em>{LEFT | RIGHT} [OUTER] JOIN</em>. As you can see the actual keywords <em>INNER</em> and <em>OUTER</em> are optional and can be omitted, however outer joins require specifying the direction – either left or right.</p>
<p>Examples of queries:<br /><code>SELECT * FROM users JOIN files ON files.owner_id = users.id WHERE users.id = 1;<br />
SELECT * FROM users LEFT JOIN files ON files.owner_id = users.id WHERE users.id = 1;</code></p>
<h6>Inner join, outer join</h6>
<p>The primary difference between the two basic types (each has several subtypes) is in making the decision whether joining of two rows was successful or not, which essentially determines whether the combined row can be returned or not.</p>
<p>Inner joins require that a row from the first table <strong>has a match</strong> in the second table based on the join conditions. In means that the first query from the example above will only return any rows if <em>files</em> table contains at least one record where <em>owner_id</em> is <em>1</em> (has to be equal to <em>users.id</em> by the join conditions and <em>users.id</em> is filtered in <em>WHERE</em> to accept only that one value). Otherwise it will return no rows at all, even if <em>users</em> contains a valid user record. Assuming there are two users, but only one has any files:</p>
<pre>
mysql SELECT * FROM users JOIN files ON files.owner_id = users.id WHERE users.id = 1;
+----+--------------+---------+----+----------+------------------+
| id | name         | enabled | id | owner_id | filename         |
+----+--------------+---------+----+----------+------------------+
|  1 | Albin Kolano |       1 |  1 |        1 | audit report.doc |
+----+--------------+---------+----+----------+------------------+
1 row in set (0.00 sec)

mysql SELECT * FROM users JOIN files ON files.owner_id = users.id WHERE users.id = 2;
<span>Empty set</span> (0.01 sec)
</pre>
<p>Outer joins, on the other hand, consider a join successful <strong>even if no records from the second table meet the join conditions</strong> (i.e. whether there are any matches or not). In such case outer join sets all values in the missing columns to <em>NULL</em>. The second query from the example will return rows whenever there are matches in <em>users</em> and regardless of the contents of <em>files</em> table.</p>
<pre>
mysql SELECT * FROM users LEFT JOIN files ON files.owner_id = users.id WHERE users.id = 1;
+----+--------------+---------+------+----------+------------------+
| id | name         | enabled | id   | owner_id | filename         |
+----+--------------+---------+------+----------+------------------+
|  1 | Albin Kolano |       1 |    1 |        1 | audit report.doc |
+----+--------------+---------+------+----------+------------------+
1 row in set (0.00 sec)

mysql SELECT * FROM users LEFT JOIN files ON files.owner_id = users.id WHERE users.id = 2;
+----+-------------------+---------+------+----------+----------+
| id | name              | enabled | id   | owner_id | filename |
+----+-------------------+---------+------+----------+----------+
|  2 | Nadzieja Surowiec |       1 | <span>NULL</span> |     <span>NULL</span> | <span>NULL</span>     |
+----+-------------------+---------+------+----------+----------+
1 row in set (0.00 sec)
</pre>
<h6>Left join, right join</h6>
<p>Unlike inner joins, outer joins require that the join direction is specified. Inner join is a symmetrical and bi-directional relationship, which means <em>A JOIN B</em> produces the same result as <em>B JOIN A</em>. That is not true for outer joins, because they accept when for a record in <em>A</em> there is no matching record in <em>B</em> and in such case the reverse operation is impossible (it would have to start with the non-existing record in <em>B</em>). This is the reason why setting the direction is necessary. <em>A LEFT JOIN B</em> finds matches for rows from table <em>A</em> in table <em>B</em>, while <em>A RIGHT JOIN B</em> finds matches for records from <em>B</em> in <em>A</em>.</p>
<p>In practice there is very little or even no real purpose for using <em>RIGHT JOIN</em> and in majority of cases everyone just sticks to using <em>LEFT JOIN</em> whenever they need outer join.</p>
<h6>When does the join type matter?</h6>
<p>Choosing the appropriate type depends on the logic you are trying to implement. </p>
<p>You have to use <strong>inner join</strong> when mandatory pieces of information are located in both tables and partial information is considered incomplete or even useless. The case of this could be listing user’s files based on the earlier example:</p>
<pre>
mysql SELECT *
    - FROM   users
    -        JOIN files
    -        ON     files.owner_id = users.id
    - WHERE  users.name = 'Nadzieja Surowiec'
    -        AND users.enabled = 1;
Empty set (0.00 sec)
</pre>
<p>The query finds the user’s record by in <em>users</em> table and verifies that they are allowed to use the service through the value of <em>users.enabled</em> column and then searches for their files in <em>files</em> table. If there are no matches in either table, the query does not return any result, which is the correct behavior. If outer join was used in this case, a useless partial result could be returned or even incorrect result:</p>
<pre>
mysql SELECT *
    - FROM   users
    -        LEFT JOIN files
    -        ON     files.owner_id = users.id
    - WHERE  users.name = 'Nadzieja Surowiec'
    -        AND users.enabled = 1;
+----+-------------------+---------+------+----------+----------+
| id | name              | enabled | id   | owner_id | filename |
+----+-------------------+---------+------+----------+----------+
|  2 | Nadzieja Surowiec |       1 | <span>NULL</span> |     <span>NULL</span> | <span>NULL</span>     |
+----+-------------------+---------+------+----------+----------+
1 row in set (0.00 sec)

mysql SELECT COUNT(1)
    - FROM   users
    -        LEFT JOIN files
    -        ON     files.owner_id = users.id
    - WHERE  users.name = 'Nadzieja Surowiec'
    -        AND users.enabled = 1;
+----------+
| COUNT(1) |
+----------+
|        <span>1</span> |
+----------+
1 row in set (0.00 sec)
</pre>
<p>The application relying on such queries not only would not be able to make anything out of such file information where file data is all set to <em>NULL</em> values, but also it would have to include additional and in fact redundant logic to filter out such results. The row count in this case is correct, as the query returned a single row, but it does not represent how many files the user has, so it is not a valid information that the application could use.</p>
<p><strong>Outer join</strong> must be used to perform a join with a table, which holds information that is only optional for the result. </p>
<p>In our example we are working with a query that lists user’s files and we already established that the join between <em>users</em> and <em>files</em> has to be inner join. But let’s give our users the opportunity to choose a custom icon for any file if they want to. The information could be kept in a separate table called <em>file_icon</em>. </p>
<p>Now, for each listed file we also want to see if user has set a custom icon for that file and return the icon name if they have set it. The icon information is entirely optional, so we want the query to return rows regardless of whether there is an entry for the given file in <em>file_icon</em> or not. Therefore we have to use outer join for this particular task.</p>
<pre>
mysql SELECT *
    - FROM   users
    -        JOIN files
    -        ON     files.owner_id = users.id
    -        LEFT JOIN file_icon
    -        ON     file_icon.file_id = files.id
    - WHERE  users.name = 'Albin Kolano'
    -        AND users.enabled = 1;
+----+--------------+---------+----+----------+------------------+---------+------------------+
| id | name         | enabled | id | owner_id | filename         | file_id | icon_image       |
+----+--------------+---------+----+----------+------------------+---------+------------------+
|  1 | Albin Kolano |       1 |  1 |        1 | audit report.doc |       <span>1</span> | <span>MS-Word-Icon.png</span> |
|  1 | Albin Kolano |       1 |  2 |        1 | stats-201104.xls |    <span>NULL</span> | <span>NULL</span>             |
+----+--------------+---------+----+----------+------------------+---------+------------------+
</pre>
<p>The outer join allowed us to grab the complete list of user’s files and along with their icons if any were set. If we used inner join instead, the result would be missing the record of <em>stats-201104.xls</em> file.</p>
<h6>To Be Continued</h6>
<p>More on dealing with practical problems when designing join queries will be covered in a separate post.</p>
<p>				<!--</p>
<p>--></p>
<p>Article source: <a href="http://www.dbasquare.com/2012/05/16/joins-inner-outer-left-right/">http://www.dbasquare.com/2012/05/16/joins-inner-outer-left-right/</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/17/joins-inner-outer-left-right/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Workbench 5.2.40 GA Released</title>
		<link>http://www.freemysql.net/2012/05/16/mysql-workbench-5-2-40-ga-released/</link>
		<comments>http://www.freemysql.net/2012/05/16/mysql-workbench-5-2-40-ga-released/#comments</comments>
		<pubDate>Wed, 16 May 2012 18:33:36 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/16/mysql-workbench-5-2-40-ga-released/</guid>
		<description><![CDATA[The MySQL Developer Tools team is announcing the next maintenance release of it’s flagship product, MySQL Workbench, version 5.2.40. This version contains more than 28 bug fixes applied over version 5.2.39. MySQL Workbench 5.2 GA • Data Modeling • Query • Administration Please get your copy from our Download site. Sources and binary packages are [...]]]></description>
			<content:encoded><![CDATA[<p>
The MySQL Developer Tools team is announcing the next maintenance release of it’s flagship product, MySQL Workbench, version 5.2.40.<br />
This version contains more than 28 bug fixes applied over version 5.2.39. </p>
<h2>MySQL Workbench 5.2 GA</h2>
<p>
   • Data Modeling </p>
<p>   • Query
</p>
<p>   • Administration
</p>
<p>Please get your copy from our Download site. </p>
<p>Sources and binary packages are available for several platforms, including Windows, Mac OS X and Linux.</p>
<p><a href="http://dev.mysql.com/downloads/workbench/">http://dev.mysql.com/downloads/workbench/</p>
<p></a></p>
<p>Workbench Documentation can be found here.
</p>
<p><a href="http://dev.mysql.com/doc/workbench/en/index.html"></p>
<p>http://dev.mysql.com/doc/workbench/en/index.html</a></p>
<p>Utilities Documentation can be found here.<br /><a href="http://dev.mysql.com/doc/workbench/en/mysql-utilities.html">http://dev.mysql.com/doc/workbench/en/mysql-utilities.html</a> </p>
<p>In addition to the new Query/SQL Development and Administration<br />
modules, version 5.2 features improved stability and performance –<br />
especially in Windows, where OpenGL support has been enhanced and the UI<br />
 was optimized to offer better responsiveness. </p>
<p>This release also includes improvements to the scripting capabilities of the SQL Editor. You can read more about it in</p>
<p><a href="http://wb.mysql.com/workbench/doc/">http://wb.mysql.com/workbench/doc/</a></p>
<p>For a detailed list of resolved issues, see the change log.
</p>
<p><a href="http://dev.mysql.com/doc/workbench/en/wb-change-history.html"></p>
<p>http://dev.mysql.com/doc/workbench/en/wb-change-history.html</p>
<p></a></p>
<p>If you need any additional info or help please get in touch with us.</p>
<p>Post in our forums or leave comments on our blog pages.
</p>
<p>
- The MySQL Workbench Team
 </p>
<p>Article source: <a href="https://blogs.oracle.com/mysqlworkbench/entry/mysql_workbench_5_2_40">https://blogs.oracle.com/mysqlworkbench/entry/mysql_workbench_5_2_40</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/16/mysql-workbench-5-2-40-ga-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some throttling for PECL/mysqlnd_ms 1.4</title>
		<link>http://www.freemysql.net/2012/05/16/some-throttling-for-peclmysqlnd_ms-1-4/</link>
		<comments>http://www.freemysql.net/2012/05/16/some-throttling-for-peclmysqlnd_ms-1-4/#comments</comments>
		<pubDate>Wed, 16 May 2012 06:33:20 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/16/some-throttling-for-peclmysqlnd_ms-1-4/</guid>
		<description><![CDATA[Users of MySQL Replication sometimes throttle client requests to give slaves time to catch up to the master. PECL/mysqlnd_ms 1.4, the current development version, features some throttling through the quality-of-service filter and global transaction identifier (GTID). Both the plugins client-side GTID emulation and the MySQL 5.6 built-in GTID feature can be used to slow down [...]]]></description>
			<content:encoded><![CDATA[<p>
Users of MySQL Replication sometimes throttle client requests to give slaves time to catch up to the master. <a href="http://www.php.net/mysqlnd_ms">PECL/mysqlnd_ms</a> 1.4, the current development version, features some throttling through the quality-of-service filter and global transaction identifier (GTID). Both the plugins <a href="http://de3.php.net/manual/de/mysqlnd-ms.gtid.php">client-side GTID emulation</a> and the <a href="http://dev.mysql.com/doc/refman/5.6/en/replication-gtids.html">MySQL 5.6 built-in GTID feature</a> can be used to slow down PHP MySQL requests, if wanted.
</p>
<h3>How its done</h3>
<p>
The replication plugin has a neat feature called <a href="http://de3.php.net/manual/de/mysqlnd-ms.qos-consistency.php">quality-of-service</a> filter. If, for example, the quality of service you need from a MySQL Replication cluster is &#8220;read your writes&#8221;, you call <code><a href="http://de3.php.net/mysqlnd_ms_set_qos">mysqlnd_ms_set_qos</a>($connection, MYSQLND_MS_QOS_CONSISTENCY_SESSION)</code>. This instructs the plugin to either use a master or a slave, that has replicated your writes already, for all further reads. The plugin takes care of picking an appropriate cluster node. Once you are done with &#8220;read your writes&#8221; you can relax the service quality to make node selection faster.
</p>
<p>
By default, <code>MYSQLND_MS_QOS_CONSISTENCY_SESSION</code> will enforce reading from the master. This is undesired as it increases the load on the master. However, before the introduction of global transaction identifiers, there was no safe way of knowing whether a slave had replicated a certain update already or not.
</p>
<p>
Using either the plugins GTID emulation or the MySQL 5.6 build-in GTID feature, one can reliably check the up-to-date status of a slave using a SQL <code>SELECT</code> statement.  GTIDs are some kind of unique transaction sequence numbers. If you know the transaction sequence number of a write operation, you can check whether it has been replicated using a statement like, for example, <code>SELECT GTID_SUBSET('gtid_of_write', @@GLOBAL.GTID_DONE) AS trx_id FROM DUAL</code>. Please, check my previous posts for a more precise description of the GTID feature. This statement will check the replication status and return immediately.</p>
</p>
<h3>SQL_THREAD_WAIT_AFTER_GTIDS(string gtids [, timeout])</h3>
<p>
Alternatively, a MySQL 5.6 user can issue <code>SELECT SQL_THREAD_WAIT_AFTER_GTIDS('gtid_of_write')</code> which will block until either the slave has replicated the write in question or the statement times out. This is great to throttle clients and prevent them to send new updates before the slaves have caught up. This is what <em>some</em> throttling is about. You can control which logic PECL/mysqlnd_ms shall use when searching for an up-to-date slave.
</p>
<p><a id="more-354"></a></p>
<p>
Strictly speaking, you could do it in 1.3 already, if using MySQL 5.6, which is not GA yet. GTIDs are opaque to the plugin. The configuration contains a SQL statement to fetch <code>gtid_of_write</code> and one to check if <code>gtid_of_write</code> has been replicated already. You have been free to either use  <code>SQL_THREAD_WAIT_AFTER_GTIDS</code> or not for those config settings.
</p>
<h3>The new bit</h3>
<p>
New is a <code>wait_for_gtid_timeout</code> setting that can be used with the GTID emulation. If <code>wait_for_gtid_timeout</code> is set, the plugin will poll a slaves state for <code>wait_for_gtid_timeout</code> seconds regardless of the SQL statement configured. The plugin first runs the SQL statement to check if <code>gtid_of_write</code> has been replicated already. If not, it checks if there is time left for another poll attempt, sleeps for second and polls the status again.
</p>
<p>
All this is done transparently in the background. All the application does is formulate its quality of service needs.
</p>
<h3>Throttling makes synchronization costs visible</h3>
<p>
Throttling client requests should not be understood as a hack. MySQL Replication happens to be a lazy primary copy system. All updates must be performed on the primary (master). Synchronization of secondaries (slaves) is lazy. Update transactions are finished once the primary has finished them.  An update transaction never waits for secondaries to catch up. This is an easy to implement, often fast and simple approach.
</p>
<p>
The drawbacks are temporarily stale data on the secondaries and limited gains in availability over a single server.
</p>
<p>
Clients get confirmation for update transactions as soon as they are finished on the primary. As soon as they are saved on just one server. There is no guarantee that the transaction ever makes it to a secondary. In the unlikely worst case, the primary crashes in an unrecoverable manner and transactions are lost before being replicated. Thus, little gain over a single server. If you don’t want that, you need eager synchronization. This is what MySQL Cluster offers, if you want it. For eager synchronization one needs to slow down updates and wait for one or all replicas to confirm the update. If updating one secondary is all you need, go for <a href="http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html">MySQL Semisynchronous Replication</a>.
</p>
<p>
It may not be technically valid comparison, however, the slow down and wait reminds me of throttling. MySQL lets you choose whether you want to do the wait on demand and on the client side (MySQL Replication: lazy synchronization) or built-in to the distributed system (MySQL Cluster: eager synchronization). Putting all this in a matrix shows the wide range of  database replication options that MySQL has to offer.
</p>
<p>Happy hacking!</p>
<p align="center">
<a href="http://twitter.com/#!/Ulf_Wendel">@Ulf_Wendel <img src="http://www.freemysql.net/wp-content/plugins/rss-poster/cache/d055d_twitter.png" align="middle" alt="Follow me on Twitter" /></a>
</p>
<p class="postmetadata alt">
<p>						Veröffentlicht am</p>
<p>						Tuesday, May 15th, 2012 at 2:11 pm						in <a href="http://blog.ulf-wendel.de/category/planetmysql/" title="View all posts in PlanetMySQL (english)" rel="category tag">PlanetMySQL (english)</a>,  <a href="http://blog.ulf-wendel.de/category/planetphp-english/" title="View all posts in PlanetPHP (english)" rel="category tag">PlanetPHP (english)</a>.<br />
						Ein <a href="http://blog.ulf-wendel.de/2012/some-throttling-for-peclmysqlnd_ms-14/feed/">RSS 2.0 feed</a> ist verfügbar. </p>
<p>													Es ist möglich eine Antwort zu verfassen oder den<br />
							Eintrag per <a href="http://blog.ulf-wendel.de/2012/some-throttling-for-peclmysqlnd_ms-14/trackback/" rel="trackback">Trackback</a> zu verlinken.</p>
<p>Article source: <a href="http://blog.ulf-wendel.de/2012/some-throttling-for-peclmysqlnd_ms-14/">http://blog.ulf-wendel.de/2012/some-throttling-for-peclmysqlnd_ms-14/</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/16/some-throttling-for-peclmysqlnd_ms-1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sophos Offers Partners New Complete Security Suites To Meet Clients&#8217; Changing Needs</title>
		<link>http://www.freemysql.net/2012/05/15/sophos-offers-partners-new-complete-security-suites-to-meet-clients-changing-needs/</link>
		<comments>http://www.freemysql.net/2012/05/15/sophos-offers-partners-new-complete-security-suites-to-meet-clients-changing-needs/#comments</comments>
		<pubDate>Tue, 15 May 2012 18:32:24 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[Scurity]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/15/sophos-offers-partners-new-complete-security-suites-to-meet-clients-changing-needs/</guid>
		<description><![CDATA[In response to partner and customer demand, Sophos today introduced new Complete Security Suites; Web Protection,Â Data Protection and Complete Security. These suites offer Sophos partners the tools they need to help their clients address the evolving security challenges IT departments are facing due the consumerization of IT, the rise of advanced persistent threats, and an [...]]]></description>
			<content:encoded><![CDATA[<p>In response to partner and customer demand, <a href="http://www.sophos.com/en-us.aspx">Sophos </a>today introduced new <a href="http://www.sophos.com/en-us/products/complete.aspx">Complete Security Suites</a>; <a href="http://www.sophos.com/en-us/products/complete/web-protection-suite.aspx">Web Protection</a>,Â <a href="http://www.sophos.com/en-us/products/complete/data-protection-suite.aspx">Data Protection</a> and Complete Security. These suites offer Sophos partners the tools they need to help their clients address the evolving security challenges IT departments are facing due the consumerization of IT, the rise of advanced persistent threats, and an increase in <a href="http://www.sophos.com/en-us/your-needs/security-goals/malware-protection.aspx">malware</a>. </p>
<p>â€œThe evolution of Sophos technology and the new â€˜Complete Security Suitesâ€™ represent a clear and forward-looking vision to manage the advanced multi-vectored threats businesses face,â€� said Robert Newburn, head of Information Security and Managed Services, Trustmarque. â€œSecurity never stands still and neither does Sophos. Through significant in-house development and tactical acquisitions they have built a compelling set of integrated technologies simplifying security management, driving down administration costs and offering customers a mature set of proven tools to protect the endpoint, mobile devices and Gateway.â€� </p>
<p>The Complete Security Suites combine key functions like endpoint, data and web and email protection, along with mobile device management and protection for Microsoft Exchange and SharePoint. The new offerings give partners a competitive edge in the industryâ€”one vendor, one license, ease of management and deployment. And the array of market-leading solutions creates even more secure environments for their clients at a greater value. </p>
<p>â€œAs a managed service provider, we are our clientsâ€™ IT departments, so keeping management costs down is critical to our business,â€� said Marcus Bearden, vice president of technology, Carceron â€œThe centralized management of Sophosâ€™ Complete Security Suites will reduce our administrative costs, thus reducing costs for our customersâ€”a true win-win. Additionally, they will allow us to offer our clients a better value than an a la carte model while satisfying all their security needs.â€� </p>
<p>The Complete Security Suites will also shorten the sales cycle for Sophos partners as clients no longer have to evaluate individual solutions in order to solve each security challenge. Instead, they are able to offer solutions that work togetherâ€”across all pointsâ€”from a trusted provider. </p>
<p>â€œOur clients face an ever-changing variety of new security challenges. Since IT managers are already tasked with accomplishing more while using less resources, we need to provide solutions that quickly address all the different aspects of IT security,â€� said Stephen Merritt, software partner manager, SHI International. â€œEvaluating multiple security solutions is time consuming for both us and our customers, so the ability to present a single, dynamic and scalable bundle that meets all a customerâ€™s security needs helps keep their focus on other initiatives within an environment they are confident is secure.â€� </p>
<p>â€œWe recognize that partners are operating in a competitive environment, so they need tools that will help them meet their clientsâ€™ demands for stronger security systems,â€� said John Shaw, vice president product management Sophos. â€œWe have built this complete security system for IT because IT teams shouldn&#8217;t have to spend time determining which of their point security products is at fault every time they have a problem, only to find that the problem is that the point products don&#8217;t work together. With our suites, customers know itâ€™s always Sophos securing them, and they can be confident that they will be backed by both our industry-leading support and our excellent partners.â€� </p>
<p>For additional information on the new Complete Security Suites, please visit: <a href="http://www.sophos.com/en-us/products/complete.aspx">http://www.sophos.com/en-us/products/complete.aspx. </a></p>
<p>Article source: <a href="http://www.sophos.com/en-us/press-office/press-releases/2012/05/sophos-offers-partners-new-complete-security-suites-to-meet-clients-changing-needs.aspx">http://www.sophos.com/en-us/press-office/press-releases/2012/05/sophos-offers-partners-new-complete-security-suites-to-meet-clients-changing-needs.aspx</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/15/sophos-offers-partners-new-complete-security-suites-to-meet-clients-changing-needs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcing the Explain Analyzer</title>
		<link>http://www.freemysql.net/2012/05/15/announcing-the-explain-analyzer/</link>
		<comments>http://www.freemysql.net/2012/05/15/announcing-the-explain-analyzer/#comments</comments>
		<pubDate>Tue, 15 May 2012 18:32:22 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/15/announcing-the-explain-analyzer/</guid>
		<description><![CDATA[The explain statement can be an important tool for understanding how a query is being executed and what you can do to make it run better.  Although the output of EXPLAIN is relatively straightforward it can be confusing to inexperienced users or can be mangled by terminal wrapping. To help with these problems as well [...]]]></description>
			<content:encoded><![CDATA[<p>The explain statement can be an important tool for understanding how a query is being executed and what you can do to make it run better.  Although the output of EXPLAIN is relatively straightforward it can be confusing to inexperienced users or can be mangled by terminal wrapping.</p>
<p>To help with these problems as well as provide a pastebin for MariaDB developers to share explains during development we created <a title="The MariaDB / MySQL Explain Analyzer" href="http://mariadb.org/explain_analyzer/">The MariaDB/MySQL Explain Analyzer</a>. This tool:</p>
<ol>
<li>Helps unmangle explains (both vertical and tabular format)</li>
<li>Displays explains in an easy-to-read format.</li>
<li>Highlights and provides explanations for some terms.</li>
<li>Links to <a title="Knowledgebase" href="http://kb.askmonty.org">KB</a> articles for different optimization techniques.</li>
<li>(Optionally) Allows you to save the explain for sharing.</li>
</ol>
<p>This is the first release so there are still improvements to make. If you have any suggestions, feature requests or bug reports please let us know.</p>
<p>For more information, please see <a href="http://kb.askmonty.org/en/explain-analyzer">this KB article</a>.</p>
<p> </p>
<p>Article source: <a href="http://blog.montyprogram.com/announcing-the-explain-analyzer/">http://blog.montyprogram.com/announcing-the-explain-analyzer/</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/15/announcing-the-explain-analyzer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why do threads sometimes stay in ‘killed’ state in MySQL?</title>
		<link>http://www.freemysql.net/2012/05/15/why-do-threads-sometimes-stay-in-killed-state-in-mysql/</link>
		<comments>http://www.freemysql.net/2012/05/15/why-do-threads-sometimes-stay-in-killed-state-in-mysql/#comments</comments>
		<pubDate>Tue, 15 May 2012 06:31:21 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/15/why-do-threads-sometimes-stay-in-killed-state-in-mysql/</guid>
		<description><![CDATA[Have you ever tried to kill a query, but rather than just go away, it remained among the running ones for an extended period of time? Or perhaps you have noticed some threads makred with killed showing up from time to time and not actually dying. What are these zombies? Why does MySQL sometimes seem [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried to kill a query, but rather than just go away, it remained among the running ones for an extended period of time? Or perhaps you have noticed some threads makred with <em>killed</em> showing up from time to time and not actually dying. What are these zombies? Why does MySQL sometimes seem to fail to terminate queries quickly? Is there any way to force the kill command to actually work instantaneously? This article sheds some light on it.</p>
<p><span></span></p>
<h6>Threads and connections</h6>
<p>MySQL uses a separate thread for each client connection. A query sent to MySQL is handled by a thread that was previously associated with the connection over which the query arrived. Anyone with sufficient privileges can see the list of currently active threads, along with some additional details, by running <em>SHOW PROCESSLIST</em> command, which returns a table-like view where each connection becomes a separate row:</p>
<pre>
+-----------+-------------+-------------------+--------+-------------+----------+-------------+---------+
| Id        | User        | Host              | db     | Command     | Time     | State       | Info    |
+-----------+-------------+-------------------+--------+-------------+----------+-------------+---------+
| <span>827044892</span> | production  | 10.0.1.100:48596  | proddb | Sleep       |        1 |             |    NULL |
| <span>827044893</span> | production  | 10.0.1.100:39181  | proddb | Sleep       |        1 |             |    NULL |
| <span>827044894</span> | production  | 10.0.1.100:48598  | proddb | Sleep       |        1 |             |    NULL |
| <span>827044895</span> | production  | 10.0.1.100:39183  | proddb | Sleep       |        1 |             |    NULL |
</pre>
<p>More advanced techniques of dealing with this information are described in the posts titled <a href="http://www.dbasquare.com/2012/04/04/anohter-way-to-work-with-mysql-process-list/" title="Anohter way to work with MySQL process list" target="_blank">“Anohter way to work with MySQL process list”</a> and <a href="http://www.dbasquare.com/2012/04/04/how-to-selectively-kill-queries-in-mysql/" title="How to selectively kill queries in MySQL?" target="_blank">“How to selectively kill queries in MySQL?”</a>.</p>
<p>Any running query or any existing connection from the list <strong>can be terminated</strong> by using <em>KILL</em> command.</p>
<h6>What actually happens when you run <em>KILL</em>?</h6>
<p>The command sytnax is <em>KILL [QUERY | CONNECTION] thread_id</em>, where <em>thread_id</em> is the value from the first column of the process list output. The optional argument determines whether only running query or should the entire session be terminated. It defaults to the latter, so specifying <em>CONNECTION</em> is not required.</p>
<p>Running the command doesn’t actually do anything except for setting a special flag inside the selected thread. Therefore the kill operation <strong>doesn’t happen synchronously with the corresponding request</strong>. In many cases it takes some time for a thread or a query to stop. The flag is checked at various stages of statement execution. When it happens exactly, or how frequently, depends on the work a thread is actually doing.</p>
<p>For example:</p>
<ul>
<li>During <em>ALTER TABLE</em> it is checked before each block of rows is read from the original table while MySQL is rewriting data into a new temporary table. In the process, the temporary table is deleted and the original structure remains unchanged.</li>
<li>For <em>UPDATE</em> and <em>DELETE</em> there is also an additional check after each updated or deleted row. If a query managed to make any changes prior to noticing the request to terminate, they have to be rolled back. <em>Note: if a table’s storage engine does not support transactions (e.g. MyISAM), the changes cannot be rolled back, so the operation will result in partial update!</em>
</li>
<li><em>SELECT</em> also checks it after reading a block of rows.
</li>
</ul>
<p>Of course, these were just basic examples and the behavior can be different in different situations. It is even possible that some queries will be <em>unkillable</em> in certain circumstances. A case of this happened once while reading from <em>INFORMATION_SCHEMA.INNODB_BUFFER_POOL_PAGES_INDEX</em> table. The database was having performance problems at the time and the query execution basically stopped on a lock somewhere deep inside InnoDB and it never got back to the point where the flag value could be checked again.</p>
<h6>Threads stay in <em>killed</em> state for a long time. What does it mean?</h6>
<p>Actually, there can be two different cases. If <em>KILL thread_id</em> was issued, there would be <em>killed</em> in the process list. <em>KILL QUERY thread_id</em> doesn’t kill a connection, but rather it only stops a running query within a connection, so in that case <em>query end</em> text may appear instead.</p>
<p>What if you see something like this?</p>
<pre>
+----+------+-----------+------+---------+------+----------+------------------------------------+
| Id | User | Host      | db   | Command | Time | State    | Info                               |
+----+------+-----------+------+---------+------+----------+------------------------------------+
| 10 | root | localhost | NULL | Query   |    0 | NULL     | show processlist                   |
| <span>14</span> | root | localhost | NULL | <span>Killed</span>  |   27 | Updating | update testdb.sometable set cc=sqrt(id) |
+----+------+-----------+------+---------+------+----------+------------------------------------+
</pre>
<p>It can either be an effect of a bug (e.g. <a href="http://bugs.mysql.com/bug.php?id=52528" title="Bug #52528" target="_blank" rel="nofollow">Bug #52528</a>), or more likely it means the database is <strong>performing some work internally</strong> to clean up after a task that was terminated.</p>
<p>There is of course no easy way to confirm if this is a bug. So in order to figure it out, you should rather look for evidence that it is not a bug. That what you see is just the effect of a standard operation, which MySQL has to perform to clean up after a query or a transaction.</p>
<p>Probably the most common reason for a thread to stay with either <em>killed</em> or <em>query end</em> for a longer period of time is <strong>waiting for a transaction rollback</strong> on InnoDB tables. This sometimes can take a lot of time to complete, especially when hundreds of thousands or millions of changes have to be removed. </p>
<p>How to verify that?</p>
<p>Check is the output of <em>SHOW ENGINE INNODB STATUSG</em>. It can simply print the information if there is a rollback currently in progress:</p>
<pre>
---TRANSACTION 0 10411, ACTIVE 28 sec, process no 15506, OS thread id 140732309711184 rollback
mysql tables in use 1, locked 1
<span>ROLLING BACK</span> 7585 lock struct(s), heap size 751600, undo log entries 798854
<span>MySQL thread id 14</span>, query id 206 localhost root end
update testdb.sometable set cc=sqrt(id)
</pre>
<p>The example shows how easily the information can be found. If a thread is marked with <em>killed</em>, or with <em>query end</em>, and the InnoDB engine status reports a rollback for the same thread, just <strong>wait until it ends</strong>.</p>
<p>What if it isn’t that?</p>
<p>It can be related to <strong>removing some temporary table from disk</strong>. An <em>ALTER TABLE</em> may need to discard a very large temporary table, while large file removal on some filesystems (e.g. <em>ext3</em> or <em>ext4</em>) can be rather slow, so it may need a few seconds or sometimes even longer than that. A temporary table can also be created by any DML statement, but usually not nearly as big in size.</p>
<p>It should not usually be necessary as even in the most extreme cases deleting a file should not take more than ten or twenty seconds, but under heavy I/O load it could be much longer, so is there any way to see whether any temporary table were created or not?</p>
<p>In <em>Percona Server</em> or <em>MariaDB</em> you check the contents of <em>INFORMATION_SCHEMA.GLOBAL_TEMPORARY_TABLE</em> and <em>INFORMATION_SCHEMA.TEMPORARY_TABLE</em>. It will only work for manually established temporary tables with <em>CREATE TEMPORARY TABLE</em> statement, not for those created implicitly by MySQL to execute complex queries.</p>
<pre>
mysql select * from INFORMATION_SCHEMA.GLOBAL_TEMPORARY_TABLES;
+------------+--------------+------------+--------+-------------------+------------+----------------+-------------+--------------+-------------+-------------+
| SESSION_ID | TABLE_SCHEMA | TABLE_NAME | ENGINE | NAME              | TABLE_ROWS | AVG_ROW_LENGTH | DATA_LENGTH | INDEX_LENGTH | CREATE_TIME | UPDATE_TIME |
+------------+--------------+------------+--------+-------------------+------------+----------------+-------------+--------------+-------------+-------------+
|   <span>28051622</span> | test         | tbl        | InnoDB | #sql8c3_1ac08a6_0 |       1265 |             51 |       65536 |            0 | NULL        | NULL        |
+------------+--------------+------------+--------+-------------------+------------+----------------+-------------+--------------+-------------+-------------+
</pre>
<p><em>SESSION_ID</em> is the same as the thread identifier in the process list, so you can connect any killed threads to their temporary tables.</p>
<p>The other type of temporary tables cannot be easily traced. Sometimes it’s possible to spot the information in the <em>SHOW PROCESSLIST</em> output:</p>
<pre>
mysql show processlist;
+----------+------+-----------+------+---------+------+----------------------+---------------------------------------------------+
| Id       | User | Host      | db   | Command | Time | State                | Info                                              |
+----------+------+-----------+------+---------+------+----------------------+---------------------------------------------------+
| <span>1934</span>     | root | localhost | test | <span>Killed</span>  |    4 | Copying to tmp table | INSERT INTO test.tbl SELECT * FROM test.testtable |
..
</pre>
<p>Sometimes you can check what temporary files the instance keeps open:</p>
<pre>
server ~ # lsof -c mysqld | grep #sql
mysqld  5626 mysql  138u   REG              253,1       1024 43843585  /vol/vol1/mysql/#sql_95fa_0.MYI
mysqld  5626 mysql  139u   REG              253,1  <span>227262885</span> 43843605  /vol/vol1/mysql/#sql_95fa_0.MYD
</pre>
<p>The colored value is the file’s size. These may help you to make an assumption that database could be removing a temporary table.</p>
<h6>Conclusions</h6>
<p>From time to time it may be normal to see a database thread that was killed, but didn’t die immediately, or a query that can’t seem to end. The real operation is not be performed synchronously with the kill command and afterwards MySQL <strong>may still need some time to clean things up</strong> properly. </p>
<p>No matter what the real cause is, it is <strong>impossible to get rid of</strong> such <em>hanging</em> threads without a database restart. They should, however, simply be allowed to go away on their own. </p>
<p>There is also <strong>no way of forcing a kill</strong> that would execute instantly like <em>kill -9 pid</em> in Unix systems.</p>
<p>				<!--</p>
<p>--></p>
<p>Article source: <a href="http://www.dbasquare.com/2012/05/15/why-do-threads-sometimes-stay-in-killed-state-in-mysql/">http://www.dbasquare.com/2012/05/15/why-do-threads-sometimes-stay-in-killed-state-in-mysql/</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/15/why-do-threads-sometimes-stay-in-killed-state-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Announcement of Percona XtraDB Cluster 5.5.23</title>
		<link>http://www.freemysql.net/2012/05/14/announcement-of-percona-xtradb-cluster-5-5-23-2/</link>
		<comments>http://www.freemysql.net/2012/05/14/announcement-of-percona-xtradb-cluster-5-5-23-2/#comments</comments>
		<pubDate>Mon, 14 May 2012 18:27:25 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[FreeMySQL]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.freemysql.net/2012/05/14/announcement-of-percona-xtradb-cluster-5-5-23-2/</guid>
		<description><![CDATA[Our previous GA release of Percona XtraDB Cluster caused a lot of interest and feedback. I am happy to announce next version Percona XtraDB Cluster 5.5.23, which comes with bug fixes and improvements. List of changes: Fixes merged from upstream (Codership-mysql) Support for MyISAM, now changes to MyISAM tables are replicated to other nodes Improvements [...]]]></description>
			<content:encoded><![CDATA[<p>Our previous GA release of Percona XtraDB Cluster caused a lot of interest and feedback. I am happy to announce next version <a href="http://www.percona.com/software/percona-xtradb-cluster/">Percona XtraDB Cluster</a> 5.5.23, which comes with bug fixes and improvements.</p>
<p>List of changes:</p>
<ul>
<li><a href="http://www.codership.com/content/wsrep-patch-235-mysql-5523-released">Fixes merged</a> from upstream (Codership-mysql)</li>
<li>Support for MyISAM, now changes to MyISAM tables are replicated to other nodes</li>
<li>Improvements to XtraBackup SST methods, better error handling</li>
<li>New SST wsrep_sst_method=skip, useful when you start all nodes from the same sources (i.e. backup)</li>
<li>Ability to pass list of IP addresses for a new node, it will connect to the first available</li>
</ul>
<p>Binaries are available from downloads area or from our repositories.</p>
<p>For this release we will provides binaries for Ubuntu 12.04, they are coming soon.</p>
<p>If you want to know more how to migrate to XtraDB Cluster, we will be giving <a href="http://www.percona.com/webinars/2012-06-06-migrating-to-percona-xtradb-cluster/">a free webinar on June 6th</a>.</p>
<p>This is an General Availability release.  We did our best to eliminate bugs and problems during alpha and beta testing release, but this is a software, so bugs are expected. If you encounter them, please report to <a href="https://bugs.launchpad.net/percona-xtradb-cluster">our bug tracking system</a>.</p>
<p>Links:</p>
<ul>
<li>
We provide tar.gz and RPM binaries for RedHat (CentOS, Oracle Linux) 5 and 6, and Debian packages.<br />
Downloads: <a href="http://www.percona.com/downloads/Percona-XtraDB-Cluster/">http://www.percona.com/downloads/Percona-XtraDB-Cluster/</a>
</li>
<li>
<a href="http://www.percona.com/doc/percona-xtradb-cluster/index.html">Documentation</a><br /><a href="http://www.codership.com/wiki/doku.php">Codership Wiki</a>
</li>
<li>
<a title="http://groups.google.com/group/percona-discussion" href="http://groups.google.com/group/percona-discussion">General Discussion group</a></li>
<li><a href="https://launchpad.net/percona-xtradb-cluster">Launchpad project</a></li>
<li><a href="https://bugs.launchpad.net/percona-xtradb-cluster">Bug reports</a></li>
</ul>
<p>Article source: <a href="http://www.mysqlperformanceblog.com/2012/05/14/announcement-of-percona-xtradb-cluster-5-5-23/">http://www.mysqlperformanceblog.com/2012/05/14/announcement-of-percona-xtradb-cluster-5-5-23/</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.freemysql.net/2012/05/14/announcement-of-percona-xtradb-cluster-5-5-23-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

