Re: PostgreSQL vs mySQL, any performance difference for - Mailing list pgsql-general

From Michael Fuhr
Subject Re: PostgreSQL vs mySQL, any performance difference for
Date
Msg-id 20051025194840.GA76010@winnie.fuhr.org
Whole thread Raw
In response to Re: PostgreSQL vs mySQL, any performance difference for  (Scott Marlowe <smarlowe@g2switchworks.com>)
List pgsql-general
On Tue, Oct 25, 2005 at 02:24:11PM -0500, Scott Marlowe wrote:
> Cool.  Does it still error out after issueing:
>
> set sql_mode='MYSQL323';
>
> ???
>
> Just wondering if bounds checking is still optional but is now op-out
> instead of opt-in, or if it's something that you can no longer turn off.

Actually it still appears to be opt-in in stock builds.  I have a
5.0.15 server built from source and sql_mode is empty by default,
so I still get the bogus behavior.

mysql> select version();
+------------+
| version()  |
+------------+
| 5.0.15-log |
+------------+
1 row in set (0.00 sec)

mysql> select @@sql_mode;
+------------+
| @@sql_mode |
+------------+
|            |
+------------+
1 row in set (0.00 sec)

mysql> create table test (i1 int);
Query OK, 0 rows affected (0.92 sec)

mysql> insert into test values (123913284723498723423);
Query OK, 1 row affected, 2 warnings (0.00 sec)

mysql> select * from test;
+------------+
| i1         |
+------------+
| 2147483647 |
+------------+
1 row in set (0.00 sec)

mysql> set sql_mode='MYSQL323';
Query OK, 0 rows affected (0.01 sec)

mysql> insert into test values (123913284723498723423);
Query OK, 1 row affected, 2 warnings (0.00 sec)

mysql> select * from test;
+------------+
| i1         |
+------------+
| 2147483647 |
| 2147483647 |
+------------+
2 rows in set (0.01 sec)

mysql> set sql_mode='STRICT_ALL_TABLES';
Query OK, 0 rows affected (0.00 sec)

mysql> insert into test values (123913284723498723423);
ERROR 1264 (22003): Out of range value adjusted for column 'i1' at row 1

--
Michael Fuhr

pgsql-general by date:

Previous
From: "Magnus Hagander"
Date:
Subject: Re: alt+F not working after calling pg_dump
Next
From: Peter Wiersig
Date:
Subject: Re: Installation Problem