Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Employee Spring Cleaning - Deprecation of NULL synonym \N
+3 Vote Up -0 Vote Down

In the MySQL team, we’ve been discussing removing the non-standard \N synonym for NULL. For Example:

mysql> SELECT NULL is \N;
+------------+
| NULL is \N |
+------------+
|          1 |
+------------+
1 row in set (0.00 sec)

mysql> INSERT INTO tablea VALUES (3, \N);
Query OK, 1 row affected (0.00 sec)

mysql> SELECT * FROM tablea WHERE b IS \N;
+---+------+
| a | b    |
+---+------+
| 3 | NULL |
+---+------+
1 row in set (0.00 sec)

The use of “\N” in files loaded with LOAD DATA INFILE or created with SELECT INTO OUTFILE will be unaffected by this change and continue to be supported.

The two options we’ve laid out are:

Option #1:

  • Add deprecation warnings in MySQL 5.6 and MySQL 5.7
  • Remove in MySQL 5.8

Option #2:

  • Add deprecation warnings in MySQL 5.6.
  • Remove in MySQL 5.7

Do you rely on this behavior in your application? Will option #2 affect you negatively?

Please feel free to leave a comment, or contact me.

Thanks!

Votes:

You must be logged in with a MySQL account to vote on Planet MySQL entries. More information on PlanetMySQL voting.

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.