My case sensitivity problem seems to have become even stranger.  Basically,
one case for the table ("Employee") works to return data for certain rows,
and the other ("employee") works for other rows.  This is unfortunately now
breaking my program.

Probably the easiest way to explain this is to show the results I'm getting.

Here's my table:

mysql> describe Employee
    -> \g
+-------------+-------------+------+-----+---------+----------------+
| Field       | Type        | Null | Key | Default | Extra          |
+-------------+-------------+------+-----+---------+----------------+
| ID          | int(11)     |      | PRI | NULL    | auto_increment |
| FirstName   | varchar(30) | YES  |     | NULL    |                |
| LastName    | varchar(30) | YES  |     | NULL    |                |
| Email       | varchar(50) | YES  |     | NULL    |                |
| WorkgroupID | int(11)     | YES  |     | NULL    |                |
| SSN4        | varchar(4)  | YES  |     | NULL    |                |
| age         | int(11)     | YES  |     | NULL    |                |
| Ethnicity   | varchar(30) | YES  |     | NULL    |                |
+-------------+-------------+------+-----+---------+----------------+
8 rows in set (0.00 sec)

I checked the data files in the filesystem - they're all named with capital
E.  

Here are the contents of the table:

mysql> SELECT * FROM Employee
    -> \g
+----+-----------+------------+----------------------+-------------+------+-
-----+-----------+
| ID | FirstName | LastName   | Email                | WorkgroupID | SSN4 |
age  | Ethnicity |
+----+-----------+------------+----------------------+-------------+------+-
-----+-----------+
|  1 | Alex      | Pukinskis  | [EMAIL PROTECTED] |           1 | 1111 |
NULL | NULL      |
|  2 | Joe       | Wellington | [EMAIL PROTECTED]        |           1 | 2222 |
NULL | NULL      |
|  3 | Jack      | Smith      | [EMAIL PROTECTED]       |           1 | 1111 |
NULL | NULL      |
|  4 | Nancy     | Jones      | [EMAIL PROTECTED]      |           1 | 3333 |
NULL | NULL      |
+----+-----------+------------+----------------------+-------------+------+-
-----+-----------+
4 rows in set (0.00 sec)

But only certain rows work if I do a subselect on "Employee":

mysql> SELECT * FROM Employee WHERE ID=1\g
+----+-----------+-----------+----------------------+-------------+------+--
----+-----------+
| ID | FirstName | LastName  | Email                | WorkgroupID | SSN4 |
age  | Ethnicity |
+----+-----------+-----------+----------------------+-------------+------+--
----+-----------+
|  1 | Alex      | Pukinskis | [EMAIL PROTECTED] |           1 | 1111 |
NULL | NULL      |
+----+-----------+-----------+----------------------+-------------+------+--
----+-----------+
1 row in set (0.00 sec)

mysql> SELECT * FROM Employee WHERE ID=2\g
Empty set (0.00 sec)

mysql> SELECT * FROM Employee WHERE ID=3\g
Empty set (0.00 sec)

mysql> SELECT * FROM Employee WHERE ID=4\g
+----+-----------+----------+-----------------+-------------+------+------+-
----------+
| ID | FirstName | LastName | Email           | WorkgroupID | SSN4 | age  |
Ethnicity |
+----+-----------+----------+-----------------+-------------+------+------+-
----------+
|  4 | Nancy     | Jones    | [EMAIL PROTECTED] |           1 | 3333 | NULL |
NULL      |
+----+-----------+----------+-----------------+-------------+------+------+-
----------+
1 row in set (0.00 sec)

Now if I change the case, a different set of rows return results (but not
the opposite set; rather, an overlapping set of rows!)


mysql> SELECT * FROM employee WHERE ID=1\g
+----+-----------+-----------+----------------------+-------------+------+--
----+-----------+
| ID | FirstName | LastName  | Email                | WorkgroupID | SSN4 |
age  | Ethnicity |
+----+-----------+-----------+----------------------+-------------+------+--
----+-----------+
|  1 | Alex      | Pukinskis | [EMAIL PROTECTED] |           1 | 1111 |
NULL | NULL      |
+----+-----------+-----------+----------------------+-------------+------+--
----+-----------+
1 row in set (0.00 sec)

mysql> SELECT * FROM employee WHERE ID=2\g
+----+-----------+------------+---------------+-------------+------+------+-
----------+
| ID | FirstName | LastName   | Email         | WorkgroupID | SSN4 | age  |
Ethnicity |
+----+-----------+------------+---------------+-------------+------+------+-
----------+
|  2 | Joe       | Wellington | [EMAIL PROTECTED] |           1 | 2222 | NULL |
NULL      |
+----+-----------+------------+---------------+-------------+------+------+-
----------+
1 row in set (0.00 sec)

mysql> SELECT * FROM employee WHERE ID=3\g
+----+-----------+----------+----------------+-------------+------+------+--
---------+
| ID | FirstName | LastName | Email          | WorkgroupID | SSN4 | age  |
Ethnicity |
+----+-----------+----------+----------------+-------------+------+------+--
---------+
|  3 | Jack      | Smith    | [EMAIL PROTECTED] |           1 | 1111 | NULL |
NULL      |
+----+-----------+----------+----------------+-------------+------+------+--
---------+
1 row in set (0.00 sec)

mysql> SELECT * FROM employee WHERE ID=4\g
Empty set (0.00 sec)

So I'm confused.  Is my database corrupted?  Is there some rebuild command I
need to run?

Again, I'm running mysql-3.23.39 on Mac OS X Server 10.0.0.4

Any help is appreciated, as I'm firmly stuck at this point.

-Alex


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to