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