From: Lars-Erik Bjørk Date: January 21 2009 4:44pm Subject: Re: search for null values in indexed columns List-Archive: http://lists.mysql.com/falcon/410 Message-Id: <2001AB54-9940-44B5-8167-6510E46AEB2D@sun.com> MIME-Version: 1.0 Content-Type: text/plain; delsp=yes; format=flowed; charset=US-ASCII Content-Transfer-Encoding: 7BIT Vlad, I have been looking at something related today, http://bugs.mysql.com/bug.php?id=42208 I will look more at this tomorrow ... Interesting! On Jan 21, 2009, at 4:28 PM, Vladislav Vaintroub wrote: > Hi, > I'm quite intrigued by this place in StorageDatabase::makeKey (this > one > translates MySQL key values to Falcon key values during the search). > > It appears that we stop building a key when encountering a null > value and > ignore all following ranges > > Foreach key segment > if (nullFlag) > { > > break; > } > Endforeach > > That is, when NULL is given in the first segment, we produce zero- > length > Falcon key > So how does searching for NULL works in practice? > > How does search range search in multisegment indexes > lower bound (a = NULL, b = const1) > upper bound (a = NULL ,b = const2) > > is supposed to work? > > Thanks for the answer! > > My first suspicion is that NULLs are excluded because NULL is > encoded the > same as numeric 0 (0x80 in index) and this lead to wrong answer. But > I'd > prefer to hear a qualified answer on how it was originally designed > and > supposed to work. > > > > -- > Falcon Storage Engine Mailing List > For list archives: http://lists.mysql.com/falcon > To unsubscribe: http://lists.mysql.com/falcon?unsub=lars-erik.bjork@stripped >