FogBugz Technical Support

A forum for technical support discussion related to Fogbugz.
The current FogBugz Knowledge Base can be found at http://help.fogcreek.com/fogbugz.

Posts by Fog Creek Employees are marked:

Documentation
Release Notes
Network Status

FogBugz running with mysql on Case Sensitive HFS+ Filesystem

I have been trying to move my mysql databases off to an Xserve Raid formatted as HFS+ Case sensitive. It looks like mysql is working fine, the main fogbugz page looks fine, but when I look at a case I only see the header information (name, status, priority, etc) but no case body. I noticed the following errors with regard to the maintenance daemon:

Jan 24 14:36:47 cadence /usr/sbin/httpd: FogBugz Error: /Library/WebServer/fogbugz/Website/adodb/adodb-errorhandler.inc.php:75:mysql error: [1146: Table 'fogbugz.TrainingRequest' doesn't exist] in EXECUTE("SELECT MIN(ixRequest)  FROM TrainingRequest")
Jan 24 14:36:47 cadence php: FogBugz Maintenance Error: POST to http://cadence:16080/fogbugz/heartbeat.php failed.

When I do a show tables on the fogbugz database I see that the table is reall trainingrequest, not TrainingRequest. Would this cause my problems? Can i simply fix the case on the php pages? Anyone else running on case sensitive HFS+ ? Or am I just missing something in my move of my mysql datadir?

Thanks,
+R
Ryan Dionne Send private email
Tuesday, January 24, 2006
 
 
I was able to move it to another volume on my RAID that was not HFS+ Case Sensitive and was able to get everything working. What's the fix so I can run on a case sensitive HFS + volume?

+R
Ryan Dionne Send private email
Tuesday, January 24, 2006
 
 
All of our queries use the same case sensitive syntax.

When the table is created it is created as TrainingRequest, but there is a setting in MySQL called lowercasetablenames or something similar in my.ini which for some inane reason is on by default.

You just need to turn that off and everything should work ok (provided you recreate your database from scratch)
Michael H. Pryor Send private email
Tuesday, January 24, 2006
 
 
Since the tables names are different I take it I couldn't easily export/import my existing data? What are my options here?

+R
Ryan Dionne Send private email
Tuesday, January 24, 2006
 
 
Leave the thing running on the non case sensitive drive.

Turn off the lowercasetablenames setting.

Recreate a new database, copy your data (since drive is not case sensitive it should work, right?)

Then move to the case sensitive drive.

Beyond that, I'm not sure.
Michael H. Pryor Send private email
Tuesday, January 24, 2006
 
 
I noticed that not all of the tables are in lowercase:

<snip>
| SorterSetting      |
| Status            |
| Subscriptions      |
| Tokens            |
| Version            |
| WorkingSchedule    |
| bug                |
| bugevent          |
| bugrelation        |
| discussemail      |
| discusstopic      |
| sortertoken        |
| tokenassociation  |
| trainingrequest

Does this mean it some other problem then what you suggest?

+R
Ryan Dionne Send private email
Tuesday, January 24, 2006
 
 
Maybe those tables were created after you upgraded from a previous version.
Michael H. Pryor Send private email
Tuesday, January 24, 2006
 
 
Do you mean a previous version of fogbugz or mysql? I've been running the same version of mysql since I first installed fogbugz.

This list was from a freshly created fogbugz db using a freshly installed mysql 5.0 package and a freshly install fogbugz.


+R
Ryan Dionne Send private email
Wednesday, January 25, 2006
 
 
Ok, if its a fresh install, then just change the lowercasetablename setting in mysql to off, and run a new fresh install...
Michael H. Pryor Send private email
Wednesday, January 25, 2006
 
 
I am not running a fresh install anymore, I moved my existing fogbguz database back and already have everything up and running on a non-case sensitive volumes.

http://dev.mysql.com/doc/refman/5.0/en/name-case-sensitivity.html

It looks like mysql automatically set the lower_case_table_names variable to 2 on HFS+ volumes and 0 on case-sensitive HFS+ volumes. Can you verify that the tables in question are created with upper case when first creating the databases thru fogbugz on case sensitive hfs+ volumes? According to the document the tables are created correctly when the variable is set to 2, they just show as lowercase; which doesn't explain why most of my tables are mixed case in both the filesystem and mysql listings.

Even if I was able to create a new fogbug database on the case-sensitive volume I still wouldn't know how to move my existing data into the new database. I would like some more concrete answers on this issue.
Ryan Dionne Send private email
Wednesday, January 25, 2006
 
 
Ryan,

That is correct.  Every reference to the table names in the FogBugz source code uses the same case syntax, so the tables would not be created by FogBugz with lower case names.

If a normal database transition won't work for you as I originally suggested, then you could move the data by creating a fresh install and then doing a dump into a text file of your database.  Do a find and replace on the text file to fix up the table names and then reimport into your correctly named tables.
Michael H. Pryor Send private email
Thursday, January 26, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz Bug Tracking and Evidence-Based Scheduling.