C.5.5. Query-Related Issues - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

• Recompile MySQL from source to use a different default Unix socket file location. Define the path
to the file with the
Section 2.17.3, "MySQL Source-Configuration
You can test whether the new socket location works by attempting to connect to the server with this
command:
shell>
mysqladmin --socket=/path/to/socket version
C.5.4.6. Time Zone Problems
If you have a problem with
have to tell the server your current time zone. The same applies if
the wrong value. This should be done for the environment in which the server runs; for example, in
mysqld_safe
You can set the time zone for the server with the
mysqld_safe. You can also set it by setting the
The permissible values for
system documentation to see what values are acceptable.

C.5.5. Query-Related Issues

C.5.5.1. Case Sensitivity in String Searches
For nonbinary strings (CHAR, VARCHAR, TEXT), string searches use the collation of the comparison
operands. For binary strings (BINARY, VARBINARY, BLOB), comparisons use the numeric values of the
bytes in the operands; this means that for alphabetic characters, comparisons will be case sensitive.
A comparison between a nonbinary string and binary string is treated as a comparison of binary strings.
Simple comparison operations
character's "sort value." Characters with the same sort value are treated as the same character. For
example, if "e" and "é" have the same sort value in a given collation, they compare as equal.
The default character set and collation are
comparisons are case insensitive by default. This means that if you search with
%', you get all column values that start with
that one of the operands has a case sensitive or binary collation. For example, if you are comparing a
column and a string that both have the
cause either operand to have the
col_name
COLLATE latin1_general_cs LIKE 'a%'
col_name
LIKE 'a%' COLLATE latin1_general_cs
col_name
COLLATE latin1_bin LIKE 'a%'
col_name
LIKE 'a%' COLLATE latin1_bin
If you want a column always to be treated in case-sensitive fashion, declare it with a case sensitive or
binary collation. See
To cause a case-sensitive comparison of nonbinary strings to be case insensitive, use
name a case-insensitive collation. The strings in the following example normally are case sensitive, but
changes the comparison to be case insensitive:
COLLATE
mysql>
SET @s1 = 'MySQL' COLLATE latin1_bin,
->
mysql>
SELECT @s1 = @s2;
+-----------+
| @s1 = @s2 |
+-----------+
|
0 |
+-----------+
--with-unix-socket-path
SELECT NOW()
or mysql.server. See
--timezone
(>=, >, =, <,
latin1_general_cs
Section 13.1.10,
@s2 = 'mysql' COLLATE latin1_bin;
Query-Related Issues
[121]
Options".
returning values in UTC and not your local time, you
Section 2.21, "Environment
--timezone=timezone_name
environment variable before you start mysqld.
TZ
[248]
or
are system dependent. Consult your operating
TZ
<=, sorting, and grouping) are based on each
and latin1_swedish_ci, so nonbinary string
latin1
or a. To make this search case sensitive, make sure
A
character set, you can use the
latin1
or
"CREATE TABLE
Syntax".
2966
option when you run configure. See
UNIX_TIMESTAMP()
Variables".
col_name LIKE 'a
COLLATE
collation:
latin1_bin
[931]
returns
[248]
option to
operator to
to
COLLATE

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Mysql 5.0

Table of Contents