Pdo update #53

Merged
merged 52 commits into from Jun 25, 2012

Conversation

Projects
None yet
5 participants
Collaborator

Klap-in commented Mar 18, 2012

Rebased on master. Added some bug fixes and few new features.

Contributor

glensc commented on b9479d7 Jan 10, 2011

any documentation how to use that substring matching?

Collaborator

adrianheine replied Jan 12, 2011

It’s just a shortcut for field ~ *value*

Contributor

glensc replied Jan 12, 2011

you mean these two are equivalent:
field ~ value
and the new one:
field *~ value

Collaborator

adrianheine replied Jan 12, 2011

Yep, exactly

Contributor

glensc commented on afcbfc4 Jan 10, 2011

isn't the curly parens deprecated in php for string substringing?

i.e
$_REQUEST['datasrt']{0}

should be written as:
$_REQUEST['datasrt'][0]

Contributor

glensc replied Jan 10, 2011

i found this ticket in wordpress trac: http://core.trac.wordpress.org/ticket/13900
however i can't find reference in php changelog when it was deprecated

Contributor

alexgearbox commented on ff98361 Jun 5, 2011

Thanks Andreas!

adrianheine and others added some commits Jun 15, 2011

added simple summarizing to datatables
only shown data is summarized, so when a table is filtered only the
filtered data is summarized
Apply dynamic filters on the real output
This makes dynamic filters mor intuitive as they will act on the
actually displayed data with pre and postifxes applied and page titles
resolved.
Filters derived from url parameters removed from in handle().
Cached filters inteferes with current urlparameters. Filter display above datatable improved.
Added option rownumbers-option.
Shows linenumber at start of row in datatable or datalist.
Contributor

glensc commented Jun 24, 2012

oh, damn, this branch is quite diverged from main branch, any ideas why this code not merged?

Contributor

alexgearbox commented on lang/en/lang.php in 54e528f Jun 24, 2012

Russian: $lang['lastmod'] = 'Последнее изменение';

Collaborator

Klap-in commented Jun 24, 2012

@glensc this branch gives support for PDO sqlite, needed for sqlite3 support. It needs the PDO version of the sqlite plugin (is also available as branch). The PDO version can switch between the origin sqlite2 code and PDO code. Issues to solve before merging are for example an autoupgrade from sqlite2 to 3. Now a manual upgrade of the database is needed.

Contributor

glensc commented Jun 24, 2012

hmm, this blog says that once you write with sqlite3 it is automatically upgraded: http://devzone.zend.com/597/sqlite-lean-mean-db-machine/ --

Warning: SQLite 3 uses a new (and incompatible) file format to store its databases. You can read SQLite 2 databases with SQLite 3, but the file will be converted to the SQLite 3 format. Once this is done you can’t undo it. You have been warned!

Collaborator

Klap-in commented Jun 24, 2012

On my test environment it didn't happen, when i remember correct. But that hasn't sqlite2 support, so maybe the this convert is only when sqlite2 is available... I will modify the pdo sqlite plugin to look for files with .sqlite3 extension to prevent this autoupgrade behavior.

Contributor

glensc commented Jun 24, 2012

yeah, the autoupgrade did not work here as well, got some error from sqlite engine that db is encrypted. and after that the code got internal errors, like this:

[Mon Jun 25 01:12:10 2012] [error] PHP Fatal error: Call to a member function fetchAll() on a non-object in /usr/share/dokuwiki/lib/plugins/sqlite/helper.php on line 510

i.e the return false should be handled somewhy better to stop further processing

Collaborator

Klap-in commented Jun 24, 2012

yes, that's one of the commits in the pull request at sqlite plugin repo :)

Contributor

glensc commented Jun 24, 2012

btw, is sqlite3 faster than sqlite2? as i have terrible performance problem with my version of data:

-rw-rw---- 1 root http 5.4M Jun 25 00:09 data.sqlite

i opened some issue #34 as well, but no changes there :(

Contributor

glensc commented Jun 24, 2012

btw, what about sqlite3 ext: http://php.net/manual/en/book.sqlite3.php imho should be added as well :) as for example in my install pdo_sqlite crashes apache (but not cli), when any of these extensions are installed too, which is terrible

curl,ffmpeg,http,imagick,imap,intl,mysql,mysqli,oauth,openssl,snmp,soap,sockets,sphinx,sqlite,tidy,tokenizer,translit,xml,xml_wddx,xmlrpc,xmlwriter,xsl,zip,zlib

Contributor

glensc commented Jun 24, 2012

regarding upgrade, the blog apparently got it wrong

https://www.sqlite.org/version3.html states that the versions can't be cross used and to convert you should use shell script:

sqlite OLD.DB .dump | sqlite3 NEW.DB

worked ok for me:

# sqlite data.sqlite .dump | sqlite3 data.sqlite3
# ls -lh data.sqlite*
-rw-rw---- 1 root http 7.7M 25. juuni 00:29 data.sqlite
-rw-r----- 1 root root 4.1M 25. juuni 01:24 data.sqlite3
# file data.sqlite*
data.sqlite:  SQLite 2.x database
data.sqlite3: SQLite 3.x database

and seems crashing dissapeared too :S

Klap-in added a commit that referenced this pull request Jun 25, 2012

Merge pull request #53 from Klap-in/pdo
Pdo update. 
Rebased on master. Added some bug fixes and few new features.

@Klap-in Klap-in merged commit 1798b34 into splitbrain:pdo Jun 25, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment