Re: SELECT /*!40001 SQL_NO_CACHE */ * FROM `ROUTEDATA` message
Logg, Connie A. wrote: I am running mysql version 5.0.24 and am seeing this error when running mysqldump. From what I can find on the web, this message is generated by an error in the mysql code. Please correct me if I am wrong. Is this fixed in mysql 5.0.27 ? Thanks, Connie Logg, Network Analyst Stanford Linear Accelerator Center ph: 650-926-2879 Happiness is found along the way, not at the end of the road, and 'IF' is the middle word in life. Connie, this is not an error but a normal SQL statement with a hint: /*!40001 SQL_NO_CACHE */ means that MySQL shall not cache this query and its corresponding result set. That makes perfect sense because one can assume that this statement will be issued just once (by mysqldump) and you wouldn't benefit from caching it. It seems that it takes a long time for this select to complete but there are not many ways to improve the situation. Maybe a faster (and exclusive) dump device? Do you use replication? That can help a lot because then o you can seperate workload (master) and dump activities (slave) o you can silence the slave and dump the slave in a consistent manner because no data changes during the dump. o you can set up more slaves to spread the workload even more From what you told about the completion time of your dump it seems you should re-design your whole MySQL setup. Regards, Frank. -- Dr. Frank Ullrich, DBA Netzwerkadministration Heise Zeitschriften Verlag GmbH Co KG, Helstorfer Str. 7, D-30625 Hannover E-Mail: [EMAIL PROTECTED] Phone: +49 511 5352 587; FAX: +49 511 5352 538 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
UPDATE LOW_PRIORITY
Given: Client A: SELECT * FROM mytable WHERE status = 1; Client B: UPDATE LOW_PRIORITY mytable SET status = 2 WHERE id = $n How long will A prevent B from writing? I'm concerned that clients like A will prevent B from ever writing. In practice, how long does a low priority write typically have to wait? The docs say that they will wait until no clients are reading from the table, so if a client does a select on a whole bunch of records and then iterates through them, will the updates be blocked until it's finished? Or can it do the updates in between reads of each record? I'm trying to speed up some updates that happen very frequently - I can't safely batch them (because they represent thing that have happened elsewhere that cannot be rolled back). I'm also finding that the updates are getting steadily slower as the table gets bigger (around 1.2M records at present) - any tips for that? Marcus -- Marcus Bointon Synchromedia Limited: Creators of http://www.smartmessages.net/ [EMAIL PROTECTED] | http://www.synchromedia.co.uk/ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Contents storing in mysql
Hi , I wanted to store images , musics, videos ..etc in mysql database.storing contents as content type BLOB , i don't have any issues with that setup. But , now i need to store that contents in folders and should be kept the contents path with referrence ofcontents file name . for eample , if i have a image called sky.jpg . and that image stored in the /usr/local/wallpapers/sky.jpg. In my database , i have defined fields like , filename , filesize, imagepath, contenttype. How can i do that ? can you give me any help ful links ? Thanx in advance, Shaine. - All New Yahoo! Mail Tired of [EMAIL PROTECTED]@! come-ons? Let our SpamGuard protect you.
Re: More info about 40001 SQL_NO_CACHE
The only time I ever saw a message just hang out in the processlist like that is when I ran a mysqldump and piped it directly to mysql to load data directly from one MySQL server to another. While doing this, the target MySQL system ran out of room on the mounted drive where the datadir was pointing. So the message you seeing I also saw from the source machine. MySQL is a little polite in this matter. I just pauses and waits until there is more room on the available target's datadir to continue send more data to the target. From what you described, you problem sounds very simple yet complicated. Try to find out what software issued that SQL statement and its intended target. - Original Message - From: Connie A. Logg [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Wednesday, November 15, 2006 11:18:31 PM GMT-0500 US/Eastern Subject: More info about 40001 SQL_NO_CACHE This showed up in 'show processlist' and it had had an active time of about 4 days. Numerous other inquiries were hung behind it, although the other inquiries completed eventually...but they were so slow as to backup the data base entry code and extraditions for the analysis by several hours. Can someone please enlightn me on this problem? Like I mentioned, the web search entries indicated that this hanging was a mysql problem. I have upgraded to 5.0.27. But I will not know until tomorrow if the mysqldump that I do tonight works. -Original Message- From: Logg, Connie A. [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 11:41 AM To: mysql@lists.mysql.com Subject: SELECT /*!40001 SQL_NO_CACHE */ * FROM `ROUTEDATA` message I am running mysql version 5.0.24 and am seeing this error when running mysqldump. From what I can find on the web, this message is generated by an error in the mysql code. Please correct me if I am wrong. Is this fixed in mysql 5.0.27 ? Thanks, Connie Logg, Network Analyst Stanford Linear Accelerator Center ph: 650-926-2879 Happiness is found along the way, not at the end of the road, and 'IF' is the middle word in life. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Deadlock
Hi Ahmad, On 11/13/06, Ahmad Al-Twaijiry [EMAIL PROTECTED] wrote: also I want to mention that I have 3 primary key in my table: ShopID CustomerID OrderID Could this be the problem ? Yes, may be. Cause I am sure I have read somewhere in the docs that having multiple cols in the primary key of a single table slows down your updates. You should consider replacing the primary key with a unique index. Primary keys are good for single columns. -- Asif -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Concatenate a column in multiple rows into one column?
James - you should be able to do this with the GROUP_CONCAT function: http://dev.mysql.com/doc/refman/5.0/en/group-by-functions.html Dan On 11/15/06, James Eaton [EMAIL PROTECTED] wrote: I have a database with roughly the following structure: album -- albumid INT title VARCHAR(255) artist -- artistidINT nameVARCHAR(255) albumartist -- albumid INT artistidINT From the above, you can see that any given album can have more than one artist. For instance: album title: A Meeting by the River artist name: Ry Cooder artist name: V.M. Bhatt I'd like to run a query that returns one row per album, but somehow also returns all of the artists associated with the album (ideally concatenated with an ampersand seperator). Can this be done? titleartists --- -- A Meeting by the River Ry Cooder V.M.Bhat -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Concatenate a column in multiple rows into one column?
Try this... select a.title, group_concat(c.name SEPARATOR ' ') as name from album a join albumartist b on b.albumid=a.albumid join artist c on c.artistid=b.artistid group by a.title; Ed -Original Message- From: James Eaton [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 9:11 PM To: mysql@lists.mysql.com Subject: Concatenate a column in multiple rows into one column? I have a database with roughly the following structure: album -- albumid INT title VARCHAR(255) artist -- artistidINT nameVARCHAR(255) albumartist -- albumid INT artistidINT From the above, you can see that any given album can have more than one artist. For instance: album title: A Meeting by the River artist name: Ry Cooder artist name: V.M. Bhatt I'd like to run a query that returns one row per album, but somehow also returns all of the artists associated with the album (ideally concatenated with an ampersand seperator). Can this be done? titleartists --- -- A Meeting by the River Ry Cooder V.M.Bhat -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Contents storing in mysql
This work has to be done in a client, since you have to manage external files. If the files are all uniquely named, then you could use filename as a key. In my case, I was linking the images to a product in another table. I used three tables: prod_table: == prod_num /* an auto-increment key */ ... /* other product specific information */ image_table: === image_num /* an auto-increment key */ original_image_name /* a key varchar field */ ... /* other information about uploaded images, such as file type (.jpg, .gif) */ prod_image_index: prod_num /* a key, holds the product number from prod_table */ image_num /* a key, holds the image number from image_table */ Then I name each image the same as its image_num, regardless of its original name. That avoids any collisions, and allows two images with the same original name to coexist. When someone uploads an image that goes with a specific product, I add a record to image_table and prod_image_index and store the file. If a product is deleted, I can easily find and delete the related image files when I delete the entries in prod_image_index. If someone wants to see the images for a particular product, I find them in prod_image_index. I follow the image_num back to image_table to get the original file name for the user's convenience. I can then display the image file (/imgs/1234, say) along with its original_file_name. If the user then chooses to delete an image, then I delete the file (/imgs/1234), the corresponding record in image_table, and the corresponding records in prod_image_index. I hope that helps. Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: Shain Lee [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 5:52 AM To: MySql Subject: Contents storing in mysql Hi , I wanted to store images , musics, videos ..etc in mysql database.storing contents as content type BLOB , i don't have any issues with that setup. But , now i need to store that contents in folders and should be kept the contents path with referrence of contents file name . for eample , if i have a image called sky.jpg . and that image stored in the /usr/local/wallpapers/sky.jpg. In my database , i have defined fields like , filename , filesize, imagepath, contenttype. How can i do that ? can you give me any help ful links ? Thanx in advance, Shaine. - All New Yahoo! Mail - Tired of [EMAIL PROTECTED]@! come-ons? Let our SpamGuard protect you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: How do I do this query efficiently?
Michael, SELECT t1.id, t1.version, t1.value FROM data t1 LEFT JOIN data t2 ON t1.id=t2.id AND t1.version t2.version WHERE t2.id IS NULL; I had almost the same problem and I found this solution very smart... even smarter than I can understand :) Can someone explain to me why/how this query works ? A two-step: 1. The left join creates a logical table with t1.ids on the left, and on the right ... (a) matching t2.ids, when t1.versiont2.version, or (b) nulls when t1.version=t2.version. 2. The where clause removes (a), leaving only the t1.ids for which there's no greater version. PB -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.6/536 - Release Date: 11/16/2006 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Re: mysqloptimize
Strictly an InnoDB issue. Dan On 11/16/06, Chaos Engine [EMAIL PROTECTED] wrote: 2006/11/15, Dan Buettner [EMAIL PROTECTED]: It's normal for space to not be reclaimed from the InnoDB file, yes. You could change your setup to use the 'innodb_file_per_table' option to change the behavior; with that in effect, deletes/dropped tables etc will lead to reclaimed space after optimizing. However, you'd also have to either drop your current data and re-import, or switch to myisam and back again to get the data into separate table files. Isn't there any easier solution to reclaim garbage space? This is somewhat silly to drop/reimport or convert tables to myisam and back again. Is it strickly innodb issue ? Dan On 11/15/06, Curtis Maurand [EMAIL PROTECTED] wrote: I think this question has been asked, but I have not yet found an answer to the problem. I'm running MySQL 5.0.22 on Gentoo Linux AMD 64. Its blazingly fast, mostly. I'm running a package called dbmail on it. http://www.dbmail.org. All mail is stored in the database. After running a dbmail-util which deleted somewhere around 9,000 messages, I ran mysqloptimize against the database. After running mysqloptimize the innodb file (ibdata1) was larger than it was before i started. is this normal? If not, how do I change the behavior? I'm happy to forward any relevant data that you need. Thanks, Curtis -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub= [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- Chaos greets U -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
test email
Sorry, but I haven't gotten any emails from the list and I'm trying to determine if there is a blockages. Sorry to disturb the list. --- William R. Mussatto, Senior Systems Engineer http://www.csz.com Ph. 909-920-9154 ext. 27 FAX. 909-608-7061 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
MySQL Error for Blobs
I got an error while entering an BMP image of 1.7MB size in a mediumblob field through MS Access 2003 with MyODBC 3.51.12 on Windows XP SP2 also with MySQL Query Browser and Navicat GUI tool. Navicat returned the error as 'Got a packet bigger than Max_allowed_packet bytes'. What this means?. Access and Query browser simple gives error as MySQL has gone away? Why? please help. Also please give a solution if we have to insert images/Other Objects of size more than 1 MB what we have to do using ODBC driver with/without MS Access VB.net? Thanks CPK
Re: MySQL Error for Blobs
max_allowed_packet is the maximum size of a single SQL statement. It's a setting on the server, as well as for the mysql command line interface. See http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html I think 1 MB is the default; the maximum setting for MySQL 5 is 1 GB. You can adjust this setting in the server config files (my.cnf or my.ini). I do not know if you need to adjust anything in Navicat, ODBC, Query Browser or Access - sorry! Dan On 11/16/06, C K [EMAIL PROTECTED] wrote: I got an error while entering an BMP image of 1.7MB size in a mediumblob field through MS Access 2003 with MyODBC 3.51.12 on Windows XP SP2 also with MySQL Query Browser and Navicat GUI tool. Navicat returned the error as 'Got a packet bigger than Max_allowed_packet bytes'. What this means?. Access and Query browser simple gives error as MySQL has gone away? Why? please help. Also please give a solution if we have to insert images/Other Objects of size more than 1 MB what we have to do using ODBC driver with/without MS Access VB.net? Thanks CPK -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: MySQL Error for Blobs
When a query exceeds the size of the maximum allowed packet, mysqld closes the connection. It assumes something has gone wrong with the client. There are two max_allowed_packet variables, one for the server and one for the client. This is documented in section A.2.9 of the documentation http://www.mysql.org/doc/refman/4.1/en/packet-too-large.html Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 -Original Message- From: C K [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 12:46 PM To: mysql@lists.mysql.com; [EMAIL PROTECTED] Subject: MySQL Error for Blobs I got an error while entering an BMP image of 1.7MB size in a mediumblob field through MS Access 2003 with MyODBC 3.51.12 on Windows XP SP2 also with MySQL Query Browser and Navicat GUI tool. Navicat returned the error as 'Got a packet bigger than Max_allowed_packet bytes'. What this means?. Access and Query browser simple gives error as MySQL has gone away? Why? please help. Also please give a solution if we have to insert images/Other Objects of size more than 1 MB what we have to do using ODBC driver with/without MS Access VB.net? Thanks CPK -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: More info about 40001 SQL_NO_CACHE
Thank you...All I was doing was a musqldump of the tables in my data base to files, one file for each table. Yesterday I upgraded to mysql 5.0.27, so I will watch it for a while. It just started happening last Saturday night, and I had been running the system for a few months. Thanks for you response. Connie Logg, Network Analyst Stanford Linear Accelerator Center ph: 650-926-2879 Happiness is found along the way, not at the end of the road, and 'IF' is the middle word in life. From: Howard Hart [mailto:[EMAIL PROTECTED] Sent: Thursday, November 16, 2006 8:41 AM To: Logg, Connie A. Subject: RE: More info about 40001 SQL_NO_CACHE Looks like this may have been fixed in 5.0.25 or above, so if it's the same bug, you're good to go. http://bugs.mysql.com/bug.php?id=21288 Howard -Original Message- From: Logg, Connie A. [mailto:[EMAIL PROTECTED] Sent: Wed 11/15/2006 8:18 PM To: mysql@lists.mysql.com Subject: More info about 40001 SQL_NO_CACHE This showed up in 'show processlist' and it had had an active time of about 4 days. Numerous other inquiries were hung behind it, although the other inquiries completed eventually...but they were so slow as to backup the data base entry code and extraditions for the analysis by several hours. Can someone please enlightn me on this problem? Like I mentioned, the web search entries indicated that this hanging was a mysql problem. I have upgraded to 5.0.27. But I will not know until tomorrow if the mysqldump that I do tonight works. -Original Message- From: Logg, Connie A. [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 11:41 AM To: mysql@lists.mysql.com Subject: SELECT /*!40001 SQL_NO_CACHE */ * FROM `ROUTEDATA` message I am running mysql version 5.0.24 and am seeing this error when running mysqldump. From what I can find on the web, this message is generated by an error in the mysql code. Please correct me if I am wrong. Is this fixed in mysql 5.0.27 ? Thanks, Connie Logg, Network Analyst Stanford Linear Accelerator Center ph: 650-926-2879 Happiness is found along the way, not at the end of the road, and 'IF' is the middle word in life. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: finding NULL records
Hi all, may I propose some slight corrections in wording ? Inserted below at the appropriate places: Jerry Schwartz wrote (re-ordered): -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 15, 2006 2:22 PM To: [EMAIL PROTECTED]; mysql@lists.mysql.com Subject: Re: finding NULL records [[...]] This is what happens when one of the most innovative concepts of SQL gets overlooked or understressed which it seems to be in most modern SQL books. The thing is that SQL's logic isn't binary. Rather it's built over three values: TRUE, FALSE, NULL. Nearly: The three values are typically called TRUE, FALSE, and UNKNOWN. A logic based on three values is then called ternary, AFAIR. You can indeed compare anything to NULL: You sure can, like you can compare apples to oranges - just the result is not meaningful. In SQL, NULL is no value, it rather describes the absence of any value. What often gets overlooked: absence of value is different from empty, so an empty string is a non-NULL value ! x = NULL in most systems is a valid syntax. The result is NULL if x is UNKNOWN [[...]] Even if it is valid syntax, you cannot really use it: Comparing something known (some value) to something unknown (no value present) cannot give you any definite result, so in SQL for *any* comparison operator op ( =... LIKE ... ) and *any* known (= non-NULL) value x (column, literal, expression, ...) the result of x op NULL is UNKNOWN. As a rough analogy, consider comparing some visible object to one which is hidden behind a curtain: You cannot tell whether they are identical or not, which one is larger, ... , so the result is UNKNOWN. Especially, the result is *not* FALSE ! If such a predicate is used in a WHERE condition, like in SELECT x, y, z FROM tab WHERE x op NULL then x op NULL evaluates to UNKNOWN, this is different from TRUE, and so the WHERE condition is not satisfied. x IS NULL on the other hand isn't a binary operator, it's an UNARY one with the result values of TRUE or FALSE. Correct. The whole join theory obviously revolves around NULL treatment but otherwise the NULL algebra becomes fuzzy. I'm not sure what the standards say to the question of sorting NULLs, or whether each null constitutes a separate group as in GROUP BY, or all can be grouped together, but the actual implementations often make the answers configurable. I don't have the standard at hand either, the only thing I remember is that it requires NULL to sort either less than or greater than all non-NULL values. Beyond that, it often becomes implementation-dependant. [[...]] The result of all but two expressions will be NULL (not 0 or 1) if either UNKNOWN side is NULL. The two exceptions are the operators IS NULL and IS NOT NULL. SELECT NULL = NULL; /* result is NULL */ UNKNOWN SELECT NULL IS NULL; /* result is 1, or TRUE */ SELECT NULL IS NOT NULL; /* result is 0, or FALSE */ Regards, Joerg -- Joerg Bruehe, Senior Production Engineer MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: finding NULL records
Hi all, I have to follow-up to myself, as I forgot one important thing: Joerg Bruehe wrote: [[...]] so in SQL for *any* comparison operator op ( =... LIKE ... ) and *any* known (= non-NULL) value x (column, literal, expression, ...) the result of x op NULL is UNKNOWN. The same holds if you compare two NULL expressions: It is UNKNOWN how two unknown (missing) values relate to each other. As a rough analogy, consider comparing some visible object to one which is hidden behind a curtain: You cannot tell whether they are identical or not, which one is larger, ... , so the result is UNKNOWN. Especially, the result is *not* FALSE ! And similar, you cannot say anything about two objects which are both hidden, especially, you cannot claim them to compare equal ! So even if two expressions x and y (say two columns) both are known to be NULL, the comparison x = y yields UNKNOWN. If you really want two NULL expressions to match a comparison, this should work: SELECT x, y, z FROM tab WHERE x = y OR x IS NULL AND y IS NULL (or any other comparison operator replacing the '='). Regards, Joerg -- Joerg Bruehe, Senior Production Engineer MySQL AB, www.mysql.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Contents storing in mysql
If your storing files in mysql, it's best to chunk/shard your data if your not doing so already. Example article/code at: http://www.dreamwerx.net/phpforum/?id=1 On Thu, 16 Nov 2006, Shain Lee wrote: Hi , I wanted to store images , musics, videos ..etc in mysql database.storing contents as content type BLOB , i don't have any issues with that setup. But , now i need to store that contents in folders and should be kept the contents path with referrence ofcontents file name . for eample , if i have a image called sky.jpg . and that image stored in the /usr/local/wallpapers/sky.jpg. In my database , i have defined fields like , filename , filesize, imagepath, contenttype. How can i do that ? can you give me any help ful links ? Thanx in advance, Shaine. - All New Yahoo! Mail ? Tired of [EMAIL PROTECTED]@! come-ons? Let our SpamGuard protect you. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: left join , Unknown column 't1.itemid' in 'on clause'
Hi, select * from t1,t2 left join t3 on t3.itemid=t1.itemid left join t4 on t4.f2=t1.f2 mysql4.1 works, but mysql5.0 shows Unknown column 't1.itemid' in 'on clause' If change into select * from t2,t1 left join t3 on t3.itemid=t1.itemid left join t4 on t4.f2=t1.f2 mysql4.1 works, but mysql5.0 shows Unknown column 't1.f2' in 'on clause' Shuming Wang Xtech Company limited Room 29H,17/F,Plaza 2, Tiancheng Building,No 96 Longkouxi Road, Tianhe Guangzhou,Guangdong,China http://www.xtech.com.cn http://www.87595959.com Email:[EMAIL PROTECTED] QQ:100200651 , MSN:[EMAIL PROTECTED] Tel:86-20-87595959, 86-755-61302424 ---2001,2002 Fax:86-20-61004435