On 16/11/2015 12:00, Dmitry Yemanov wrote: > 16.11.2015 16:50, Adriano dos Santos Fernandes wrote: >> dsqlChild and jrdChild are used for default processing, king of old >> nod_count. >> >> Most nodes has individual members for each sub-node and they are added >> to *Child. >> >> "items" of this class is an array, but it's added to *Child as well. > Looking at RecSourceListNode which also has add() method which adds the > argument into both items and dsqlChildNodes, I see such usage: > > querySpec->dsqlFrom = FB_NEW_POOL(getPool()) > RecSourceListNode(getPool(), 1); > querySpec->dsqlFrom->items[0] = dt; > > so the argument is added only to items but not to dsqlChildNodes. There > are many such cases, actually. Don't they defeat the "default > processing" idea? It looks suspicious at the first glance. > > addChildNode receives an reference to the pointer, so the value can change later.
That's the current reason of resetChildNodes. The 'items' array may reallocate after an add. Adriano ------------------------------------------------------------------------------ Presto, an open source distributed SQL query engine for big data, initially developed by Facebook, enables you to easily query your data on Hadoop in a more interactive manner. Teradata is also now providing full enterprise support for Presto. Download a free open source copy now. http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140 Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel