User tests: Successful: Unsuccessful:
Still 1 test in 5.5 that fails in JTable. So not quite ready to merge this yet
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.
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.
https://github.com/wilsonge/joomla-cms/blob/patch-21/tests/unit/schema/ddl.sql#L700 isn't the primary key defined here?
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).
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
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 :)
Looks like it hasn't worked :/ I've just merged in staging though as some were the serialize tests we had to patch up
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 :)
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-07-13 21:18:41 |
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
Ahhh nice one :)
Shall I close this PR until you have it ready to test and merge?