Re: setting the default of a date field

2012-01-27 Thread Peter Brawley
On 1/27/2012 2:24 PM, william drescher wrote: On 1/27/2012 3:21 PM, Peter Brawley wrote: On 1/27/2012 11:18 AM, william drescher wrote: Is there a way to set the default of a date field to the date the record is generated ? bill Use a TIMESTAMP. Default DATE(TIME) columns with Triggers. PB

Re: setting the default of a date field

2012-01-27 Thread william drescher
On 1/27/2012 3:21 PM, Peter Brawley wrote: On 1/27/2012 11:18 AM, william drescher wrote: Is there a way to set the default of a date field to the date the record is generated ? bill Use a TIMESTAMP. Default DATE(TIME) columns with Triggers. PB When I try ALTER TABLE `ptInfo` CHANGE `last

Re: setting the default of a date field

2012-01-27 Thread Peter Brawley
On 1/27/2012 11:18 AM, william drescher wrote: Is there a way to set the default of a date field to the date the record is generated ? bill Use a TIMESTAMP. Default DATE(TIME) columns with Triggers. PB -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubsc

Re: cannot pass time to function

2012-01-27 Thread Peter Brawley
On 1/27/2012 12:09 PM, John Heim wrote: I'm trying to create a function that formats a time in a standard way ('%H:%i'). But all I can seem to get back is null. DROP TABLE IF EXISTS bogus_table; CREATE TABLE IF NOT EXISTS bogus_table ( btime TIME ); INSERT INTO bogus_table VALUES ('12:34:56');

cannot pass time to function

2012-01-27 Thread John Heim
I'm trying to create a function that formats a time in a standard way ('%H:%i'). But all I can seem to get back is null. DROP TABLE IF EXISTS bogus_table; CREATE TABLE IF NOT EXISTS bogus_table ( btime TIME ); INSERT INTO bogus_table VALUES ('12:34:56'); DROP FUNCTION IF EXISTS bogus ; DELIMIT

Re: How to interrupt MySQL interpreter output?

2012-01-27 Thread Jan Steinman
> From: Dotan Cohen > > If I see that a query is taking a long time to finish, how can I > interrupt the MySQL CLI interpreter? Ctrl-C does not work. Thanks. Does Ctrl-Z suspend the process? If so, you can then use the progression: "kill -INT procnum; kill -QUIT procnum; kill -KILL procnum". N

Re: Script for cleaning data on a regular basis

2012-01-27 Thread walter harms
Am 26.01.2012 18:45, schrieb HalXsz SXndor: > 20120126 10:34 AM +0200, a bv > Database contains > tables (structures?) which gets montly data , and these tables are > named as > > name1_name2_ yearmonth . I only want to have the whole database system > for last 2 years, and automaticly

Re: This partition function is not allowed

2012-01-27 Thread Johan De Meersman
- Original Message - > From: "Adarsh Sharma" > > Is it possible I upgrade to higher version 5.5 with existing data Yes, look for the upgrade notes in the online documentation. -- Bier met grenadyn Is als mosterd by den wyn Sy die't drinkt, is eene kwezel Hy die't drinkt, is ras een eze

Re: How to interrupt MySQL interpreter output?

2012-01-27 Thread Johan De Meersman
- Original Message - > From: "P.R.Karthik" > > And also make sure that you have the SUPER privilege to kill it. Note that even then, it might not die immediately (although it's status in show processlist will change to "killed") if it's waiting for I/O. -- Bier met grenadyn Is als mo

Re: Script for cleaning data on a regular basis

2012-01-27 Thread Karen Abgarian
The original problem is traditionally resolved by partitioning the tables by historical range and creating a database job/event to drop older partitions and add the new ones. Depending on the environment, some might prefer shell scripts to do essentially the same. On Jan 27, 2012, at 3:08

Re: Script for cleaning data on a regular basis

2012-01-27 Thread Johan De Meersman
- Original Message - > From: "Halász Sándor" > > Therefore, it well may be easier to do it all in PHP, since therewith I agree with the assessment, but I take issue with this whole "do it in PHP/Python/language-of-the-month". Why would I want to install PHP, Python or whatever on a da

Re: MYD, MYI and TMD files

2012-01-27 Thread Johan De Meersman
- Original Message - > From: "kalin m" > > thanks. it took about 15 hrs. but right now everything seems ok. does > the check last as long as the repair? No, a check (myisamcheck -c or "check table" in sql) is a read operation that verifies structures, pointers and such but makes no chan