Archive for November, 2009
MySQL Default DATETIME Value – A Quick Rant
Posted by jervin in BSD/Mac OSX, Linux, MySQL, Windows on November 20, 2009
I was reviewing a year old code which I am adding a feature to. It so happened I came to a familiar issue about having two timestamp/datetime columns, one which should have the CURRENT_DATE / NOW() as default value and the other with an 'ON UPDATE CURENT_TIMESTAMP'. Examine the simple structure below:
CREATE TABLE `stories` (
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`title` VARCHAR( 255 ) NOT NULL ,
`text` TEXT NOT NULL ,
`creationdate` DATETIME NOT NULL ,
`lastupdate` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE = MYISAM
When you want to store stories, you would also want to record when it was originally created as well track the last time it was updated. The problem here is that adding a `DEFAULT NOW()` clause will not work for the `CREATE TABLE` query above as it is not supported. So when your insert a new story you will have to explicitly add a `NOW()` function for the `creationdate` row so it will reflect the current date as creation date. This should've been a simple schema functionality, turns out after more than a year MySQL seems to ignore for some reason.
Go on have yourself a read here http://bugs.mysql.com/bug.php?id=27645
How about you, how many times have you have to work around this from your application code?
MSFTPSVC Event ID 8
Posted by admin in FTP, Networking, Server Security, Windows on November 8, 2009
Source MSFTPSVC Event ID 8: FTP Server could not create a client worker Thread for user at host xxx.xxx.xxx.xxx. The connection to this user is terminated the data is the error. (No error Code)
Where xxx.xxx.xxx.xxx is the host attempting to connect.
The MS KB article here http://support.microsoft.com/?id=293637 proposes a solution with regards to a related metabase error and how to delete such. However some users may not have the "ipsecurity" error described in the KB, so instead you will have to check each of you individual FTP sites. Make sure that in the Properties -> Directory Security tab, Granted Access is selected. If in any case Denied Access is selected, make sure the connecting host above is added in the exception list.
After making changes to the Directory Security property, double check with the KB article again as changes to the metabase have been made.
After the two checks above and you are still getting tons of Event ID 8, you can also check here http://technet.microsoft.com/en-us/library/cc783062%28WS.10%29.aspx