Databases: Yet another reason to hate MySQL

Databases: Yet another reason to hate MySQL

Tim Hunt發表於
Number of replies: 5
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
It seems that in MySQL, TEXT columns cannot have a default value.

http://dev.mysql.com/doc/refman/5.0/en/blob.html#id3024957

table_column(...), which is the recommended way to modify database tables, will happily create TEXT columns with default ''.

Therefore you get bugs like bug 6206.

What a pain in the neck.

評比平均分數: -
In reply to Tim Hunt

Re: Databases: Yet another reason to hate MySQL

Jun Yamog發表於
I couldn't help it... but the subject in your post is so irresistible.

Do you actually know anyone that uses MySQL as a real relational db rather than just a data storage that does not hate it? big grin

In reply to Tim Hunt

Re: Databases: Yet another reason to hate MySQL

Martín Langhoff發表於
Well, it's not so bad if it gets people (and apps) to use it as a basic DB, and eventually migrate to Pg for the real stuff 眨眼

Jokes aside, MySQL has been around and easy to install/use for ages, where Pg has traditionally been much harder (getting there now with 8.1 running on windows). And MySQL is still what is easily available in no-frills hosting, which is exactly where Moodle gathered momentum.

We can't really flame users for using it, it's still Moodle's recommended DB.
In reply to Tim Hunt

Re: Databases: Yet another reason to hate MySQL

Tim Hunt發表於
Core developers的相片 Documentation writers的相片 Particularly helpful Moodlers的相片 Peer reviewers的相片 Plugin developers的相片
OK, now can we get past the subject line. This was not just a flame, I was trying to point out a probable bug. What are we going to do about table_column(...) on MySQL?

I have not put this in the butracker yet. I thought we should discuss potential solutions first.
In reply to Tim Hunt

Re: Databases: Yet another reason to hate MySQL

Iñaki Arenaza發表於
Core developers的相片 Documentation writers的相片 Peer reviewers的相片 Plugin developers的相片
I know I may get a few flames with this but, what about putting real values in those fields when we do the INSERTs?

Saludos. Iñaki.