Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 7

Displaying posts with tag: wtf (reset)

Ghosts of MySQL Past, Part 9: BEST. Team. Name. EVER.
+2 Vote Up -1Vote Down

(This is part 9 in a series, part 8 is here – because reverse chronological order totally makes sense here)

So, back around 2007, somebody noticed that an awful lot of the downloads of MySQL and associated utilities from mysql.com were for Windows. Of course, it’s then immediately pointed out that the vast majority of Linux users will not be heading to mysql.com to download MySQL, instead using the packages from …

  [Read more...]
Using CURDATE() the wrong way
+1 Vote Up -0Vote Down

It has been a while since I wrote on this blog. Basically I had too much on my mind (expanding my department, holidays, etc) to actually write here and I’ll promise to post more regularly from now onwards. ;)

Anyway, as the title already suggests: I found out how you can use CURDATE() in a wrong way. One of the developers in my company asked me to help him out as his code all of a sudden did not work properly anymore. Or even better: it used to process several thousands of rows and all of a sudden it processed none.

I looked at his …

  [Read more...]
Amateurs – They give us professionals a bad name
+3 Vote Up -4Vote Down

Any person with half a brain would see from the error messages below that the MySQL server is not operating optimally, or more specifically the MySQL upgrade has not completely successfully and let users can go happily use the website. It amazing me when web hosting providers tell their paying client that an upgrade has been performed yet they did not have the intelligence to actually look at the error log for confirmation. Got a mysql> prompt, it’s all good. One of the first things I check is the error log.

When will people learn the MySQL error log is a valuable resource both for what it contains, and what it should not …

  [Read more...]
Version Number 5 point WTF?
+0 Vote Up -9Vote Down

What is going on with the version numbers coming out of Sun/MySQL?Once upon a time, we had 5.2.Then, to incorporate Falcon, it became 6.0.Somewhere along the line, there was a 5.3.Then a 5.4 appeared which seemed to be 5.1 with performance fixes for InnoDB.Now there is a 5.5, which claims to be a 5.4 with a few stuff added.Stop confusing your community.And whatever happened to community

From Daily WTF: Death by Delete
+1 Vote Up -0Vote Down

The Daily WTF collects excellent tales from the real world. These days, the dismal dramatic sagas are often (at least in part) about mistakes involving databases; no surprise there, they’re so prolific…

Anyway, if you can learn from other people’s mistakes, that’s cheap and efficient education! I thought I’d share today’s edition with you: it’s called Death by Delete. Read and enjoy^H^H^H^H^Hlearn.

When can a TINYTEXT column have a default value?
+0 Vote Up -0Vote Down

Well… kinda… (and nobody make fun of me for using my MythTV box as a testing ground for SQL against MySQL).

myth@orpheus:~$ mysql -u root test
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2496
Server version: 5.0.51a-3ubuntu5.4-log (Ubuntu)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create table t1 (a tinytext default 'fail');
ERROR 1101 (42000): BLOB/TEXT column 'a' can't have a default value
mysql> create table t1 (a tinytext default '');
Query OK, 0 rows affected, 1 warning (0.07 sec)

mysql> show warnings; …
  [Read more...]
Precision mathematics in MySQL
+0 Vote Up -0Vote Down

As documented, the FLOAT datatype does not guarantee precise storage of decimal values. But where the non-precision is apparent can be a little confusing - take the following example:

mysql> CREATE TABLE my_table (a FLOAT);
Query OK, 0 rows affected (0.25 sec)

mysql> insert into my_table (a) VALUES ('2.2');
Query OK, 1 row affected (0.08 sec)

mysql> SELECT * FROM my_table WHERE a = 2.2;
Empty set (0.05 sec)

mysql> SELECT a, IFNULL(a,0) FROM my_table;
+------+-----------------+
| a    | IFNULL(a,0)     |
+------+-----------------+
|  2.2 | 2.2000000476837 | 
+------+-----------------+
1 row in set (0.00 sec)

mysql> SELECT a, a+0 FROM my_table; …


  [Read more...]
Showing entries 1 to 7

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.