List:Internals« Previous MessageNext Message »
From:Jay Pipes Date:February 26 2009 7:27pm
Subject:Re: [Drizzle-discuss] Removing Array custom vector allocation for
semi-join subqueries
View as plain text  
Konstantin Osipov wrote:
> * Jay Pipes <Jay.Pipes@stripped> [09/02/26 21:56]:
> 
>> If anyone has any advice or can spot a mistake in the logic above, I'd  
>> appreciate some assistance...
> 
> Our Array is semi-POD compatible. I.e. it's not strictly POD
> according to the standard, but you can, e.g., memcpy it to a
> temporary area and then memcpy back. This is what we do with our
> JOINs sometimes. 

Not sometimes.  All the time, AFAICT.

Problem is is that Item_in_subselect is not a POD.  It's got 
constructors and a base class, and therefore isn't a good "candidate" 
for the Array class...

 > std::vector might lose state between memcpys.

Yes, as noted in the original email, the vector loses state, which is 
why I was making a copy of the Item_in_subselect to put in the vector. 
Problem is that the constructor I was using:

Item_in_subselect(Item *, Select_lex *)

apparently does not fill the object properly, as I get a null-pointer 
error in Item_subselect::fix_fields()...

> Or it can be something completely different -- in any case, it's
> hard to say without seeing the patch.

OK, I'll throw together a patch and post shortly.

Cheers,

jay

Thread
Removing Array custom vector allocation for semi-join subqueriesJay Pipes26 Feb
  • Re: Removing Array custom vector allocation for semi-join subqueriesKonstantin Osipov26 Feb
    • Re: Removing Array custom vector allocation for semi-join subqueriesJay Pipes26 Feb
  • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesKonstantin Osipov26 Feb
    • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesJay Pipes26 Feb
Re: [Drizzle-discuss] Removing Array custom vector allocation for semi-join subqueriesBrian Aker26 Feb
  • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesMonty Taylor27 Feb
    • Re: [Drizzle-discuss] Removing Array custom vector allocation for semi-join subqueriesMARK CALLAGHAN27 Feb
      • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesMonty Taylor27 Feb
        • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesKonstantin Osipov27 Feb
          • Re: [Drizzle-discuss] Removing Array custom vector allocation for semi-join subqueriesMARK CALLAGHAN27 Feb
        • Re: [Drizzle-discuss] Removing Array custom vector allocation for semi-join subqueriesMARK CALLAGHAN27 Feb
          • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesJim Starkey27 Feb
    • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesMichael Widenius2 Mar
      • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesJay Pipes2 Mar
      • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesJim Starkey2 Mar
        • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesKonstantin Osipov2 Mar
        • Re: [Drizzle-discuss] Removing Array custom vector allocation forsemi-join subqueriesMichael Widenius5 Mar
Re: [Drizzle-discuss] Removing Array custom vector allocation for semi-join subqueriesBrian Aker26 Feb