Please sign in to comment.
Override tiddler_put to deal with mysql warnings.
mysql, in its infinite wisdom, will truncate a field that doesn't fit in a column and raise a warning. We don't want this. We want it to fail. Otherwise two tiddlers with titles that are the same for the first N (where N is around 128) characters will overwrite one another. This violates principle of least surprise, so we error. It is up to the client to either a) protect against the error happening in the first or b) deal with it when it happens. This code raises a TypeError which the `put` web handler will deal with and make into an HTTP 400.
- Loading branch information...
Showing with 30 additions and 1 deletion.