Below is the list of changes that have just been committed into a local
mysqldoc repository of paul. When paul does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.2708 05/03/11 13:23:39 paul@stripped +1 -0
manual.texi:
Document change to COERCIBILITY() function.
Document bugfix. (Bug #4291)
Docs/manual.texi
1.2538 05/03/11 13:21:59 paul@stripped +43 -11
Document change to COERCIBILITY() function.
Document bugfix. (Bug #4291)
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: paul
# Host: frost.snake.net
# Root: /Volumes/frost2/MySQL/bk/mysqldoc
--- 1.2537/Docs/manual.texi 2005-03-11 11:09:47 -06:00
+++ 1.2538/Docs/manual.texi 2005-03-11 13:21:59 -06:00
@@ -43420,10 +43420,17 @@
@item A column's collation has a coercibility of 2.
-@item A literal's collation has a coercibility of 3.
+@item A ``system constant'' (the string returned by functions such as
+@code{USER()} or @code{VERSION()}) has a coercibility of 3.
+
+@item A literal's collation has a coercibility of 4.
@end itemize
+The preceding coercibility values are current as of MySQL 4.1.11 and 5.0.3.
+See the note later in this section for additional version-related
+information.
+
Those rules resolve ambiguities thus:
@itemize @bullet
@@ -43451,12 +43458,18 @@
@example
mysql> SELECT COERCIBILITY('A' COLLATE latin1_swedish_ci);
-> 0
-mysql> SELECT COERCIBILITY('A');
+mysql> SELECT COERCIBILITY(VERSION());
-> 3
+mysql> SELECT COERCIBILITY('A');
+ -> 4
@end example
@xref{Information functions}.
+Before MySQL 4.1.11 and 5.0.3, there is no system constant coercibility.
+Functions such as @code{USER()} have a coercibility of 2 rather than 3, and
+literals have a coercibility of 3 rather than 4.
+
@node Charset-collation-charset, Charset-collation-effect, Charset-collate-tricky, Charset-defaults
@subsection Collations Must Be for the Right Character Set
@@ -52407,24 +52420,28 @@
mysql> SELECT COERCIBILITY('abc' COLLATE latin1_swedish_ci);
-> 0
mysql> SELECT COERCIBILITY('abc');
- -> 3
+ -> 4
mysql> SELECT COERCIBILITY(USER());
- -> 2
+ -> 3
@end example
The return values have the following meanings:
-@multitable @columnfractions .30 .50
-@item @strong{Coercibility} @tab @strong{Meaning}
-@item @code{0} @tab Explicit collation
-@item @code{1} @tab No collation
-@item @code{2} @tab Implicit collation
-@item @code{3} @tab Coercible
+@multitable @columnfractions .15 .15 .70
+@item @strong{Coercibility} @tab @strong{Meaning} @tab @strong{Example}
+@item @code{0} @tab Explicit collation @tab Value with @code{COLLATE} clause
+@item @code{1} @tab No collation @tab Concatenation of strings with different collations
+@item @code{2} @tab Implicit collation @tab Column value
+@item @code{3} @tab System constant @tab @code{USER()} return value
+@item @code{4} @tab Coercible @tab Literal string
@end multitable
Lower values have higher precedence.
-@code{COERCIBILITY()} was added in MySQL 4.1.1.
+@code{COERCIBILITY()} was added in MySQL 4.1.1. Before MYSQL 4.1.11 and
+5.0.3, the system constant coercibility value is not present: Functions such
+as @code{USER()} have a coercibility of 2, and literal strings have a
+coercibility of 3 rather than 4.
@c description_for_help_topic COLLATION
@findex COLLATION()
@@ -97019,6 +97036,13 @@
(Thanks to Stefano Di Paola @email{stefano.dipaola@@wisec.it} for finding
and informing us about this issue.)
@item
+The coercibility for the return value of functions such as @code{USER()} or
+@code{VERSION()} now is ``system constant'' rather than ``implicit.'' This
+makes these functions more coercible than column values so that comparisons
+of the two do not result in @code{Illegal mix of collations} errors.
+@code{COERCIBILITY()} was modified to accommodate this new coercibility value.
+@xref{Information functions}.
+@item
Boolean full-text phrase searching now requires only that matches contain
exactly the same words as the phrase and in the same order. Non-word
characters no longer need match exactly.
@@ -98185,6 +98209,14 @@
Functionality added or changed:
@itemize @bullet
+@item
+The coercibility for the return value of functions such as @code{USER()} or
+@code{VERSION()} now is ``system constant'' rather than ``implicit.'' This
+makes these functions more coercible than column values so that comparisons
+of the two do not result in @code{Illegal mix of collations} errors.
+@code{COERCIBILITY()} was modified to accommodate this new coercibility value.
+@xref{Information functions}.
+value.
@item
Modified the parser to allow @code{SELECT} statements following the
@code{UNION} keyword to be subqueries in parentheses. (Bug #2435)
| Thread |
|---|
| • bk commit - mysqldoc tree (paul:1.2708) | paul | 11 Mar |