r98226 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98225‎ | r98226 | r98227 >
Date:16:02, 27 September 2011
Author:jeroendedauw
Status:resolved (Comments)
Tags:
Comment:
follow up to r98183 - having binary or varbinary gives an error when I run update.php
Modified paths:
  • /trunk/extensions/Contest/Contest.sql (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.sql
@@ -40,5 +40,5 @@
4141 comment_contestant_id INT unsigned NOT NULL, -- Foreign key on contest_contestants.contestant_id
4242 comment_user_id INT(10) unsigned NOT NULL, -- Judge user id
4343 comment_text TEXT NOT NULL, -- The comment text
44 - comment_time binary(14) binary NOT NULL default '' -- The time at which the comment was made
 44+ comment_time CHAR(14) binary NOT NULL default '' -- The time at which the comment was made
4545 ) /*$wgDBTableOptions*/;
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r98313added ContestContestant class and schema tweak follow up to r98226jeroendedauw14:50, 28 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98183Follow up to r98148;jeroendedauw22:09, 26 September 2011

Comments

#Comment by 😂 (talk | contribs)   20:00, 27 September 2011

What sort of error? It should work.

#Comment by Jeroen De Dauw (talk | contribs)   20:51, 27 September 2011

SQL syntax error

#Comment by 😂 (talk | contribs)   20:51, 27 September 2011

varbinary(14) was a syntax error?? wtf...

#Comment by Jeroen De Dauw (talk | contribs)   20:54, 27 September 2011

Indeed, very weird. varbinary and binary gave the error, CHAR doesn't.

#Comment by 😂 (talk | contribs)   21:50, 27 September 2011

Hmm, WFM. Using 5.1.57.

#Comment by Jeroen De Dauw (talk | contribs)   21:55, 27 September 2011

I have 5.1.54-1ubuntu4

#Comment by 😂 (talk | contribs)   22:00, 27 September 2011

And creating the core tables using varbinary works?

#Comment by Jeroen De Dauw (talk | contribs)   22:08, 27 September 2011

Yeah. Weirdness++

#Comment by 😂 (talk | contribs)   12:30, 28 September 2011

I just tried it on 5.1.54-1ubuntu4, WFM there too. Your schema was identical to the link I gave above?

#Comment by Jeroen De Dauw (talk | contribs)   12:40, 28 September 2011

As far as I can tell, yes. The only change I made is the one you can see in this commit.

In any case, I need to remove my tables and run update.php again on the machine where I got this, so I'll see if it happens again, and if it does, paste the error here.

#Comment by 😂 (talk | contribs)   12:41, 28 September 2011

Thanks :)

#Comment by Jeroen De Dauw (talk | contribs)   14:32, 28 September 2011

Ok, I now tried this on a different machine (with similar setup), and am getting the error again.

1.19alpha ([[Special:Code/MediaWiki/98303|r98303]])
5.3.5-1ubuntu7.2 (apache2handler)
5.1.54-1ubuntu4

binary error: http://pastebin.com/pecZYvBY

varbinary error: http://pastebin.com/B9pugfkg

#Comment by 😂 (talk | contribs)   14:39, 28 September 2011

You didn't have an identical schema to the one I posted above ;-) You put: varbinary(14) binary / binary(14) binary in your examples, whereas I just had varbinary(14). If you're specifying binary(n) or varbinary(n), there's no need to also denote it as binary, it's implicit :)

#Comment by Jeroen De Dauw (talk | contribs)   14:44, 28 September 2011

wtf... ok, I'm blind apparently :D

That's indeed it - will be changed in my next commit.

Status & tagging log