Re: Why is MySQL using /tmp?

2009-06-11 Thread Amr Mostafa
If I understand the manual correctly, it uses /tmp for creating temporary tables if their size exceed the smaller of tmp_table_size or max_heap_table_size, otherwise, it will create the temporary table in memory. So if tmp_table_size is set to say 10Mb, and MySQL needs to create a temporary table

Re: dumb crash

2009-06-11 Thread Darryle Steplight
Hi PJ, Try adding innodb_force_recovery = 4 to the mysqld section of your config file before restarting the server.If you can dump your tables using 4 then only some data on corrupt individual pages is lost. If you have to use innodb_force_recovery = 6, that means your db pages are left in an

Re: Why is MySQL using /tmp?

2009-06-11 Thread Claudio Nanni
Yes it is used for temporary tables. You can also set the directory for temporary tables to some bigger partition. Cheers Claudio 2009/6/11 Amr Mostafa amr.most...@gmail.com If I understand the manual correctly, it uses /tmp for creating temporary tables if their size exceed the smaller of

Re: Why is MySQL using /tmp?

2009-06-11 Thread Paul DuBois
This might help: http://dev.mysql.com/doc/refman/5.1/en/temporary-files.html On Jun 11, 2009, at 12:51 AM, Mike Spreitzer wrote: I find my MySQL Community Edition 5.1.34 server running out of space on /tmp (which is indeed small). Why is it using /tmp? How much free space do I need on

group by different time period than functions allow

2009-06-11 Thread Andrey Dmitriev
Can someone point a link, or show an example. basically, i have something like select week(mydate), count(mystuff) from table group by week(mydate); however, I need week to start on Wed 9am and end next Wed. What's the easiest way to accomplish that? thanks, andrey -- MySQL General Mailing

ignore accents in order by

2009-06-11 Thread PJ
Is there a way to order lists while ignoring the accents? So far, I have found nothing simple; and I need to keep the accents for output. The language is French (and québécois) :-) TIA -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme.

RE: group by different time period than functions allow

2009-06-11 Thread Rolando Edwards
SELECT DT DT1,DATE_ADD(DT,INTERVAL 1 WEEK) DT2 FROM (SELECT DATE_ADD(DATE(DATE_ADD(NOW(),INTERVAL (DOW-DAYOFWEEK(NOW())) DAY)),INTERVAL HR HOUR) DT FROM (SELECT 4 DOW,9 HR) AA) A; This query will produce the previous Wed at 9AM to the next Wed 9AM. Run it in the MySQL Client and note the

RE: group by different time period than functions allow

2009-06-11 Thread Rolando Edwards
Correction !!! select week(A.mydate),count(A.mystuff) from table A, (SELECT DT DT1,DATE_ADD(DT,INTERVAL 1 WEEK) DT2 FROM (SELECT DATE_ADD(DATE(DATE_ADD(NOW(),INTERVAL (DOW-DAYOFWEEK(NOW())) DAY)),INTERVAL HR HOUR) DT FROM (SELECT 4 DOW, 9 HR) AA) AAA) B Where A.mydate = B.DT1 And A.mydate

INSERT INTO ... SELECT not inserting all rows

2009-06-11 Thread Müller Andreas
Dear All I'm trying to insert a bunch of data from TableA in TableB by doing SELECT INTO TableB (fieldA, fieldB, ...) SELECT fieldA, fieldB, ... FROM TableA GROUP BY fieldA, fieldC, ... ON DUPLICATE KEY UPDATE fieldZ = VALUES(fieldZ); On my PC this works fine. But on the Server, not all rows

Re: ignore accents in order by

2009-06-11 Thread Isart Montane
Hi, I'm not having any problem on my local computer mysql select text,text2 from table1 order by text2 desc; +--+---+ | text | text2 | +--+---+ | a| 1 | | �| 0 | +--+---+ mysqlselect text,text2 from table1 order by text2 desc; +--+---+ | text |

Re: ignore accents in order by

2009-06-11 Thread PJ
Isart Montane wrote: Hi, I'm not having any problem on my local computer mysql select text,text2 from table1 order by text2 desc; +--+---+ | text | text2 | +--+---+ | a   |    1 | | �   |    0 | +--+---+ mysqlselect text,text2 from table1