Discussion:
Binary result as strings
Damien Hardy
2009-04-15 10:51:34 UTC
Permalink
Hello,

I am testing sequoia and myosotis for some PHP projects (magento for
instance) for a few days now.

My first tests was quiet encouraging, very impressed by all the
possibility this platform may offer (fail over, scalability,
exploitation).

I am now blocked by a tiny bug that my search on the ML show me that is
suppose to be closed (
http://forge.continuent.org/pipermail/myosotis/2008-January/000134.html )
...
so I'm a bit disappointed.

Here the facts :

I use
- MySQL 5.0 (debian lenny version)
- sequoia 2.10.10 (binary version) with j/connector 5.0.8 (binaries
from mysql.com)
- myosotis 0.6.5

In my database I have a table (admin_user) with a tinyint (is_active
default 1)
-When I request it directly from mysql-client to mysqld I get a "1" and
i'm happy :
l# echo 'select is_active from admin_user\G;' |mysql magento
*************************** 1. row ***************************
is_active: 1

- When I request it from the sql client in sequoia I get a "true" and I'm
quite happy :
# select is_active from admin_user;
+-----------+
| is_active |
+-----------+
| true |
+-----------+

But When i request it from mysql-client via myosotis I get an 0x01 and
that's failing on my php application.

# echo 'select is_active from admin_user\G;' | mysql -h hostname -P 9999
-u magento myDB
*************************** 1. row ***************************
is_active:  (0x01 in case of cleaning by mailer)

Where am I wrong ?

Best regards,
--
Damien Hardy
Damien Hardy
2009-04-15 11:10:19 UTC
Permalink
Post by Damien Hardy
Hello,
I am testing sequoia and myosotis for some PHP projects (magento for
instance) for a few days now.
My first tests was quiet encouraging, very impressed by all the
possibility this platform may offer (fail over, scalability,
exploitation).
I am now blocked by a tiny bug that my search on the ML show me that is
suppose to be closed (
http://forge.continuent.org/pipermail/myosotis/2008-January/000134.html )
...
so I'm a bit disappointed.
I use
- MySQL 5.0 (debian lenny version)
- sequoia 2.10.10 (binary version) with j/connector 5.0.8 (binaries
from mysql.com)
- myosotis 0.6.5
In my database I have a table (admin_user) with a tinyint (is_active
default 1)
-When I request it directly from mysql-client to mysqld I get a "1" and
l# echo 'select is_active from admin_user\G;' |mysql magento
*************************** 1. row ***************************
is_active: 1
- When I request it from the sql client in sequoia I get a "true" and I'm
# select is_active from admin_user;
+-----------+
| is_active |
+-----------+
| true |
+-----------+
But When i request it from mysql-client via myosotis I get an 0x01 and
that's failing on my php application.
# echo 'select is_active from admin_user\G;' | mysql -h hostname -P 9999
-u magento myDB
*************************** 1. row ***************************
is_active:  (0x01 in case of cleaning by mailer)
Where am I wrong ?
Best regards,
I have done some other tests on a new table via myosotis

mysql> desc test;
+-------+------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------------+------+-----+---------+-------+
| val | int(11) | YES | | NULL | |
| test2 | tinyint(1) | YES | | 1 | |
+-------+------------+------+-----+---------+-------+

mysql> insert into test values ( FLOOR(RAND() * 10000) );

mysql> select * from test;
+------+-------+
| val | test2 |
+------+-------+
| 4839 |  |
+------+-------+

I modify a bit the table structure :
mysql> desc test;
+-------+------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+------------+------+-----+---------+-------+
| val | int(11) | YES | | NULL | |
| test2 | tinyint(4) | YES | | 1 | |
+-------+------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

mysql> select * from test limit 0,1;
+------+-------+
| val | test2 |
+------+-------+
| 4839 | 1 |
+------+-------+

Best regards,
--
Damien Hardy
Gilles Rayrat
2009-04-15 12:02:09 UTC
Permalink
_______________________________________________
Myosotis mailing list
Myosotis-RyYwo1q5J+pm4DMUGMHt/jIQnlzKTOB+***@public.gmane.org
http://forge.continuent.org/mailman/listinfo/myosotis
Damien Hardy
2009-04-15 13:04:14 UTC
Permalink
Yes, everything is working fine now.

I had some errors about timestamp conversion from 0000-00-00... so I add
also zeroDateTimeBehavior=convertToNull in my URL.

Thank you for the tips.

Best regards,
--
Damien
Hi Damien,
You might be interested in the virtualdatabase url option tiny
tinyInt1isBit=false
You need to change your vdb definition xml file and restart the cluster
Don't hesitate to report your progress on this
Cheers,
Gilles.
Loading...