Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Currently, I am using Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu) version of mysql. Unfortunately the relational operators aren't working on temporal data types for e.g date.

I see that mysql-6.0.10-alpha has already been released: thought the bugs might have been fixed; though couldn't find a way to install it on Ubuntu 12.04.

Example:-

mysql> select emp_id, fname, lname, start_date,title  from employee ;
+--------+----------+-----------+------------+--------------------+
| emp_id | fname    | lname     | start_date | title              |
+--------+----------+-----------+------------+--------------------+
|      1 | Michael  | Smith     | 2001-06-22 | President          |
|      2 | Susan    | Barker    | 2002-09-12 | Vice President     |
|      3 | Robert   | Tyler     | 2000-02-09 | Treasurer          |
|      4 | Susan    | Hawthorne | 2002-04-24 | Operations Manager |
|      5 | John     | Gooding   | 2003-11-14 | Loan Manager       |
|      6 | Helen    | Fleming   | 2004-03-17 | Head Teller        |
|      7 | Chris    | Tucker    | 2004-09-15 | Teller             |
|      8 | Sarah    | Parker    | 2002-12-02 | Teller             |
|      9 | Jane     | Grossman  | 2002-05-03 | Teller             |
|     10 | Paula    | Roberts   | 2002-07-27 | Head Teller        |
|     11 | Thomas   | Ziegler   | 2000-10-23 | Teller             |
|     12 | Samantha | Jameson   | 2003-01-08 | Teller             |
|     13 | John     | Blake     | 2000-05-11 | Head Teller        |
|     14 | Cindy    | Mason     | 2002-08-09 | Teller             |
|     15 | Frank    | Portman   | 2003-04-01 | Teller             |
|     16 | Theresa  | Markham   | 2001-03-15 | Head Teller        |
|     17 | Beth     | Fowler    | 2002-06-29 | Teller             |
|     18 | Rick     | Tulman    | 2002-12-12 | Teller             |
+--------+----------+-----------+------------+--------------------+
18 rows in set (0.00 sec)


mysql> select emp_id, fname, lname, start_date,title  from employee where start_date >= '2006-01-01';
Empty set (0.00 sec)
share|improve this question
    
Is this an example of relational operator not working? Because I don't see any start date greater than or equals to 2006-01-01. –  Samik Jun 26 '12 at 11:15
    
I'm sorry, i imported the database from some site; and was running the query as per the book. There was a mismatch in the date column in the table; which resulted in the incorrect output. I've corrected the dates; the query runs properly now. Anyways thanks for replying; would still like to upgrade to mysql-6.0 on ubuntu 12.04. Thanks Ankit –  Ankit Jun 26 '12 at 11:45

1 Answer 1

This(mysql dev download site) or this(mirror site) are the links to download the mysql-6.0.11-alpha-linux-i686-glibc23.tar.gz package. Here are the installation instructions. Though it's not recommended as it's a pre-release version.

As the instruction suggests you have to completely remove the version installed with apt-get in Ubuntu to make a new installation from source.

share|improve this answer
    
hi,thanks for your help. :) –  Ankit Jun 26 '12 at 20:34
    
@Ankit Glad that helped you, you can accept that answer if you think it's appropriate. –  Samik Jun 27 '12 at 10:43
    
Hi, samkik i am new here, how do i accept the answer. –  Ankit Jul 9 '12 at 5:46
    
@Ankit You can click the check sign(✓) below the voting area on the left side of an answer to accept it. –  Samik Jul 9 '12 at 6:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.