? Failure

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
29 May 2014

Still 1 test in 5.5 that fails in JTable. So not quite ready to merge this yet

avatar wilsonge wilsonge - open - 29 May 2014
avatar dbhurley
dbhurley - comment - 12 Jul 2014

Shall I close this PR until you have it ready to test and merge?

avatar wilsonge
wilsonge - comment - 13 Jul 2014

I can't figure out the JTable stuff. The function is literally a call to JDatabase. Yet the tests for the method there pass. It must be something really specific. But it's completely beyond me.

It's not like I don't have time. It's just beyond me.

avatar mbabker
mbabker - comment - 13 Jul 2014

Looking at the test DDL I'm noticing that the table being used to test on doesn't declare any primary keys and the test is trying to assert that the id1 and id2 columns are both primary keys. The columns are keys in the constraint though. I'd suggest changing that DDL to declare the two columns as PRIMARY KEY's and let's see how well it tests.

avatar wilsonge
wilsonge - comment - 13 Jul 2014
avatar mbabker
mbabker - comment - 13 Jul 2014

As best as I can tell, no, but I'm not thoroughly familiar with SQLite create table syntax. If you look at most of the other tables in that DDL, the column has a PRIMARY KEY statement as part of the declaration, not as a separate constraint (the session table ironically matches the test table as far as syntax goes, but that appears to be the single exception).

avatar mbabker
mbabker - comment - 13 Jul 2014

Even on @elkuku PR for adding SQLite support to the full CMS, he's using the PRIMARY KEY statements on the column declarations, so I get a feeling that's probably what the right thing is - https://github.com/elkuku/joomla-cms/blob/sqlite__clean/installation/sql/sqlite/joomla.sql

avatar wilsonge
wilsonge - comment - 13 Jul 2014

OK. I'll give it a shot. I'm not familiar either.

From what I could see we are using that method consistently for multiple primary keys and then doing the column definitions when there is only 1 primary key for the table. And @elkuku seems to conform to that (I can't see any multiple primary keys there). http://stackoverflow.com/questions/734689/sqlite-primary-key-on-multiple-columns There's also this SO answer I've been referring to as my guide

But yah I'll try it - nothing lost something to gain :)

avatar wilsonge
wilsonge - comment - 13 Jul 2014

Looks like it hasn't worked :/ I've just merged in staging though as some were the serialize tests we had to patch up

avatar Achal-Aggarwal
Achal-Aggarwal - comment - 13 Jul 2014

Here is the fixed PR #3898

avatar wilsonge
wilsonge - comment - 13 Jul 2014

Nice one! I'm intrigued tho. What does php 5.5 return that is different to 5.3/5.4 - as your pr seems like a mini cop-out

Closing this :)

avatar wilsonge wilsonge - change - 13 Jul 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-07-13 21:18:41
avatar wilsonge wilsonge - close - 13 Jul 2014
avatar wilsonge wilsonge - close - 13 Jul 2014
avatar wilsonge wilsonge - head_ref_deleted - 13 Jul 2014
avatar Achal-Aggarwal
Achal-Aggarwal - comment - 14 Jul 2014

Actually in PHP 5.5.11 we have an updated sqlite 3.8.3.1 which now assign an index to the primary key. So if an attribute is a primary key then PK value will be '1' or '0' otherwise. This is also true for previous versions but now if we have a composite primary key then all attributes in the composite primary key will be indexed from '1' to 'n' if there are 'n' of them. Earlier all of them would have '1'.
So its true only for PHP ver. >= 5.5.11

avatar wilsonge
wilsonge - comment - 14 Jul 2014

Ahhh nice one :)

Add a Comment

Login with GitHub to post a comment