Let me have a look at your scripts.<br><br>-g.<br><br><div><span class="gmail_quote">On 9/1/07, <b class="gmail_sendername">Mark Van De Vyver</b> &lt;<a href="mailto:mvyver@gmail.com">mvyver@gmail.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 9/1/07, Mark Van De Vyver &lt;<a href="mailto:mvyver@gmail.com">mvyver@gmail.com</a>&gt; wrote:
<br>&gt; Hmm,<br>&gt; I think I&#39;ve worked out what the problem is and may have a solution<br>&gt; that should also improve performance - I hope.<br><br>No joy. I&#39;m stumped.....&nbsp;&nbsp;:(<br><br>Mark<br><br>&gt; Mark<br>
&gt;<br>&gt; On 9/1/07, Mark Van De Vyver &lt;<a href="mailto:mvyver@gmail.com">mvyver@gmail.com</a>&gt; wrote:<br>&gt; &gt; Hi,<br>&gt; &gt;<br>&gt; &gt; I think I found some unexpected behaviors from OG - the first can be a
<br>&gt; &gt; show stopper from some.<br>&gt; &gt; This may be specific to the MySQL and sqlite adapters?<br>&gt; &gt; The two ruby scripts show the behaviors described below.<br>&gt; &gt; I use the MySQL and the Sqlite adapters, could any one confirm they
<br>&gt; &gt; see the same behavior described below with another adapter - just in<br>&gt; &gt; case.<br>&gt; &gt;<br>&gt; &gt; **SHOW STOPPER**<br>&gt; &gt; 1) The Og::SqlStore#exec_statement seems to rearrange the data<br>
&gt; &gt; submitted in an sql string, and example of the original SQL statement<br>&gt; &gt; data and the SQL statement submitted to the MySQL store follows.<br>&gt; &gt;<br>&gt; &gt; insert into ogmember ( address1,city,email,first_name,state,last_name
<br>&gt; &gt; ) values ( &#39;123 High<br>&gt; &gt; St.&#39;,&#39;Reykjavik&#39;,&#39;<a href="mailto:fred@flintstone.com">fred@flintstone.com</a>&#39;,&#39;Fred&#39;,&#39;Michigan&#39;,&#39;Flintstone&#39;<br>&gt; &gt; )
<br>&gt; &gt;<br>&gt; &gt; DEBUG: INSERT INTO `ogmember` (`address1`, `city`, `oid`, `email`,<br>&gt; &gt; `first_name`, `state`, `last_name`) VALUES (&#39;<a href="mailto:fred@flintstone.com">fred@flintstone.com</a>&#39;,
<br>&gt; &gt; &#39;Fred&#39;, NULL, &#39;Flintstone&#39;, &#39;123 High St.&#39;, &#39;Michigan&#39;, &#39;Reykjavik&#39;)<br>&gt; &gt;<br>&gt; &gt; **Normal**<br>&gt; &gt; 2) In script og_create_unexpected2b.rb the DEBUG statements do not
<br>&gt; &gt; print out when running the single method in the &#39;Benchmark.bmbm do<br>&gt; &gt; ..end&#39; loop.<br>&gt; &gt; In script og_create_unexpected2.rb I observe that the addition of<br>&gt; &gt; another method in the benchmark loop results in the Debug code being
<br>&gt; &gt; printed.&nbsp;&nbsp;The same behavior occurs if 5 or 5000 rows are inserted, so<br>&gt; &gt; I don&#39;t think it is some output buffering issue - or maybe it is?<br>&gt; &gt; The only difference in these two files is in the benchmark loop
<br>&gt; &gt; where &quot;&#39;create&#39; =&gt; :create_fixture,&quot; is present or absent.<br>&gt; &gt;<br>&gt; &gt; **trivial**<br>&gt; &gt; 3) Og#connect seems to make two selects from a table that has just<br>&gt; &gt; been created.&nbsp;&nbsp;I haven&#39;t dug in to see why, but thought I give a
<br>&gt; &gt; &#39;heads-up&#39; in case they shouldn&#39;t be there.&nbsp;&nbsp;The queries I refer to<br>&gt; &gt; are issued from within OG#connect, the attached files should print<br>&gt; &gt; out:<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;INFO: Og uses the Mysql store.
<br>&gt; &gt; DEBUG: Og manageable classes: [Member]<br>&gt; &gt; DEBUG: CREATE TABLE `ogmember` (`first_name` text, `last_name` text,<br>&gt; &gt; `address1` text, `city` text, `state` text, `email` text, `oid`<br>&gt; &gt; integer AUTO_INCREMENT PRIMARY KEY)
<br>&gt; &gt; DEBUG: SELECT * FROM `ogmember` LIMIT 1<br>&gt; &gt; DEBUG: SELECT * FROM `ogmember` LIMIT 1<br>&gt; &gt;<br>&gt; &gt; Using the Sqlite adapter I see something slightly different, but still<br>&gt; &gt; the duplicate `&#39;SELECT&#39;:
<br>&gt; &gt;<br>&gt; &gt;&nbsp;&nbsp;INFO: Og uses the Sqlite store.<br>&gt; &gt; DEBUG: Og manageable classes: [Member]<br>&gt; &gt; DEBUG: CREATE TABLE ogmember (first_name text, last_name text,<br>&gt; &gt; address1 text, city text, state text, email text, oid integer PRIMARY
<br>&gt; &gt; KEY)<br>&gt; &gt;&nbsp;&nbsp;INFO: Created table ogmember.<br>&gt; &gt; DEBUG: SELECT * FROM ogmember LIMIT 1<br>&gt; &gt; DEBUG: SELECT * FROM ogmember LIMIT 1<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; HTH<br>&gt; &gt; Mark
<br>&gt; &gt;<br>&gt; &gt;<br>&gt;<br>_______________________________________________<br>Nitro-general mailing list<br><a href="mailto:Nitro-general@rubyforge.org">Nitro-general@rubyforge.org</a><br><a href="http://rubyforge.org/mailman/listinfo/nitro-general">
http://rubyforge.org/mailman/listinfo/nitro-general</a><br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.me.gr">http://www.me.gr</a><br><a href="http://phidz.com">http://phidz.com</a><br><a href="http://blog.gmosx.com">
http://blog.gmosx.com</a><br><a href="http://cull.gr">http://cull.gr</a><br><a href="http://www.joy.gr">http://www.joy.gr</a><br><a href="http://nitroproject.org">http://nitroproject.org</a>