Re: Can't Set SQL_MODE?!

2004-01-17 Thread mattb
By the way, I should point out that I *can* get it to work by adding:

[mysqld]
ansi

Or:
[mysqld]
sql_mode=PIPES_AS_CONCAT

But this is not what I want, since I'm going to be hosting this app
where I won't have access to the server config. I need to be able to set
it on a per session (or client) basis as the documentation indicates.

Again, any help would be appreciated.

--Matt

On Sat, 17 Jan 2004 [EMAIL PROTECTED] wrote:

>...
>
>Okay, fair enough. My app needs ANSI (or at least PIPES_AS_CONCAT). So
>here I go...
>
>...

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Can't Set SQL_MODE?!

2004-01-17 Thread mattb
Howdy all,

I've tried to search for an answer to this on the lists (and on google),
but I haven't been able to come up with anything, so I apologize in
advance if this question is redundant.

According to the docs (http://www.mysql.com/doc/en/SQL_mode.html):

"The MySQL server can operate in different SQL modes, and can apply
these modes differentially for different clients

"You can set...the SQL_MODE variable with SET [SESSION|GLOBAL]
SQL_MODE='modes' Setting the SESSION variable affects only the
current client You can retrieve the current mode by issuing a
SELECT @@sql_mode statement."

Okay, fair enough. My app needs ANSI (or at least PIPES_AS_CONCAT). So
here I go...

mysql> \s
--
mysql Ver 12.22 Distrib 4.0.17, for pc-linux (i686)

Connection id: 8
Current database: mysql
Current user: [EMAIL PROTECTED]
SSL: Not in use
Current pager: stdout
Using outfile: ''
Server version: 4.0.17-standard
Protocol version: 10
Connection: Localhost via UNIX socket
Client characterset: latin1
Server characterset: latin1
UNIX socket: /var/lib/mysql/mysql.sock
Uptime: 1 day 14 hours 32 min 19 sec

Threads: 1 Questions: 708 Slow queries: 0 Opens: 419 Flush tables: 1
Open tables: 48 Queries per second avg: 0.005
--

mysql> SET SESSION SQL_MODE='ANSI';
ERROR 1193: Unknown system variable 'SQL_MODE'
mysql> SET SESSION sql_mode='ANSI';
ERROR 1193: Unknown system variable 'sql_mode'
mysql> SELECT @@sql_mode;
ERROR 1193: Unknown system variable 'sql_mode'
mysql> show variables like '%mode%';

+---+---+
| Variable_name | Value |
+---+---+
| sql_mode  | 0 |
+---+---+

1 row in set (0.00 sec)

Huh? Was the documenation just plain lying to me? What gives? Any help
would be extremely appreciated.

--Matt

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]