Three things. 1) sqlite INT is bigger than 32bits on a 32bit Ubuntu10.10. 2) mysql INT is not 3) can't get functional test to work with mysql connection string. E.g. with GLANCE_SQL_CONNECTION=mysql://root:mypassword@127.0.0.1/glance
To verify MySQL will not work with schema use mysql tool to add table with one column of type INT. E.g. start mysql tool
mysql -u"root" -p
Next, create a new database, and create a table 'test' with a column called 'size' fo type 'INT'. Add two rows, one with the value '1' and another with the value 5368709120 (5gig in bytes). The commands are below, and result in a wrong value being stored and returned for 5368709120
CREATE DATABASE foo;
USE foo;
CREATE TABLE test ( size INT);
INSERT INTO test (size) VALUES( 1 );
INSERT INTO test (size) VALUES( 5368709120 );
SELECT * FROM test;
Three things. 1) sqlite INT is bigger than 32bits on a 32bit Ubuntu10.10. 2) mysql INT is not 3) can't get functional test to work with mysql connection string. E.g. with GLANCE_ SQL_CONNECTION= mysql:/ /root:mypasswor d@127.0. 0.1/glance
To verify MySQL will not work with schema use mysql tool to add table with one column of type INT. E.g. start mysql tool
mysql -u"root" -p
Next, create a new database, and create a table 'test' with a column called 'size' fo type 'INT'. Add two rows, one with the value '1' and another with the value 5368709120 (5gig in bytes). The commands are below, and result in a wrong value being stored and returned for 5368709120
CREATE DATABASE foo;
USE foo;
CREATE TABLE test ( size INT);
INSERT INTO test (size) VALUES( 1 );
INSERT INTO test (size) VALUES( 5368709120 );
SELECT * FROM test;
E.g.
mysql> CREATE DATABASE foo;
Query OK, 1 row affected (0.00 sec)
mysql> USE foo;
Database changed
mysql> CREATE TABLE test (size INT)
-> ;
Query OK, 0 rows affected (0.01 sec)
mysql> INSERT INTO test (size) VALUES (1);
Query OK, 1 row affected (0.00 sec)
mysql> INSERT INTO test (size) VALUES (5368709120);
Query OK, 1 row affected, 1 warning (0.00 sec)
mysql> SELECT * FROM test;
+------------+
| size |
+------------+
| 1 |
| 2147483647 |
+------------+
2 rows in set (0.00 sec)
mysql>