Re: Comparing UNSIGNED and INDEXED columns with negative numbers

2002-05-16 Thread Georg Richter
On Thursday, 16. May 2002 21:44, Benjamin Pflugmann wrote: > Hi. > > What you observe is the fact that "-1" will be converted to the format > of the index, else the index could not be used. > > Converting -1 to an unsigned number give the biggest possible number > for the type in question (here BI

Re: Comparing UNSIGNED and INDEXED columns with negative numbers

2002-05-16 Thread Benjamin Pflugmann
Hi. What you observe is the fact that "-1" will be converted to the format of the index, else the index could not be used. Converting -1 to an unsigned number give the biggest possible number for the type in question (here BIGINT UNSIGNED). None of your numbers is bigger than this, so you get an

Comparing UNSIGNED and INDEXED columns with negative numbers

2002-05-16 Thread Charlie Thunderberg
Hi All, Using MySQL server version 3.23.49-nt I get strange results when running the following very simple test. I am wondering if this is a bug, feature or perhaps a standart SQL behaviour?? CREATE TABLE test(id BIGINT UNSIGNED); CREATE INDEX test_idx on test(id); INSERT INTO test VALUES (0)