Hi,

First off, you have to forgive my ignorance, I'm not very savvy with
DBs so I hope that I explain myself correctly.

I have an anomaly on a development system. There are several fields
with the type set as bigint(20) that are meant to store a bit pattern.
The pattern is used to determine country restrictions on where items
may be purchased.

On the live, V4.1.10, system the restrictions work as they should. If
update the fields with a string such as:

ctrymsk0=ffdfffffffffffff   when view on the CLI if shows as -9007199254740993
and when a query such as
SELECT COUNT(*) FROM products WHERE productid=808800034 AND (ctrymsk0
& 0x0020000000000000);
I get the expected results.

I don't fully understand all that is going on with the above bit
pattern.  What I do know is that the same operations on a V5 system
always result in a value of 9223372036854775807 regardless of what
pattern is supplied and the returns incorrect results when queried
with the bitwise AND.

I thought that perhaps there is either a difference in the way bit
pattern like this are stored between version 4 and version 5. Or
Perhaps there is a mechanism/configuration that allows v4 to stores
bits in this way which is I need to enable on V5.

Does anyone have a ideas that might either explain the difference or
perhaps know what data type these fields should be stored in under V5?

TIA,
Dp.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to