From: Masood Mortazavi Date: May 12 2009 10:19pm Subject: Re: MySQL Reengineering Project List-Archive: http://lists.mysql.com/internals/36658 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Alex - On Tue, May 12, 2009 at 2:07 PM, Alex Esterkin wrote: > On Tue, May 12, 2009 at 4:36 PM, Brian Aker wrote: >> Hi! >> >> On May 12, 2009, at 12:13 PM, Alex Esterkin wrote: >> >>> =A0For all semantic >>> purposes, THD=3DSession. >> >> >> A Session object can be moved across scheduler objects, there is no 1=3D= 1 >> ratio in Drizzle between Session and Thread. > > This is exactly the point I am making. =A0 In Drizzle, you =A0renamed THD > into Session and decoupled threads and sessions - exactly the way it > should be. =A0 In MySQL, THD is both, a thread and a session state > holder, and it should only hold the latter. > Out of curiosity ... Why would this be inherently good for MySQL? Server designs that assign a session to a worker thread are classic. However, even in these designs, there may be multiple threads attending to a particular session's various functions during its lifecycle. In some languages, the base threading libraries offer a thread-local object can be assigned or identified with the session context for current task being processes by a given thread. Regards, - m.