Ignore:
Timestamp:
12/31/2007 02:17:16 PM (18 years ago)
Author:
raverkamp
revision id:
svn-v3-trunk1:1c22b0a8-4d0b-0410-a296-af6a2e6f35e3:plain-odbc%2Ftrunk:9
Message:

minor changes, test for mysql, delete of ffc dir

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 64-bit/doc/notes.html

    r1 r2.1.2  
    140140At least we prevent the coredump of the Oracle driver.<br>
    141141I am pretty sure that this is a driver bug, Microsoft Access coredumps as well in similar situations.
     142
     143
     144<h4>MYSQL</h4>
     145This is not one would expect!
     146<pre>
     147mysql> create view bla as select  date_add('2007-8-1',interval 1 day) as a;
     148Query OK, 0 rows affected (0.01 sec)
     149
     150mysql> desc bla
     151    -> ;
     152+-------+---------------+------+-----+---------+-------+
     153| Field | Type          | Null | Key | Default | Extra |
     154+-------+---------------+------+-----+---------+-------+
     155| a     | varbinary(29) | YES  |     | NULL    |       |
     156+-------+---------------+------+-----+---------+-------+
     1571 row in set (0.00 sec)
     158</pre>
     159how to do it right:
     160<pre>
     161mysql> create view bla2 as select  date_add(cast('2007-8-1' as datetime),interval 1 day) as a;
     162Query OK, 0 rows affected (0.00 sec)
     163
     164mysql> desc bla2;
     165+-------+----------+------+-----+---------+-------+
     166| Field | Type     | Null | Key | Default | Extra |
     167+-------+----------+------+-----+---------+-------+
     168| a     | datetime | YES  |     | NULL    |       |
     169+-------+----------+------+-----+---------+-------+
     1701 row in set (0.00 sec)
     171</pre>
     172<p>
     173Be carefull with variables, declared with something like
     174<tt>set @a =1</tt>. The types are automatically determined, and a type for
     175dates does not exist.
     176</p>
     177<p>
     178Of course error handling in MySQL is not existent, maybe I should change the
     179server settings:
     180<pre>
     181mysql> select cast(cast('12345678901' as decimal) as char) as a, cast(cast('1234567890' as decimal) as char) as b;
     182+------------+------------+
     183| a          | b          |
     184+------------+------------+
     185| 9999999999 | 1234567890 |
     186+------------+------------+
     1871 row in set, 1 warning (0.00 sec)
     188</pre>
     189<p>So there is no overflow error.</p>
     190<p>
     191Division by zero is handled, but only for an insert:
     192<pre>
     193mysql> set @a=1;
     194Query OK, 0 rows affected (0.00 sec)
     195
     196mysql> set @b=0;
     197Query OK, 0 rows affected (0.00 sec)
     198
     199mysql> select @a/@b;
     200+-------+
     201| @a/@b |
     202+-------+
     203|  NULL |
     204+-------+
     2051 row in set, 1 warning (0.00 sec)
     206
     207mysql> insert into blu select @a/@b;
     208ERROR 1365 (22012): Division by 0
     209</pre>
     210
    142211</html>
Note: See TracChangeset for help on using the changeset viewer.