<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - QA</title>
        <description>Forum to discuss quality assurance techniques, such as bug reports, test cases, code patches</description>
        <link>http://forums.mysql.com/list.php?132</link>
        <lastBuildDate>Tue, 24 Nov 2009 20:28:52 +0000</lastBuildDate>
        <generator>Phorum 5.2.1-alpha</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?132,292257,292257#msg-292257</guid>
            <title>I need your help very much (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,292257,292257#msg-292257</link>
            <description><![CDATA[ Dear Database Support Professional,<br />
 <br />
I am Database Administrator and I am writing to ask for your help in responding to a 10-12 minute survey for a degree requirement on relational database support professionals in the USA. Please note that the respondent is completely anonymous. If I don’t get this portion of my degree completed by the end of this semester, then I would have to wait for another year which entails additional costs and time on me. By completing the survey, you will be contributing to research in our field and also there is the satisfaction of having helped a fellow professional and a fellow human being attain his goals. I believe a good turn always bring another in some way in our lives. I therefore kindly beg for your help to a fellow database professional by completing this survey.  The link to the survey is provided below.  <br />
<br />
<a rel="nofollow"  href="http://www.surveymonkey.com/s.aspx?sm=a1JqU7GVt1g6rCkIPyL23w_3d_3d">http://www.surveymonkey.com/s.aspx?sm=a1JqU7GVt1g6rCkIPyL23w_3d_3d</a><br />
 <br />
Thanks you very much<br />
Gabriel]]></description>
            <dc:creator>Gabby Takash</dc:creator>
            <category>QA</category>
            <pubDate>Sat, 21 Nov 2009 14:26:38 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,292222,292222#msg-292222</guid>
            <title>A truly terrific software test management tool (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,292222,292222#msg-292222</link>
            <description><![CDATA[ Hello Everyone,<br />
<br />
Zephyr 2.6 is a terrific tool for QAs. Can anyone suggest any other system that has tight integration with two popular issue tracking systems (JIRA and Bugzilla), a flexible licensing option and above all an affordable test management system? Well I can vouch for it as I’ve been using it for some time. It has never given me a chance to complain and all my releases were on time and on budget. Trust me, Zephyr 2.6 never lets you down. Get more details here: <a rel="nofollow"  href="http://www.getzephyr.com/">http://www.getzephyr.com/</a>]]></description>
            <dc:creator>Sean Stewart</dc:creator>
            <category>QA</category>
            <pubDate>Sat, 21 Nov 2009 04:56:47 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,292139,292139#msg-292139</guid>
            <title>corrupted entry (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,292139,292139#msg-292139</link>
            <description><![CDATA[ Hi, I have a MySQL database version 4.1.22, that has an entry in it causing an issue.  I had a statement using SELECT * that bugged when a person injected hmtl tags into input boxes using a bot.  I closed the open ended part of the site so this couldn't happen but SELECT * causes the connection to be lost whenever I use the query in that manner.  if I select specific columns out of the row I can get information to display, I'm assuming that's because only one of the columns in the bad row is causing it.  I narrowed down a row I know is not working since I tried to select it out individually and it fails.  I can delete other records expect the bad record.  It'll disconnect if I try to delete it.  I could find out the specific column/columns that are bad by selecting each column out of the row until it gives me the disconnect if that information is necessary.  If I can't delete this record using a query from the command line even, is there any other way to get rid of this record?]]></description>
            <dc:creator>Schuyler Bos</dc:creator>
            <category>QA</category>
            <pubDate>Fri, 20 Nov 2009 15:28:58 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,291866,291866#msg-291866</guid>
            <title>InnoDB lock up in 5.4.3 (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,291866,291866#msg-291866</link>
            <description><![CDATA[ Moved to InnoDB forum...]]></description>
            <dc:creator>mike grafton</dc:creator>
            <category>QA</category>
            <pubDate>Thu, 19 Nov 2009 02:45:59 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,291812,291812#msg-291812</guid>
            <title>unable to load its own output (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,291812,291812#msg-291812</link>
            <description><![CDATA[ select ... into outfile <br />
<br />
produces a text file with '\\N' in place of the nulls.<br />
when trying to read back using 'load data infile' it stubbornly refuses to accept the null values and even explicit escaped by '\\' or '\\\\' don't help.<br />
<br />
I discovered it was confused by missing vals in the last column only and adding lines terminated by '\r\n' made it recognize the nulls fine.<br />
<br />
A bit strange.<br />
<br />
suggestion: if select ... into outfile is called without options then load data infile should also work without options on the file created.]]></description>
            <dc:creator>stephen bond</dc:creator>
            <category>QA</category>
            <pubDate>Wed, 18 Nov 2009 21:54:46 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,291755,291755#msg-291755</guid>
            <title>Issue with database being 'hacked' (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,291755,291755#msg-291755</link>
            <description><![CDATA[ Hello all,<br />
  Recently my companys website was hacked after we switched to a new hosting company.  The string that was used to hack the database was: <br />
<br />
ss&amp;item=-1%20union%20all%20select%201,2,concat(username,char(58),password),4,5,6%20from%20users--<br />
<br />
Now I did not write the code for the website, only thing I have done was changed some code and redesigned it.  Does anyone have any insight on this issue and/or know of somewhere that I can find a fix to this?  This command is displaying the usernames and password hashes for all accounts.  I am not extremely new to using MySQL but I am fairly new to it.  Any help would be greatly appreciated and thank you in advance]]></description>
            <dc:creator>James Coffman</dc:creator>
            <category>QA</category>
            <pubDate>Wed, 18 Nov 2009 16:21:04 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,291541,291541#msg-291541</guid>
            <title>multiple keywords search (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,291541,291541#msg-291541</link>
            <description><![CDATA[ anyone give me idea for my question?<br />
my question is, im using text filed :country, state,city gender, agefrom, ageTo.<br />
<br />
suppose i will give country and state field then output will display. suppose i will give any of three fileld. so user may chance to give watever they want to search.<br />
<br />
i need query for these pls help ..]]></description>
            <dc:creator>vino kumar</dc:creator>
            <category>QA</category>
            <pubDate>Tue, 17 Nov 2009 14:07:19 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,291446,291446#msg-291446</guid>
            <title>problem: SELECT returning everytime empty resultset (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,291446,291446#msg-291446</link>
            <description><![CDATA[ Hello,<br />
<br />
Today we had a very strange problem that occured on a customer's production system using Linux (Fedora 4) + MySQL 4.1.<br />
<br />
The MySQL server started to returns empty results set for any SELECT statements we entered (a single statement SELECT * FROM mytable was returning data - but now returns nothing). No error in the MySQL client and no error in the log files.<br />
<br />
Let me add that the database (isam db) is quite big ~2gb of data (+2gb of indexes),<br />
but everything was working fine up to that point...<br />
<br />
finally we restarted the whole server and the system works well again.<br />
<br />
do you have any idea about what can cause such behaviour ?<br />
thanks for helping<br />
<br />
gaya]]></description>
            <dc:creator>Gaya Rime</dc:creator>
            <category>QA</category>
            <pubDate>Mon, 16 Nov 2009 19:26:42 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,291411,291411#msg-291411</guid>
            <title>Mysql Table Corruption (1 reply)</title>
            <link>http://forums.mysql.com/read.php?132,291411,291411#msg-291411</link>
            <description><![CDATA[ Hi,<br />
<br />
I have MySql Server 5.0.27 and occasionally a table is corrupted. Every time the table corrupted I repair the table in extended mode. It is repaired at that time, but it's not a permanent solution. Corruption is still occurring.<br />
<br />
The table has 1 million rows and occupy 3GB disk space. I think it is not big for Mysql. Have you any idea to solve this problem? Any help appreciated.]]></description>
            <dc:creator>Kadir Sert</dc:creator>
            <category>QA</category>
            <pubDate>Mon, 23 Nov 2009 10:01:42 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,290606,290606#msg-290606</guid>
            <title>NEED HELP (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,290606,290606#msg-290606</link>
            <description><![CDATA[ i,<br />
my comapny runs an application with mysql as backend.. Of recent every evening when you try to login it gives u the error 'unable to connect to server please check your connection'. If you shut down and restart hours later, it runs perfectly. if u ping d server when it generates the error, you get a reply and if you input a wrong username/password, it tells you invalid username or password.<br />
Has anyone got an idea of what is happening..<br />
thanks]]></description>
            <dc:creator>donald nwaokobia</dc:creator>
            <category>QA</category>
            <pubDate>Wed, 11 Nov 2009 09:26:12 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,290433,290433#msg-290433</guid>
            <title>MySQL 5.1.40  don´t  accept datetime 21/10/2001 00:00:00 (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,290433,290433#msg-290433</link>
            <description><![CDATA[ Hello,<br />
<br />
When i try insert an data in the table 'check' the mysql throws an exception with the message:<br />
<br />
Incorrect datetime value: '2001-10-21 00:00:01' for column 'descount_date' at row 1.<br />
<br />
The field descount_date is a datetime, and in my sql insert command is described below:<br />
<br />
insert into check (description, decount_date) values ('sample', '2001-10-21 00:00:01');]]></description>
            <dc:creator>Carlos Junior</dc:creator>
            <category>QA</category>
            <pubDate>Tue, 10 Nov 2009 12:43:58 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,290089,290089#msg-290089</guid>
            <title>Bug on Sum aggregate function (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,290089,290089#msg-290089</link>
            <description><![CDATA[ Hello Everyone!<br />
<br />
I have a particular view created in mysql which return about 3 columns in all here are the actual data that it returns with the query that I used to return this values<br />
<br />
&quot;SELECT invoice, task_no, computation FROM payments p where invoice='0600985' order by task;&quot;<br />
<br />
invoice | task_no                              |computation<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 364.93<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 741.12<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 12<br />
------------------------------------------------------------<br />
0600985 | 1556e08b-9610-11de-ad92-5e47499a2b08 | 216<br />
------------------------------------------------------------<br />
0600985 | 1556e08b-9610-11de-ad92-5e47499a2b08 | 494.32<br />
------------------------------------------------------------<br />
0600985 | 1556e08b-9610-11de-ad92-5e47499a2b08 | 1296<br />
------------------------------------------------------------<br />
0600985 | 2f0da371-960c-11de-ad92-5e47499a2b08 | 2.16<br />
------------------------------------------------------------<br />
0600985 | 2f0da371-960c-11de-ad92-5e47499a2b08 | 65.69<br />
------------------------------------------------------------<br />
0600985 | 2f0da371-960c-11de-ad92-5e47499a2b08 | 132.62<br />
------------------------------------------------------------<br />
0600985 | 21e6d02c-960c-11de-ad92-5e47499a2b08 | 123.16<br />
------------------------------------------------------------<br />
0600985 | 21e6d02c-960c-11de-ad92-5e47499a2b08 | 250.09<br />
<br />
The data above are having same invoice and some are having same task_no what I did was I group them by task_no before performing sum aggregate function and it return the following results:<br />
<br />
SELECT task_no, invoice, sum(computation) as computation FROM payments group by task_no having invoice='0600985';<br />
<br />
invoice | task_no                              |computation<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 1288.63<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 2006.32<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 373.25<br />
------------------------------------------------------------<br />
0600985 | 1556e08b-9610-11de-ad92-5e47499a2b08 | 200.47<br />
<br />
I've tried to make a manual computation for this one as I have observed the first row returns a wrong computation of data. Getting the sum of the values 364.93, 741.12 and 12 when being computed should be returning a result of 1118.05 getting their sum. I would like also to show how the view is being generated here it is:<br />
<br />
&quot;CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `payments` AS select `job_order`.`invoice_i_no` AS `invoice`, task_assign.ta_id as task_no, t_desc as task, `formula`.`f_name` AS `fieldname`,`computations`.`VAL` AS `computation`,`computations`.`formula_f_id` AS `fieldid`,`formula`.`FTYPE` AS `fieldtype` from ((`computations` left join `job_order` on((`computations`.`job_order_jo_id` = `job_order`.`jo_id`))) left join `formula` on((`computations`.`formula_f_id` = `formula`.`f_id`))) left join task_assign on job_order.task_assign_ta_id = task_assign.ta_id where `formula`.`FTYPE` = 'T';&quot;<br />
<br />
I can't tell whether I actually made a mistake in my query but I also tried doing another query and get the following results:<br />
<br />
&quot;SELECT invoice, task_no, sum(computation) as computation FROM payments p where invoice='0600985' and task_no='01613d90-9610-11de-ad92-5e47499a2b08' order by task;&quot;<br />
<br />
invoice |task_no                               |computation<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 1118.05<br />
<br />
I'm actually using the &quot;innodb&quot; engine for all the tables that are included in the join statement of my query.<br />
<br />
Hope anyone from this group would be able to help me. Thanks in advance!;)]]></description>
            <dc:creator>Christopher Pelayo</dc:creator>
            <category>QA</category>
            <pubDate>Sun, 08 Nov 2009 12:50:52 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,290088,290088#msg-290088</guid>
            <title>Bug on Sum aggregate function (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,290088,290088#msg-290088</link>
            <description><![CDATA[ Hello Everyone!<br />
<br />
I have a particular view created in mysql which return about 3 columns in all here are the actual data that it returns with the query that I used to return this values<br />
<br />
&quot;SELECT invoice, task_no, computation FROM payments p where invoice='0600985' order by task;&quot;<br />
<br />
invoice | task_no|computation<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 364.93<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 741.12<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 12<br />
------------------------------------------------------------<br />
0600985 | 1556e08b-9610-11de-ad92-5e47499a2b08 | 216<br />
------------------------------------------------------------<br />
0600985 | 1556e08b-9610-11de-ad92-5e47499a2b08 | 494.32<br />
------------------------------------------------------------<br />
0600985 | 1556e08b-9610-11de-ad92-5e47499a2b08 | 1296<br />
------------------------------------------------------------<br />
0600985 | 2f0da371-960c-11de-ad92-5e47499a2b08 | 2.16<br />
------------------------------------------------------------<br />
0600985 | 2f0da371-960c-11de-ad92-5e47499a2b08 | 65.69<br />
------------------------------------------------------------<br />
0600985 | 2f0da371-960c-11de-ad92-5e47499a2b08 | 132.62<br />
------------------------------------------------------------<br />
0600985 | 21e6d02c-960c-11de-ad92-5e47499a2b08 | 123.16<br />
------------------------------------------------------------<br />
0600985 | 21e6d02c-960c-11de-ad92-5e47499a2b08 | 250.09<br />
<br />
The data above are having same invoice and some are having same task_no what is did was I group them by task_no before performing sum aggregate function and it return the following results:<br />
<br />
SELECT task_no, invoice, sum(computation) as computation FROM payments group by task_no having invoice='0600985';<br />
<br />
invoice | task_no                              |computation<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 1288.63<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 2006.32<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 373.25<br />
------------------------------------------------------------<br />
0600985 | 1556e08b-9610-11de-ad92-5e47499a2b08 | 200.47<br />
<br />
I've tried to make a manual computation for this one as I have observed the first row returns a wrong computation of data. Getting the sum of the values 364.93, 741.12 and 12 when being computed should be returning a result of 1118.05 getting their sum. I would like also to show how the view is being generated here it is:<br />
<br />
&quot;CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `payments` AS select `job_order`.`invoice_i_no` AS `invoice`, task_assign.ta_id as task_no, t_desc as task, `formula`.`f_name` AS `fieldname`,`computations`.`VAL` AS `computation`,`computations`.`formula_f_id` AS `fieldid`,`formula`.`FTYPE` AS `fieldtype` from ((`computations` left join `job_order` on((`computations`.`job_order_jo_id` = `job_order`.`jo_id`))) left join `formula` on((`computations`.`formula_f_id` = `formula`.`f_id`))) left join task_assign on job_order.task_assign_ta_id = task_assign.ta_id where `formula`.`FTYPE` = 'T';&quot;<br />
<br />
I can't tell whether I actually made a mistake in my query but I also tried doing another query and get the following results:<br />
<br />
&quot;SELECT invoice, task_no, sum(computation) as computation FROM payments p where invoice='0600985' and task_no='01613d90-9610-11de-ad92-5e47499a2b08' order by task;&quot;<br />
<br />
invoice |task_no                               |computation<br />
------------------------------------------------------------<br />
0600985 | 01613d90-9610-11de-ad92-5e47499a2b08 | 1118.05<br />
<br />
As you can observed the last query already returned the correct result that I expect to get. Please help me to solve this problem. I'm actually using the &quot;innodb&quot; engine for all the tables that are included in the join statement of my query.]]></description>
            <dc:creator>Christopher Pelayo</dc:creator>
            <category>QA</category>
            <pubDate>Sun, 08 Nov 2009 12:43:48 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,289509,289509#msg-289509</guid>
            <title>MySQL Appears to be in Deadlocked State (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,289509,289509#msg-289509</link>
            <description><![CDATA[ Hello,<br />
<br />
I am running into a deadlock condition that I cannot diagnose.  I am using an InnoDB engine with auto commit.  Specifically, I am running an application which attempts to do an insert into a table.  I keep getting the following error (after a 50 second timeout):<br />
<br />
&quot;java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction&quot;<br />
<br />
I printed the prepared statement via &quot;toString&quot; and attempted to run this command in the mysql application, I get a similar error:<br />
<br />
&quot;ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction&quot;<br />
<br />
I looked through the app and found no database locks being set.  However, SELECT statements do work.<br />
<br />
This leads to my first question:  With the row level locking that InnoDB provides, why lock the entire table?<br />
<br />
Running &quot;show full processlist&quot; yields the following results:<br />
<br />
mysql&gt; show full processlist;<br />
+-----+---------+-----------------+---------+---------+------+-------+-----------------------+<br />
| Id  | User    | Host            | db      | Command | Time | State | Info                  |<br />
+-----+---------+-----------------+---------+---------+------+-------+-----------------------+<br />
|   1 | ipunity | localhost:37081 | ipunity | Sleep   |  548 |       | NULL                  |<br />
|   2 | ipunity | localhost:37082 | ipunity | Sleep   |  248 |       | NULL                  |<br />
|   3 | ipunity | localhost:37083 | ipunity | Sleep   |  248 |       | NULL                  |<br />
|   4 | ipunity | localhost:37086 | ipunity | Sleep   |    7 |       | NULL                  |<br />
|   8 | cb      | localhost:37110 | cb      | Sleep   |  196 |       | NULL                  |<br />
|   9 | cb      | localhost:37112 | cb      | Sleep   |  196 |       | NULL                  |<br />
|  10 | cb      | localhost:37113 | cb      | Sleep   |   16 |       | NULL                  |<br />
|  11 | cb      | localhost:37114 | cb      | Sleep   | 5302 |       | NULL                  |<br />
|  12 | cb      | localhost:37115 | cb      | Sleep   | 5302 |       | NULL                  |<br />
|  13 | cb      | localhost:37118 | cb      | Sleep   | 4696 |       | NULL                  |<br />
|  14 | cb      | localhost:37122 | cb      | Sleep   | 4696 |       | NULL                  |<br />
|  15 | cb      | localhost:37123 | cb      | Sleep   | 4516 |       | NULL                  |<br />
|  16 | cb      | localhost:37124 | cb      | Sleep   | 3796 |       | NULL                  |<br />
|  17 | cb      | localhost:37125 | cb      | Sleep   | 3796 |       | NULL                  |<br />
|  18 | cb      | localhost:37126 | cb      | Sleep   | 3616 |       | NULL                  |<br />
|  19 | cb      | localhost:37128 | cb      | Sleep   | 2896 |       | NULL                  |<br />
|  20 | cb      | localhost:37129 | cb      | Sleep   | 2896 |       | NULL                  |<br />
|  21 | cb      | localhost:37131 | cb      | Sleep   | 2716 |       | NULL                  |<br />
|  22 | cb      | localhost:37132 | cb      | Sleep   | 1996 |       | NULL                  |<br />
|  23 | cb      | localhost:37133 | cb      | Sleep   | 1996 |       | NULL                  |<br />
|  24 | cb      | localhost:37134 | cb      | Sleep   | 1096 |       | NULL                  |<br />
|  25 | cb      | localhost:37135 | cb      | Sleep   | 1816 |       | NULL                  |<br />
|  26 | cb      | localhost:37138 | cb      | Sleep   | 5415 |       | NULL                  |<br />
|  27 | cb      | localhost:37139 | cb      | Sleep   | 1096 |       | NULL                  |<br />
|  28 | cb      | localhost:37141 | cb      | Sleep   |  916 |       | NULL                  |<br />
|  29 | cb      | localhost:37148 | cb      | Sleep   | 5412 |       | NULL                  |<br />
|  30 | cb      | localhost:37149 | cb      | Sleep   | 5412 |       | NULL                  |<br />
|  31 | cb      | localhost:37150 | cb      | Sleep   | 5412 |       | NULL                  |<br />
|  32 | cb      | localhost:37151 | cb      | Sleep   | 5607 |       | NULL                  |<br />
|  33 | cb      | localhost:37152 | cb      | Sleep   | 5607 |       | NULL                  |<br />
|  34 | cb      | localhost:37153 | cb      | Sleep   | 5607 |       | NULL                  |<br />
|  35 | cb      | localhost:37154 | cb      | Sleep   | 5607 |       | NULL                  |<br />
|  36 | cb      | localhost:37155 | cb      | Sleep   | 5415 |       | NULL                  |<br />
|  37 | cb      | localhost:37156 | cb      | Sleep   | 5415 |       | NULL                  |<br />
|  47 | cb      | localhost:37233 | cb      | Sleep   |  881 |       | NULL                  |<br />
|  48 | cb      | localhost:37254 | cb      | Sleep   | 5498 |       | NULL                  |<br />
|  49 | cb      | localhost:37255 | cb      | Sleep   | 5495 |       | NULL                  |<br />
|  50 | cb      | localhost:37256 | cb      | Sleep   | 5499 |       | NULL                  |<br />
|  53 | cb      | localhost:37259 | cb      | Sleep   | 5493 |       | NULL                  |<br />
|  54 | cb      | localhost:37260 | cb      | Sleep   | 5492 |       | NULL                  |<br />
|  55 | cb      | localhost:37261 | cb      | Sleep   | 5499 |       | NULL                  |<br />
|  56 | cb      | localhost:37262 | cb      | Sleep   | 5499 |       | NULL                  |<br />
|  57 | cb      | localhost:37263 | cb      | Sleep   | 5498 |       | NULL                  |<br />
| 107 | root    | localhost       | cb      | Sleep   | 4569 |       | NULL                  |<br />
| 156 | cb      | localhost:38461 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 157 | cb      | localhost:38462 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 158 | cb      | localhost:38463 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 159 | cb      | localhost:38464 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 160 | cb      | localhost:38465 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 161 | cb      | localhost:38466 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 162 | cb      | localhost:38467 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 163 | cb      | localhost:38468 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 164 | cb      | localhost:38469 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 165 | cb      | localhost:38470 | cb      | Sleep   | 3520 |       | NULL                  |<br />
| 301 | root    | localhost       | cb      | Query   |    0 | NULL  | show full processlist |<br />
+-----+---------+-----------------+---------+---------+------+-------+-----------------------+<br />
55 rows in set (0.00 sec)<br />
<br />
From this it is evident that there is no locks by any of the aforementioned processes.<br />
<br />
This leads me to my second question:  Is the error message misleading?  Or how can I tell if a table is locked?<br />
<br />
I ran &quot;show open tables&quot; and got the following results:<br />
<br />
mysql&gt; show open tables;<br />
+----------+-------------------------------+--------+-------------+<br />
| Database | Table                         | In_use | Name_locked |<br />
+----------+-------------------------------+--------+-------------+<br />
| cb       | orgid_sequence                |      0 |           0 |<br />
| cb       | staleuserpasswordsequence     |      0 |           0 |<br />
| cb       | recurrentstreaminginfo        |      0 |           0 |<br />
| cb       | slidepresentationbackup       |      0 |           0 |<br />
| cb       | orgpilotnumberid_sequence     |      0 |           0 |<br />
| cb       | operatorid_sequence           |      0 |           0 |<br />
| cb       | inconfinfo                    |      0 |           0 |<br />
| cb       | recurrentreservation          |      0 |           0 |<br />
| ipunity  | frameconfig                   |      0 |           0 |<br />
| ipunity  | healthmonitor_globalconfig    |      0 |           0 |<br />
| cb       | userparams                    |      0 |           0 |<br />
| ipunity  | cluster_appcallstats          |      0 |           0 |<br />
| cb       | streamingpartid_sequence      |      0 |           0 |<br />
| cb       | streamingparticipant          |      0 |           0 |<br />
| cb       | multimediaserver              |      0 |           0 |<br />
| cb       | prereggrouppasscodes_seq      |      0 |           0 |<br />
| cb       | memberid_sequence             |      0 |           0 |<br />
| mysql    | proc                          |      0 |           0 |<br />
| cb       | numbercodeslist               |      0 |           0 |<br />
| cb       | question                      |      0 |           0 |<br />
| cb       | orgparams                     |      0 |           0 |<br />
| cb       | orgpilotnumber                |      0 |           0 |<br />
| cb       | dnisrecordings                |      0 |           0 |<br />
| cb       | numberingplan                 |      0 |           0 |<br />
| cb       | mediaserverid_sequence        |      0 |           0 |<br />
| cb       | recurrentattendeeid_sequence  |      0 |           0 |<br />
| cb       | streamingsession              |      0 |           0 |<br />
| cb       | numberingplanid_sequence      |      0 |           0 |<br />
| cb       | prereggroupinfo_seq           |      0 |           0 |<br />
| cb       | operatorsystemqueue           |      0 |           0 |<br />
| cb       | streaminginfo                 |      0 |           0 |<br />
| cb       | recurstreaminginfoid_sequence |      0 |           0 |<br />
| cb       | participant                   |      0 |           0 |<br />
| cb       | prereggroupinfo               |      0 |           0 |<br />
| cb       | pollid_sequence               |      0 |           0 |<br />
| cb       | slidepresentation             |      0 |           0 |<br />
| cb       | presentationid_sequence       |      0 |           0 |<br />
| cb       | participantbackup             |      0 |           0 |<br />
| cb       | recurrentattendeeinfo         |      0 |           0 |<br />
| cb       | systemqueueid_sequence        |      0 |           0 |<br />
| cb       | votingid_sequence             |      0 |           0 |<br />
| cb       | inslideconf                   |      0 |           0 |<br />
| cb       | subsystemhostinfo             |      0 |           0 |<br />
| cb       | numbercodelistid_sequence     |      0 |           0 |<br />
| cb       | poll                          |      0 |           0 |<br />
| cb       | resourcetracker               |      0 |           0 |<br />
| cb       | responseid_sequence           |      0 |           0 |<br />
| cb       | operatorassistinfo            |      0 |           0 |<br />
| cb       | questionid_sequence           |      0 |           0 |<br />
| cb       | recurrentstreamingparticipant |      0 |           0 |<br />
| cb       | prereggrouppasscodes          |      0 |           0 |<br />
| cb       | streaminginfoid_sequence      |      0 |           0 |<br />
| cb       | systemmessageid_sequence      |      0 |           0 |<br />
| cb       | confreservbackup              |      0 |           0 |<br />
| cb       | recurstreamingpartid_sequence |      0 |           0 |<br />
| cb       | staleuserpasswords            |      0 |           0 |<br />
| cb       | response                      |      0 |           0 |<br />
| cb       | confreservation               |      0 |           0 |<br />
| ipunity  | mandatory_header_check        |      0 |           0 |<br />
| cb       | systemmessages                |      0 |           0 |<br />
| cb       | participantbackupid_sequence  |      0 |           0 |<br />
+----------+-------------------------------+--------+-------------+<br />
61 rows in set (0.00 sec)<br />
<br />
From this output, you can see that there are no open tables or locks.  It appears that the error is misleading.<br />
<br />
The table that I am using is defined as:<br />
<br />
create table inconfinfo<br />
(<br />
    conferenceid                    VARCHAR(32) NOT NULL,<br />
    reservnumport                   DECIMAL(38),<br />
    reservstarttime                 DATETIME,<br />
    confduration                    DECIMAL(38),<br />
    islockconf                      DECIMAL(38),<br />
    scpuconfid                      DECIMAL(38),<br />
    actstarttime                    DATETIME,<br />
    actendtime                      DATETIME,<br />
    meetingtype                     DECIMAL(38),<br />
    confvolume                      DECIMAL(38),<br />
    isrecordstate                   DECIMAL(38),<br />
    iscontwithoutmoderator          DECIMAL(38),<br />
    meetingname                     VARCHAR(180),<br />
    meetingagenda                   VARCHAR(512),<br />
    isconfactive                    DECIMAL(38),<br />
    iswhisperused                   DECIMAL(38),<br />
    islectureused                   DECIMAL(38),<br />
    israisedhandused                DECIMAL(38),<br />
    isdataloggedinused              DECIMAL(38),<br />
    isrecordused                    DECIMAL(38),<br />
    islockedused                    DECIMAL(38),<br />
    isvolumechangeused              DECIMAL(38),<br />
    confreservid                    DECIMAL(38) NOT NULL,<br />
    inconfbackupid                  DECIMAL(38),<br />
    orgid                           DECIMAL(38),<br />
    isrecurring                     DECIMAL(38),<br />
    initactivenumport               DECIMAL(38),<br />
    maxpassnumport                  DECIMAL(38),<br />
    mediaserverid                   DECIMAL(38),<br />
    mediaserverlocalename           VARCHAR(255),<br />
    mediaserverhostname             VARCHAR(255),<br />
    namerecordingdirname            VARCHAR(255),<br />
    conferencedirectory             VARCHAR(256),<br />
    namerecordingenabled            DECIMAL(38),<br />
    entryoption                     DECIMAL(38),<br />
    exitoption                      DECIMAL(38),<br />
    entrygenannfilename             VARCHAR(256),<br />
    exitgenannfilename              VARCHAR(256),<br />
    talkindicator                   NUMERIC,<br />
    refreshtime                     NUMERIC,<br />
    confmode                        DECIMAL(38),<br />
    videotemplate                   VARCHAR(256),<br />
    streamingsessionid              DECIMAL(38),<br />
    streamingurl                    VARCHAR(256),<br />
    streamingserverip               VARCHAR(256)<br />
) TYPE=InnoDB;<br />
<br />
The statement that keeps locking up is:<br />
INSERT INTO INCONFINFO (INCONFINFO.CONFERENCEID, INCONFINFO.RESERVNUMPORT, INCONFINFO.RESERVSTARTTIME, INCONFINFO.CONFDURATION, INCONFINFO.ISLOCKCONF, INCONFINFO.ACTSTARTTIME, INCONFINFO.ACTENDTIME,INCONFINFO.MEETINGTYPE, INCONFINFO.CONFVOLUME, INCONFINFO.ISRECORDSTATE, INCONFINFO.ISCONTWITHOUTMODERATOR, INCONFINFO.CONFRESERVID, INCONFINFO.ORGID, INCONFINFO.MEETINGNAME, INCONFINFO.MEETINGAGENDA, INCONFINFO.ISRECURRING, INCONFINFO.INITACTIVENUMPORT, INCONFINFO.MAXPASSNUMPORT, INCONFINFO.NAMERECORDINGENABLED, INCONFINFO.CONFERENCEDIRECTORY, INCONFINFO.ENTRYOPTION, INCONFINFO.EXITOPTION, INCONFINFO.ENTRYGENANNFILENAME, INCONFINFO.EXITGENANNFILENAME, INCONFINFO.CONFMODE, INCONFINFO.VIDEOTEMPLATE) VALUES ( '101', 6, '2009-11-04 09:44:29', 720, 0, '2009-11-04 09:44:29', '2009-11-04 21:44:29', 2, 3, 0, 0, 2, 3, ' ', ' ', 0, -1, -1, 0, null, 0, 0, null, null, 1, '8_Region_Layout');<br />
<br />
The command used to do insert (code snippet):<br />
<br />
        try<br />
        {<br />
            conn.inConfInsertStmt.setString(1, confid);<br />
            conn.inConfInsertStmt.setInt(2, numOfReservPorts);<br />
            conn.inConfInsertStmt.setTimestamp(3, reservStartTime);<br />
            conn.inConfInsertStmt.setInt(4, duration);<br />
            conn.inConfInsertStmt.setInt(5, lockConf);<br />
            // conn.inConfInsertStmt.setInt(6, scpuConfId);<br />
            conn.inConfInsertStmt.setTimestamp(6, confActStartTime);<br />
            conn.inConfInsertStmt.setTimestamp(7, confActEndTime);<br />
            conn.inConfInsertStmt.setInt(8, meetingType);<br />
            conn.inConfInsertStmt.setInt(9, confVolume);<br />
            conn.inConfInsertStmt.setInt(10, recordState);<br />
            conn.inConfInsertStmt.setInt(11, contWithOutMod);<br />
            conn.inConfInsertStmt.setLong(12, confReservId);<br />
            conn.inConfInsertStmt.setInt(13, orgId);<br />
            conn.inConfInsertStmt.setString(14, meetingName);<br />
            conn.inConfInsertStmt.setString(15, meetingAgenda);<br />
            conn.inConfInsertStmt.setInt(16, isRecurring);<br />
            conn.inConfInsertStmt.setInt(17, initActiveNumPort);<br />
            conn.inConfInsertStmt.setInt(18, maxPassNumPort);<br />
            conn.inConfInsertStmt.setInt(19, isRecordNameEnabled);<br />
            conn.inConfInsertStmt.setString(20, conferenceDir);<br />
            conn.inConfInsertStmt.setInt(21, entryOptions);<br />
            conn.inConfInsertStmt.setInt(22, exitOptions);<br />
            conn.inConfInsertStmt.setString(23, entryGenAnnFileName);<br />
            conn.inConfInsertStmt.setString(24, exitGenAnnFileName);<br />
            conn.inConfInsertStmt.setInt(25, confMode ? 1 : 0);<br />
            conn.inConfInsertStmt.setString(26, videoTemplateID);<br />
<br />
            int result = conn.inConfInsertStmt.executeUpdate();<br />
 <br />
            .....<br />
<br />
With inConfInsertStmt defined as:<br />
<br />
    this.inConfInsertStmt = prepareStatement(inConfInsertQuery);<br />
<br />
    protected static final String inConfInsertQuery =<br />
        &quot;INSERT INTO INCONFINFO (INCONFINFO.CONFERENCEID, INCONFINFO.RESERVNUMPORT, &quot;<br />
            + &quot;INCONFINFO.RESERVSTARTTIME, INCONFINFO.CONFDURATION, INCONFINFO.ISLOCKCONF, &quot;<br />
            + &quot;INCONFINFO.ACTSTARTTIME, INCONFINFO.ACTENDTIME,&quot;<br />
            + &quot;INCONFINFO.MEETINGTYPE, INCONFINFO.CONFVOLUME, &quot;<br />
            + &quot;INCONFINFO.ISRECORDSTATE, INCONFINFO.ISCONTWITHOUTMODERATOR, &quot;<br />
            + &quot;INCONFINFO.CONFRESERVID, INCONFINFO.ORGID, INCONFINFO.MEETINGNAME, INCONFINFO.MEETINGAGENDA, &quot;<br />
            + &quot;INCONFINFO.ISRECURRING, INCONFINFO.INITACTIVENUMPORT, INCONFINFO.MAXPASSNUMPORT, &quot;<br />
            + &quot;INCONFINFO.NAMERECORDINGENABLED, INCONFINFO.CONFERENCEDIRECTORY, &quot;<br />
            + &quot;INCONFINFO.ENTRYOPTION, INCONFINFO.EXITOPTION, &quot;<br />
            + &quot;INCONFINFO.ENTRYGENANNFILENAME, INCONFINFO.EXITGENANNFILENAME, INCONFINFO.CONFMODE, &quot;<br />
            + &quot;INCONFINFO.VIDEOTEMPLATE) &quot;<br />
            + &quot;VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)&quot;;<br />
<br />
<br />
<br />
Thanks in Advance]]></description>
            <dc:creator>Richard Fox</dc:creator>
            <category>QA</category>
            <pubDate>Wed, 04 Nov 2009 16:33:25 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,288589,288589#msg-288589</guid>
            <title>ORDER BY RAND() in subqueries (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,288589,288589#msg-288589</link>
            <description><![CDATA[ I noticed when I used a sub query that has a ORDER BY RAND() in it, that the returned results are not random.  Is this a bug or something undocumented (or not easily found) that mysql doesn't support?<br />
<br />
My test query:<br />
SELECT id_topic<br />
FROM topics<br />
WHERE id_topic IN (<br />
    SELECT id_topic<br />
    FROM topics<br />
    ORDER BY RAND()<br />
);<br />
<br />
<br />
My results always return:<br />
1<br />
2<br />
3<br />
4<br />
etc..<br />
<br />
The subquery ran alone returns random results:<br />
412<br />
19<br />
871<br />
121<br />
etc..]]></description>
            <dc:creator>Jeremy D</dc:creator>
            <category>QA</category>
            <pubDate>Thu, 29 Oct 2009 21:06:31 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,288492,288492#msg-288492</guid>
            <title>Tables corrupted..repair taking long time. (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,288492,288492#msg-288492</link>
            <description><![CDATA[ Hi,<br />
<br />
Few tables in the database got corrupted which i found out from check table command.<br />
I am using Mysql version 5.1.30 (Myisam tables) i have given repair table command its taking long time and its failing. Is there any other way to recover the table.<br />
<br />
Regards,<br />
Ranjit]]></description>
            <dc:creator>ranjit woonna</dc:creator>
            <category>QA</category>
            <pubDate>Thu, 29 Oct 2009 10:19:29 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,287917,287917#msg-287917</guid>
            <title>stored procedure with parameter problem (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,287917,287917#msg-287917</link>
            <description><![CDATA[ I had created following procedure.<br />
<br />
DELIMITER ;;<br />
<br />
DROP PROCEDURE IF EXISTS getAllPortfoliosDemo;;<br />
<br />
    CREATE PROCEDURE getAllPortfoliosDemo( IN keyid INT(10)) <br />
        BEGIN <br />
            DECLARE whereString char(100);<br />
            <br />
            IF (keyid &gt; 0 ) THEN<br />
                SET  whereString =  CONCAT( ' WHERE pkid = ', keyid );<br />
            ELSE<br />
            	SET whereString = ' WHERE 1 ';<br />
            END IF;<br />
                 <br />
                  <br />
            SELECT pkid, title FROM Portfolio whereString;<br />
                          <br />
        END ;;<br />
<br />
this query returns no error. it works well without parameters.<br />
for eg   CALL getAllPortfoliosDemo(); works. but it didn't works with a parameter. for eg<br />
CALL getAllPortfoliosDemo(5); didn't returns any row.<br />
<br />
also i tried the following alternate query<br />
<br />
DELIMITER ;;<br />
<br />
    DROP PROCEDURE IF EXISTS getAllPortfoliosDemo;;<br />
<br />
    CREATE PROCEDURE getAllPortfoliosDemo( IN keyid INT(10)) <br />
        BEGIN <br />
            DECLARE whereString char(100) DEFAULT NULL;<br />
            <br />
            IF (keyid &gt; 0 ) THEN<br />
                SET  whereString =  CONCAT( ' AND pkid = ', keyid );<br />
            END IF;<br />
                 <br />
                  <br />
            SET @SQLstmt =  CONCAT('SELECT pkid, title FROM Portfolio ', whereString) ;<br />
                <br />
            PREPARE SQLbase FROM @SQLstmt;<br />
	    EXECUTE SQLbase;<br />
	    DEALLOCATE PREPARE SQLbase;<br />
  <br />
        END ;;       <br />
<br />
this also didn't returns any result set. any one can a sagest a method. thanks in advance]]></description>
            <dc:creator>riyas kp</dc:creator>
            <category>QA</category>
            <pubDate>Mon, 26 Oct 2009 12:03:16 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,287688,287688#msg-287688</guid>
            <title>[HELP] - Database corruption (1 reply)</title>
            <link>http://forums.mysql.com/read.php?132,287688,287688#msg-287688</link>
            <description><![CDATA[ Hi<br />
<br />
I had an power outage and after that it seems one of my databese as became corrupted. It shows an abnormal behaviour.<br />
<br />
1 - any other DB on the same server shows no problem. I can open them and all the tables.<br />
<br />
2 - when i try to acess my database (however i try - mysqladministrator or phpmyadmin) the mysql server on the server machin stops and i have to restart a mysql instance.<br />
<br />
if i acess a table, from this database, directly (using php scripts or using phpmyadmin - by changing the url) i can acess it and see all my data.<br />
<br />
i believe there was and corruption on the database when the power was cut. <br />
I have tried searching topics on database corruption but i can find only help in table corruption, using a CHECK TABLE SQL statement, mysqlcheck or myisamchk not on the database itself.<br />
<br />
Is there anything i can try to repair my database?]]></description>
            <dc:creator>Luis Azevedo</dc:creator>
            <category>QA</category>
            <pubDate>Mon, 26 Oct 2009 11:00:54 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,287275,287275#msg-287275</guid>
            <title>Logic behind rand() (1 reply)</title>
            <link>http://forums.mysql.com/read.php?132,287275,287275#msg-287275</link>
            <description><![CDATA[ I'm using the rand() function to perform a random pick of a contest submission, so I need to document how the rand() function actually &quot;calculates&quot; a random number that can be used to pick out a random record through a query like the following:<br />
<br />
SELECT *<br />
FROM table<br />
order by rand()<br />
limit 1<br />
<br />
Can anyone explain the logic for me?<br />
<br />
Thank you]]></description>
            <dc:creator>Steve Kim</dc:creator>
            <category>QA</category>
            <pubDate>Thu, 22 Oct 2009 14:11:14 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,287274,287274#msg-287274</guid>
            <title>Logic behind rand() (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,287274,287274#msg-287274</link>
            <description><![CDATA[ I'm using the rand() function to perform a random pick of a contest submission, so I need to document how the rand() function actually &quot;calculates&quot; a random number that can be used to pick out a random record through a query like the following:<br />
<br />
SELECT *<br />
FROM table<br />
order by rand()<br />
limit 1<br />
<br />
Can anyone explain the logic for me?<br />
<br />
Thank you]]></description>
            <dc:creator>Steve Kim</dc:creator>
            <category>QA</category>
            <pubDate>Wed, 21 Oct 2009 16:21:44 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,287077,287077#msg-287077</guid>
            <title>Problem with site (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,287077,287077#msg-287077</link>
            <description><![CDATA[ Hello,<br />
<br />
I'm having problems in my site, to access the site and then click on something within the page will open my page with white background to say &quot;501 Method Not Implemented&quot; and where the site is link <a rel="nofollow"  href="http://kipolon.com/ld/prox/">http://kipolon.com/ld/prox/</a><br />
<br />
A bit weird.. be virus?<br />
<br />
Somebody help me sff.<br />
<br />
Thanks]]></description>
            <dc:creator>Jorge Lopes</dc:creator>
            <category>QA</category>
            <pubDate>Tue, 20 Oct 2009 13:55:09 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,287063,287063#msg-287063</guid>
            <title>String used to test INT column in WHERE is truncated (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,287063,287063#msg-287063</link>
            <description><![CDATA[ I was being lazy when writing some SQL in a table that had an AUTO_INCREMENT column. When a sting say '12ab342' is used in a where clause to check the AUTO_INCREMENT column it is truncated to 12 and checked.<br />
<br />
Eg.<br />
<br />
table 'test' lets say:<br />
<br />
id INT AUTO_INCREMENT<br />
txt_id VARCHAR(10)<br />
Engine: innoDB<br />
<br />
+------+--------+<br />
|    id|  txt_id|<br />
+------+--------+<br />
|     1| a23hsf3|<br />
|     2| 1d3hsf3|<br />
|     3| c23hsf3|<br />
|     4| 423hsf3|<br />
+------+--------+<br />
<br />
Using this SQL statement the following results are returned<br />
SELECT * FROM test WHERE id = '1d3hsf3' OR txt_id = '1d3hsf3';<br />
<br />
+------+--------+<br />
|    id|  txt_id|<br />
+------+--------+<br />
|     1| a23hsf3|<br />
|     2| 1d3hsf3|<br />
+------+--------+<br />
<br />
Here I didn't bother checking the type of id and assumed that MySQL would fail on the first check of id (as its an auto increment integer) however it returned id 1 and 2!<br />
<br />
likewise the test:<br />
SELECT * FROM test WHERE id = '1d3hsf3';<br />
<br />
returns:<br />
+------+--------+<br />
|    id|  txt_id|<br />
+------+--------+<br />
|     1| a23hsf3|<br />
+------+--------+<br />
<br />
Is this expected behaviour and why? I am using MySQL-server-community-5.1.37-0.rhel5.x86_64<br />
<br />
I can fix the issue by type casting the id as a string in the query<br />
eg. SELECT * FROM test WHERE CAST(id AS CHAR) = '1d3hsf3' OR txt_id = '1d3hsf3';<br />
but then the index is not used.<br />
<br />
Obviously my code before getting to the database side of things was quite sloppy in this case and I have fixed this now but I was surprised to get this result.<br />
<br />
Any comments?]]></description>
            <dc:creator>Allan Randall</dc:creator>
            <category>QA</category>
            <pubDate>Tue, 20 Oct 2009 12:13:47 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,286350,286350#msg-286350</guid>
            <title>set an execute statement (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,286350,286350#msg-286350</link>
            <description><![CDATA[ using this:<br />
<br />
SET @skip=1; SET @numrows=1;<br />
PREPARE STMT FROM 'SELECT number FROM test LIMIT ?, ?';<br />
EXECUTE STMT USING @skip, @numrows;<br />
<br />
how do I SET an variable to this number? looked everywhere.]]></description>
            <dc:creator>mik jid</dc:creator>
            <category>QA</category>
            <pubDate>Thu, 15 Oct 2009 14:11:05 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,286296,286296#msg-286296</guid>
            <title>unable to write 'random state' (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,286296,286296#msg-286296</link>
            <description><![CDATA[ Hi every one<br />
i am getting this type of message when setting server and client certificate.<br />
<br />
C:\newcerts&gt;openssl x509 -req -in<br />
ey ca-key.pem -set_serial 01 &gt; cl<br />
Loading 'screen' into random stat<br />
Signature ok<br />
subject=/C=IN/ST=New York/L=New Y<br />
ailAddress=info@smilemd.com<br />
Getting CA Private Key<br />
unable to write 'random state'<br />
<br />
i want to configured ssl for Mysql on windows os. i have downloaded the Openssl and installed it and follow all the instruction which have been mention <a rel="nofollow"  href="http://dev.mysql.com/doc/refman/5.1/en/secure-create-certs.html">http://dev.mysql.com/doc/refman/5.1/en/secure-create-certs.html</a> in this document for windows.<br />
<br />
Please help me <br />
Hemant Yadav<br />
Software Engineer<br />
<a rel="nofollow"  href="http://www.smilemd.com">http://www.smilemd.com</a>]]></description>
            <dc:creator>hemant yadav</dc:creator>
            <category>QA</category>
            <pubDate>Thu, 15 Oct 2009 07:37:20 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,286131,286131#msg-286131</guid>
            <title>crazy slow where aa in (select ...) (1 reply)</title>
            <link>http://forums.mysql.com/read.php?132,286131,286131#msg-286131</link>
            <description><![CDATA[ I have a table with 19mln recs and need to get only recs that match a field in a list of about 200k. table fixacc has a single field with unique indexed values and was created just to save the subquery and improve speed.<br />
<br />
SELECT b.`prod`, b.`acc`, b.`yearmon`, b.`bd`, b.`sd`, b.`fa`, b.`rd`, b.`matd`, b.`term`, b.`disc`, b.`payd`<br />
FROM branch60f b where acc in (select acc from fixacc)<br />
into outfile 'c:/pr1/nls/try1.csv' fields terminated by ','<br />
<br />
it is still running on day 4 ...<br />
I think it takes each record from the 19mln and then checks whether acc is in the fixacc table, so it will run 19mln queries.<br />
<br />
Is that the way it should be done or I did sth bad? <br />
<br />
Thank you all for looking.<br />
Stephen]]></description>
            <dc:creator>stephen bond</dc:creator>
            <category>QA</category>
            <pubDate>Wed, 14 Oct 2009 17:04:05 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,285812,285812#msg-285812</guid>
            <title>Connection via SSL (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,285812,285812#msg-285812</link>
            <description><![CDATA[ using openssl, I followed the section on the <a rel="nofollow"  href="http://dev.mysql.com/doc/refman/5.0/en/secure-using-ssl.html">http://dev.mysql.com/doc/refman/5.0/en/secure-using-ssl.html</a><br />
<br />
mysql&gt; SHOW VARIABLES LIKE 'have_ssl';<br />
+---------------+-------------+<br />
| Variable_name | Value       |<br />
+---------------+-------------+<br />
| have_ssl      | Dissabled   |<br />
+---------------+-------------+<br />
<br />
&quot;If the value is DISABLED, the server supports SSL connections but was not started with the appropriate --ssl-xxx  options&quot; <br />
<br />
So How to enable it?? what are the appropriate --ssl-xxx  options?]]></description>
            <dc:creator>ming cui</dc:creator>
            <category>QA</category>
            <pubDate>Mon, 12 Oct 2009 16:16:37 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,285434,285434#msg-285434</guid>
            <title>5.4 defaults-extra-file deprecated/bug? (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,285434,285434#msg-285434</link>
            <description><![CDATA[ I'm posting this before reporting a bug. Please let me know if you agree that this is a bug.<br />
<br />
I upgraded 5.4.1 to 5.4.2 on FreeBSD 7.2-RELEASE-p2 using ports via portupgrade. After the upgrade the rc.d/mysql-server script no longer works. It generates the error:<br />
<br />
091009  7:38:34 [ERROR] /usr/local/libexec/mysqld: unknown variable 'defaults-extra-file=/var/db/mysql/my.cnf'<br />
091009  7:38:34 [ERROR] Aborting<br />
<br />
Has this option been deprecated, is it no longer valid on the command-line or has its syntax changed? This option is invoked by the command_args in the rc.d script.]]></description>
            <dc:creator>Yvan Rodrigues</dc:creator>
            <category>QA</category>
            <pubDate>Fri, 09 Oct 2009 11:56:26 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,285376,285376#msg-285376</guid>
            <title>MySQL: Error 1005; OLD Constraints still exist after DROP DATABASE in new database; (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,285376,285376#msg-285376</link>
            <description><![CDATA[ Hi Guys<br />
<br />
I am at my wits end with this one. The problem is simple, I am using the InnoDB engine. I created a database, added 4 or 5 tables with relationships between them. I then dropped the database.<br />
<br />
I came back and recreated the database with the same name again. I have started to create new tables, some of which share names from the old database, and they are failing with:<br />
<br />
Error 1005 (HY000) at line 42: Can't create table './dir/table.frm' (errno: 150)<br />
<br />
I had a look in the InnoDB engine status and found:<br />
<br />
Error in foreign key constraint of table db/entity_user-details: there is no index in referenced table which would contain the columns as the first columns, or the data types in the referenced table do not match to the ones in the table. Constraint: CONSTRAINT ENTITIES_ENTITY_USER-DETAILS FOREIGN KEY (entity) REFERENCES entities(entity) ON DELETE CASCADE ON UPDATE CASCADE<br />
<br />
This constraint should have definitely been removed when the old database was initially removed but it appears to have stuck around and become involved in the new database of the same name and is haunting me.<br />
<br />
I've tried droppingDB/restarting mysql/restarting system in multiple orders and combinations. I've tried SET FOREIGN_KEY_CHECKS. I've tried physically trashing the data files in the MySQL directory with no luck.<br />
<br />
I'm hoping somebody can help here..<br />
<br />
<br />
Cheers<br />
<br />
Luke]]></description>
            <dc:creator>Luke Wallace</dc:creator>
            <category>QA</category>
            <pubDate>Fri, 09 Oct 2009 02:06:50 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,285131,285131#msg-285131</guid>
            <title>LEFT JOIN problem (1 reply)</title>
            <link>http://forums.mysql.com/read.php?132,285131,285131#msg-285131</link>
            <description><![CDATA[ I currently have two tables which I am trying to join in order to figure out who has not filled a report for a given time period.<br />
<br />
There is a 'child' table and a 'file_report' table. <br />
<br />
My difficulty lies in that the 'file_report' table contains many instances of a 'child' filing a report and I can't get a nice list of all users who have not filed a report this week. I can quickly find those who have, I just need to MINUS that from all users.<br />
<br />
# Current JOIN showing all reports completed for a time period<br />
SELECT child.child_id, child.surveyor_id, child.name<br />
FROM `child`<br />
LEFT JOIN file_report ON child.child_id = file_report.child_id<br />
WHERE<br />
file_report.filed_date &gt;= '2009-09-28'<br />
AND file_report.filed_date &lt;= '2009-10-05'<br />
<br />
I was using the WHERE below, but this includes users who've filed reports for this time period.<br />
<br />
WHERE filed_date IS NULL<br />
OR filed_date &lt; '2009-09-28'<br />
OR filed_date &gt; '2009-10-05'<br />
<br />
I really just need is something like below, but that obviously works in SQL.<br />
SELECT * FROM `child`<br />
MINUS<br />
SELECT child.* FROM `child`, `file_report` <br />
WHERE `child`.child_id = `file_report`.child_id<br />
AND `file_report`.filed_date &gt;= 'start_date'<br />
AND `file_report`.filed_date &lt;= 'end_date']]></description>
            <dc:creator>Morgan Leek</dc:creator>
            <category>QA</category>
            <pubDate>Thu, 08 Oct 2009 04:52:20 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?132,285063,285063#msg-285063</guid>
            <title>UPDATE statement with RANK (no replies)</title>
            <link>http://forums.mysql.com/read.php?132,285063,285063#msg-285063</link>
            <description><![CDATA[ Hello,<br />
<br />
I wondered if anyone could help me with a probably simple SQL command. I use DB2 SQL so I've noticed some changes are hitting me for 6 on something I used to do on DB2.<br />
<br />
My problem is that I'm creating a mini league table and trying to store the positions of the team that week by terms of RANK.<br />
<br />
I'll give a bit of background first about the tables and their structure...<br />
<br />
Tablename INS_CONTROL<br />
columns   date_week<br />
<br />
Tablename REP_TABLE<br />
columns   date_week (k), team_code (k), points_this_week, points_last_week, points_total, position_this_week, position_last_week<br />
<br />
Example of data...<br />
<br />
date_week  team_code  points_t_w, points_l_w, points_t, position_t_w, position_l_w<br />
200901     AAA        10          0           10        0             0<br />
200901     BBB        20          0           20        0             0<br />
200901     CCC        30          0           30        0             0<br />
200902     AAA        40          10          50        0             0<br />
200902     BBB        10          20          30        0             0<br />
200902     CCC        5           30          35        0             0<br />
200903     AAA        20          40          70        0             0<br />
200903     BBB        15          10          45        0             0<br />
200903     CCC        50          5           85        0             0<br />
<br />
<br />
What I would like to do is populate the column position_t_w with the current position they were in based on the points_t column for that week.<br />
<br />
This data runs weekly and will add a new week in every time, so its only the current week I am wanting to update. I wrote something along the lines of...<br />
<br />
<br />
DROP TABLE IF EXISTS SESSION_REP_TABLE<br />
;<br />
<br />
CREATE TEMPORARY TABLE SESSION_REP_TABLE SELECT * FROM REP_TABLE;<br />
;<br />
<br />
SET @rownum :=0<br />
;<br />
<br />
UPDATE REP_TABLE I<br />
SET<br />
  I.position_this_week = (SELECT<br />
                            @rownum := @rownum + 1<br />
                          FROM<br />
                            SESSION_REP_TABLE J<br />
                          WHERE<br />
                            I.team_code = J.team_code<br />
                          ORDER BY<br />
                            J.points_total desc)<br />
WHERE<br />
  I.date_week = (SELECT<br />
                   date_week<br />
                 FROM<br />
                   INS_CONTROL)<br />
<br />
But this seems to put the rank in any old order assigned to any team.<br />
<br />
In DB2 I would just use a MERGE statement but I can't seem to find that in MySQL unless i'm missing something.<br />
<br />
Any help would be much appreciated. Thanks]]></description>
            <dc:creator>Richard Cranney</dc:creator>
            <category>QA</category>
            <pubDate>Wed, 07 Oct 2009 19:08:39 +0000</pubDate>
        </item>
    </channel>
</rss>
