| Bug #11251 | Incorrect syntax DEFAULT CHARSET=id in docs | ||
|---|---|---|---|
| Submitted: | 10 Jun 2005 18:49 | Modified: | 14 Jun 2005 9:15 |
| Reporter: | Bill Karwin (Candidate Quality Contributor) (OCA) | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
| Version: | 4.1 | OS: | Any (all) |
| Assigned to: | Jon Stephens | CPU Architecture: | Any |
[10 Jun 2005 18:49]
Bill Karwin
[10 Jun 2005 23:45]
Bill Karwin
Specifying version as 4.1 (though it's really a bug against the docs). I acknowledge that the DEFAULT CHARACTER SET syntax was not supported in version 4.0 of MySQL.
[14 Jun 2005 9:15]
Jon Stephens
I tested as shown; both versions of the syntax work correctly:
---------
mysql> SELECT VERSION(), @@version_compile_os;
+---------------------+----------------------+
| VERSION() | @@version_compile_os |
+---------------------+----------------------+
| 5.0.3-beta-standard | pc-linux-gnu |
+---------------------+----------------------+
1 row in set (0.00 sec)
mysql> SELECT VERSION(), @@version_compile_os;
+-----------------------+----------------------+
| VERSION() | @@version_compile_os |
+-----------------------+----------------------+
| 5.0.6-beta-nt-max-log | Win32 |
+-----------------------+----------------------+
1 row in set (0.01 sec)
# following executed on both MySQL installations shown above:
mysql> CREATE TABLE words1 (col VARCHAR(50)) DEFAULT CHARACTER SET=utf8;
Query OK, 0 rows affected (0.13 sec)
mysql> SHOW CREATE TABLE words1\G
*************************** 1. row ***************************
Table: words1
Create Table: CREATE TABLE `words1` (
`col` varchar(50) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
mysql> CREATE TABLE words2 (col VARCHAR(50)) DEFAULT CHARACTER SET=utf8;
Query OK, 0 rows affected (0.13 sec)
mysql> SHOW CREATE TABLE words2\G
*************************** 1. row ***************************
Table: words2
Create Table: CREATE TABLE `words2` (
`col` varchar(50) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
-------
Marked Closed/Not A Bug.
[14 Jun 2005 9:30]
Jon Stephens
The second table in my example was in fact created using CREATE TABLE words2 (col VARCHAR(50)) DEFAULT CHARSET=utf8; The query shown in my previous comment was a copy/paste error and the DEFAULT CHARSET syntax *does* in fact work correctly and does *not* cause an error.
