Don't allow NULL values in data column in tiki_pages

RESOLVED INVALID

Status

support.mozilla.org
Knowledge Base Software
RESOLVED INVALID
9 years ago
8 years ago

People

(Reporter: Cww, Assigned: Cww)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

115 bytes, text/plain
laura
: review-
Details
54 bytes, text/plain
laura
: review-
Details
(Assignee)

Description

9 years ago
Created attachment 388288 [details]
fix null data

NULL is generally really really bad and we should be defaulting to an empty string.  (Case in point, it caused bug 485329) Attaching two SQL queries, one to update the existing articles to '' and one to add a default value to the data column so this doesn't happen again.
Attachment #388288 - Flags: review?(laura)
(Assignee)

Comment 1

9 years ago
Created attachment 388301 [details]
fix tiki_history

We should fix tiki_history too in case we come to rely on the non-NULL nature of page info.
Assignee: nobody → cwwmozilla
Status: NEW → ASSIGNED
Attachment #388301 - Flags: review?(laura)

Comment 2

9 years ago
Are there places in the code that depend on it being NULL (ie tests of ISNULL and so on)?  I'm a little scared to r+ this without an audit.

Updated

9 years ago
Attachment #388288 - Flags: review?(laura)

Comment 3

9 years ago
Comment on attachment 388288 [details]
fix null data

See my previous comment.
Attachment #388288 - Flags: review-

Comment 4

9 years ago
Comment on attachment 388301 [details]
fix tiki_history

See my previous comment.
Attachment #388301 - Flags: review?(laura) → review-

Comment 5

9 years ago
Note as well that NULL is semantically different from the empty string.  I'm
not convinced. r- for now.
Bugs in tikiwiki, going away.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.