views:

89

answers:

2

check the database-generating sql (looks fine):

CREATE TABLE `HourOfDay` (
  `id` int(11) NOT NULL,
  `hourString` varchar(2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

check the file system (it's there):

# ls -al Mycomp_test | grep -i hour
-rw-rw----    1 _mysql  wheel      0 Mar  1 08:13 HourOfDay.MYD
-rw-rw----    1 _mysql  wheel   1024 Mar  1 08:13 HourOfDay.MYI
-rw-rw----    1 _mysql  wheel   8598 Mar  1 08:13 HourOfDay.frm

check the database (looks good):

»mysql -u root Mycomp_test -e 'show tables' | grep -i hour
HourOfDay

check the database table (oops wtf!?):

»mysql -u root Mycomp_test -e 'show create table HourOfDay'
ERROR 1146 (42S02) at line 1: Table 'mycomp_test.hourofday' doesn't exist

UPDATE: More info

  • This is an OSX system running mysql-5.1.38-osx10.5-x86_64

  • If I drop the database and recreate it I get the same error (it's reliably reproducible).

+1  A: 

"Table 'mycomp_test.hourofday' doesn't exist" is suspicious, as it should be HourOFDay on a unix/linux system.

MindStalker
Is it all unix/linux or is there a windows system filesharing with a linux/unix system?
MindStalker
mysql-5.1.38-osx10.5-x86_64
Teflon Ted
A: 

8.2.2. Identifier Case Sensitivity

»cat /etc/my.cnf 
[mysqld]
lower_case_table_names=2
Teflon Ted
I would try lower_case_table_named=0
MindStalker
I did; didn't work :-)
Teflon Ted
Does it work fine with tables with all lowercase names? CREATE TABLE `hourofday` if so this isn't the issue.
MindStalker