Re: MySQL Date problem
2008/10/19 Rama [EMAIL PROTECTED] hi, iam using java,hibernate,mysql i am storing *19-10-2008 (*of type java.sql.Date) (TIMEZONE GMT) to mysql DATE field. when i retrieve the same date from mysql to java it is being displayed as *18-10-2008 18:30:00 GMT * i could not able to figure out what is going wrong . can any one please guide me on What can go wrong in above scenario? there are a lot of mothods to express data in java,but in mysql only have one type. may be types not match. i think you should storing 19-10-2008 to mysql char(10) field. --rama
Re: MySQL Date problem
i figured out the root cause of the problem. 1) Java TIME ZONE is GMT --- storing DATE (2008-10-19 which is in GMT ) 2) storing the above date in GMT to mysql 3) MYSQL TIME ZONE IS GMT+05:30 4) as mysql time zone is GMT+05:30 it is viewing the date as (2008-10-19) @ GMT+05:30 5) when i retrieved the date from mysql (GMT +05:30) -Java (GMT) 2008-10-19 @ GMT+05:30 --- 2008-10-18 18:30 (GMT) converted to the above is the reason why it is printing the previous day date. On Sun, Oct 19, 2008 at 1:15 PM, SK [EMAIL PROTECTED] wrote: 2008/10/19 Rama [EMAIL PROTECTED] hi, iam using java,hibernate,mysql i am storing *19-10-2008 (*of type java.sql.Date) (TIMEZONE GMT) to mysql DATE field. when i retrieve the same date from mysql to java it is being displayed as *18-10-2008 18:30:00 GMT * i could not able to figure out what is going wrong . can any one please guide me on What can go wrong in above scenario? there are a lot of mothods to express data in java,but in mysql only have one type. may be types not match. i think you should storing 19-10-2008 to mysql char(10) field. --rama
Re: MySQL Date problem
The above argument applies to only MYSQL DATE field (timezone sensitive) where as in the case DATETIME Field it does not do any conversion gets what we store (timezone insensitive) in the case of TIMESTAMP Field it gets converted between UTC and local timezone. (timezone sensitive) On Sun, Oct 19, 2008 at 1:27 PM, Rama [EMAIL PROTECTED] wrote: i figured out the root cause of the problem. 1) Java TIME ZONE is GMT --- storing DATE (2008-10-19 which is in GMT ) 2) storing the above date in GMT to mysql 3) MYSQL TIME ZONE IS GMT+05:30 4) as mysql time zone is GMT+05:30 it is viewing the date as (2008-10-19) @ GMT+05:30 5) when i retrieved the date from mysql (GMT +05:30) -Java (GMT) 2008-10-19 @ GMT+05:30 --- 2008-10-18 18:30 (GMT) converted to the above is the reason why it is printing the previous day date. On Sun, Oct 19, 2008 at 1:15 PM, SK [EMAIL PROTECTED] wrote: 2008/10/19 Rama [EMAIL PROTECTED] hi, iam using java,hibernate,mysql i am storing *19-10-2008 (*of type java.sql.Date) (TIMEZONE GMT) to mysql DATE field. when i retrieve the same date from mysql to java it is being displayed as *18-10-2008 18:30:00 GMT * i could not able to figure out what is going wrong . can any one please guide me on What can go wrong in above scenario? there are a lot of mothods to express data in java,but in mysql only have one type. may be types not match. i think you should storing 19-10-2008 to mysql char(10) field. --rama
Re: MySQL Date problem
SK wrote: 2008/10/19 Rama [EMAIL PROTECTED] hi, iam using java,hibernate,mysql i am storing *19-10-2008 (*of type java.sql.Date) (TIMEZONE GMT) to mysql DATE field. when i retrieve the same date from mysql to java it is being displayed as *18-10-2008 18:30:00 GMT * i could not able to figure out what is going wrong . can any one please guide me on What can go wrong in above scenario? there are a lot of mothods to express data in java,but in mysql only have one type. may be types not match. i think you should storing 19-10-2008 to mysql char(10) field. --rama Hi What about using the STR_TO_DATE function to transform the java Date as a MySQL Date: STR_TO_DATE('19/10/2008', '%m/%d/%Y')? To transform this back into the original format, you may use the DATE_FORMAT function: DATE_FORMAT('2008-10-19', '%d/%m/%Y). Best regards Roland -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL Date problem
DATE TIME ZONE SENSITIVE DATETIME NOT SENSITIVE TO TIME ZONE TIMESTAMP TIMEZONE SENSITIVE iam getting the above problem as date is timezone sensitive.i resolved it by changing the field type from date to string. YOu can use any method to fill the DATE field of mysql .which method we use to fill mysql date is not important in this context. On Sun, Oct 19, 2008 at 1:33 PM, Roland Kaber [EMAIL PROTECTED] wrote: SK wrote: 2008/10/19 Rama [EMAIL PROTECTED] hi, iam using java,hibernate,mysql i am storing *19-10-2008 (*of type java.sql.Date) (TIMEZONE GMT) to mysql DATE field. when i retrieve the same date from mysql to java it is being displayed as *18-10-2008 18:30:00 GMT * i could not able to figure out what is going wrong . can any one please guide me on What can go wrong in above scenario? there are a lot of mothods to express data in java,but in mysql only have one type. may be types not match. i think you should storing 19-10-2008 to mysql char(10) field. --rama Hi What about using the STR_TO_DATE function to transform the java Date as a MySQL Date: STR_TO_DATE('19/10/2008', '%m/%d/%Y')? To transform this back into the original format, you may use the DATE_FORMAT function: DATE_FORMAT('2008-10-19', '%d/%m/%Y). Best regards Roland
Re: select ... into outfile=stdout ?
hi ronaldo, iadmit i was mysql (the command) fixated :) thx a lot, wh Rolando Edwards schrieb: Try mysqldump !!! On this web page, http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html It says the following: --fields-terminated-by=..., --fields-enclosed-by=..., --fields-optionally-enclosed-by=..., --fields-escaped-by=... These options are used with the -T option and have the same meaning as the corresponding clauses for LOAD DATA INFILE. See Section 12.2.6, LOAD DATA INFILE Syntax. By default, its output to stdout. Give it a try !!! -Original Message- From: walter harms [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2008 5:06 AM To: 'mysql' Subject: select ... into outfile=stdout ? hi list, i need some options from outfile (exspecialy:FIELDS TERMINATED BY) and would like to send the output to stdout to further processing. unfortunately i found no proper way to force the output to stdout. for now i use the redirection of the mysql -NB output but the interface lacks the options of into outfile. (It is easy to fix using tr but not what was intended). i tried /dev/stdout but this does not work either. any ideas ? re, wh -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: select ... into outfile=stdout ?
hi ronaldo i tried and failed. it seems that mysql has no option to specify a select statement. did i mis something ? re, wh walter harms schrieb: hi ronaldo, iadmit i was mysql (the command) fixated :) thx a lot, wh Rolando Edwards schrieb: Try mysqldump !!! On this web page, http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html It says the following: --fields-terminated-by=..., --fields-enclosed-by=..., --fields-optionally-enclosed-by=..., --fields-escaped-by=... These options are used with the -T option and have the same meaning as the corresponding clauses for LOAD DATA INFILE. See Section 12.2.6, LOAD DATA INFILE Syntax. By default, its output to stdout. Give it a try !!! -Original Message- From: walter harms [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2008 5:06 AM To: 'mysql' Subject: select ... into outfile=stdout ? hi list, i need some options from outfile (exspecialy:FIELDS TERMINATED BY) and would like to send the output to stdout to further processing. unfortunately i found no proper way to force the output to stdout. for now i use the redirection of the mysql -NB output but the interface lacks the options of into outfile. (It is easy to fix using tr but not what was intended). i tried /dev/stdout but this does not work either. any ideas ? re, wh -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Need help executing mysql stress test suite
Hi, For mysql stress test suite (mysql-stress-test.pl) to execute, it requires --stress-tests-file to be provided which contains the list of tests to be executed. As per the documentation the default name of the file is stress-test.txt and it will be located under ./mysql-test directory. But I could not find this file under the default directory. How to create this file? What is the format? Does this file come by default with test suite installation? or do I have to create this with the list of tests ? Can I have a sample copy of this file (stress-test.txt) ? I did try creating the file in the following format and tests stress-test.txt 1st alias alter_table analyse analyze ansi -- Note: Above tests are part of test suite stress test suite executes well with single thread. But it fails with multiple threads as these threads cannot be executed simultaneously. Regards, Durga.