Upgrading the MySQL version?

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Upgrading the MySQL version?

Postby haravikk » 11. May 2006 16:09

Just installed Xampp today and I'm loving it! It's running extremely fast and was fairly easy to install.

However, one issue is with MySQL, the version currently included (5.0.15) actually has a few nasty bugs in it! Namely joins don't recognise others tables, so a query like:

Code: Select all
SELECT *
FROM table1 t1, table2 t2
LEFT JOIN table3 t3 ON t3.id = t1.user
WHERE t1.id = t2.id


Will fail with an error of "Unknown column 't1.user' in 'on clause'".

Now, as far as I'm aware this syntax hasn't changed, and it worked fine in v4.0.11 of MySQL which I had before.

Anyway, I'm assuming it's a bug, and MySQL v5.0.21 is now out and considered the current stable version, so I'd like to install that, however xampp seems to have all the files in loads of custom locations, so I have no idea what I'm supposed to do in order to upgrade them.
Any help to do this, or a new release of Xampp with the new version would be awesome!

Thanks!
Being Haravikk gets you girls like these:
Image
User avatar
haravikk
 
Posts: 2
Joined: 11. May 2006 15:59

Postby Wiedmann » 11. May 2006 17:55

Will fail with an error of "Unknown column 't1.user' in 'on clause'".

Right, read the MySQL Doku about JOIN.

It should something like (untested):
Code: Select all
SELECT *
FROM (table1 AS t1, table2 AS t2)
LEFT JOIN table3 AS t3 ON (t3.id = t1.user)
WHERE t1.id = t2.id
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby haravikk » 12. May 2006 20:38

Hrm, thanks for the reply! For some reason that works, thanks!

What I don't get then is why MySQL has changed from version 4 to 5 in favour of less less compact queries, IMO it's bad enough that queries are handed in as strings to begin with, now they want me to use brackets and "AS" everywhere when I didn't need to before?!

Oh well, that's it all up and working again at least!

But yeah, MySQL could still do with an update :)
Being Haravikk gets you girls like these:
Image
User avatar
haravikk
 
Posts: 2
Joined: 11. May 2006 15:59

Postby Wiedmann » 12. May 2006 22:29

now they want me to use "AS" everywhere

There is no need to use "AS". But is a good programming style to use "AS" if you mean "AS" ;-)

now they want me to use brackets when I didn't need to before?!

Well, that was an old "bug" in MySQL. And since MySQL 5.0.12 they follow the official SQL standard.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 62 guests