I tried to install HEAD on SQLite and got the errors below.

The installation has encountered an error.
Please continue to the error page
An HTTP error 500 occurred.
http://sqlite.john.users.localdomain/install.php?locale=en&profile=default&id=1&op=do


    * All necessary changes to ./sites/default and ./sites/default/settings.php have been made, so you should remove write permissions to them now in order to avoid security risks. If you are unsure how to do so, please consult the online handbook.
    * PDOException: UPDATE {menu_links} SET menu_name=:db_update_placeholder_0, plid=:db_update_placeholder_1, link_path=:db_update_placeholder_2, router_path=:db_update_placeholder_3, hidden=:db_update_placeholder_4, external=:db_update_placeholder_5, has_children=:db_update_placeholder_6, expanded=:db_update_placeholder_7, weight=:db_update_placeholder_8, depth=:db_update_placeholder_9, p1=:db_update_placeholder_10, p2=:db_update_placeholder_11, p3=:db_update_placeholder_12, p4=:db_update_placeholder_13, p5=:db_update_placeholder_14, p6=:db_update_placeholder_15, p7=:db_update_placeholder_16, p8=:db_update_placeholder_17, p9=:db_update_placeholder_18, module=:db_update_placeholder_19, link_title=:db_update_placeholder_20, options=:db_update_placeholder_21, customized=:db_update_placeholder_22 WHERE (mlid = :db_condition_placeholder_34) AND ( (menu_name <> :db_condition_placeholder_11) OR (menu_name IS NULL) OR (plid <> :db_condition_placeholder_12) OR (plid IS NULL) OR (link_path <> :db_condition_placeholder_13) OR (link_path IS NULL) OR (router_path <> :db_condition_placeholder_14) OR (router_path IS NULL) OR (hidden <> :db_condition_placeholder_15) OR (hidden IS NULL) OR (external <> :db_condition_placeholder_16) OR (external IS NULL) OR (has_children <> :db_condition_placeholder_17) OR (has_children IS NULL) OR (expanded <> :db_condition_placeholder_18) OR (expanded IS NULL) OR (weight <> :db_condition_placeholder_19) OR (weight IS NULL) OR (depth <> :db_condition_placeholder_20) OR (depth IS NULL) OR (p1 <> :db_condition_placeholder_21) OR (p1 IS NULL) OR (p2 <> :db_condition_placeholder_22) OR (p2 IS NULL) OR (p3 <> :db_condition_placeholder_23) OR (p3 IS NULL) OR (p4 <> :db_condition_placeholder_24) OR (p4 IS NULL) OR (p5 <> :db_condition_placeholder_25) OR (p5 IS NULL) OR (p6 <> :db_condition_placeholder_26) OR (p6 IS NULL) OR (p7 <> :db_condition_placeholder_27) OR (p7 IS NULL) OR (p8 <> :db_condition_placeholder_28) OR (p8 IS NULL) OR (p9 <> :db_condition_placeholder_29) OR (p9 IS NULL) OR (module <> :db_condition_placeholder_30) OR (module IS NULL) OR (link_title <> :db_condition_placeholder_31) OR (link_title IS NULL) OR (options <> :db_condition_placeholder_32) OR (options IS NULL) OR (customized <> :db_condition_placeholder_33) OR (customized IS NULL) ) - Array ( [:db_update_placeholder_0] => navigation [:db_update_placeholder_1] => 0 [:db_update_placeholder_2] => batch [:db_update_placeholder_3] => batch [:db_update_placeholder_4] => -1 [:db_update_placeholder_5] => 0 [:db_update_placeholder_6] => 0 [:db_update_placeholder_7] => 0 [:db_update_placeholder_8] => 0 [:db_update_placeholder_9] => 1 [:db_update_placeholder_10] => 1 [:db_update_placeholder_11] => 0 [:db_update_placeholder_12] => 0 [:db_update_placeholder_13] => 0 [:db_update_placeholder_14] => 0 [:db_update_placeholder_15] => 0 [:db_update_placeholder_16] => 0 [:db_update_placeholder_17] => 0 [:db_update_placeholder_18] => 0 [:db_update_placeholder_19] => system [:db_update_placeholder_20] => [:db_update_placeholder_21] => a:0:{} [:db_update_placeholder_22] => 0 [:db_condition_placeholder_34] => 1 [:db_condition_placeholder_11] => navigation [:db_condition_placeholder_12] => 0 [:db_condition_placeholder_13] => batch [:db_condition_placeholder_14] => batch [:db_condition_placeholder_15] => -1 [:db_condition_placeholder_16] => 0 [:db_condition_placeholder_17] => 0 [:db_condition_placeholder_18] => 0 [:db_condition_placeholder_19] => 0 [:db_condition_placeholder_20] => 1 [:db_condition_placeholder_21] => 1 [:db_condition_placeholder_22] => 0 [:db_condition_placeholder_23] => 0 [:db_condition_placeholder_24] => 0 [:db_condition_placeholder_25] => 0 [:db_condition_placeholder_26] => 0 [:db_condition_placeholder_27] => 0 [:db_condition_placeholder_28] => 0 [:db_condition_placeholder_29] => 0 [:db_condition_placeholder_30] => system [:db_condition_placeholder_31] => [:db_condition_placeholder_32] => a:0:{} [:db_condition_placeholder_33] => 0 ) SQLSTATE[HY000]: General error: 25 bind or column index out of range in menu_link_save() (line 2168 of /home/john/public_html/sqlite/includes/menu.inc).

The website encountered an unexpected error. Please try again later. 
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Damien Tournoud’s picture

I really can't see anything wrong with that query. Could you please report your SQLite and PHP versions?

Damien Tournoud’s picture

Status: Active » Postponed (maintainer needs more info)
Crell’s picture

Damien Tournoud’s picture

Title: Installation errors on SQLite » SQLite badly replaces unamed placeholders
Status: Postponed (maintainer needs more info) » Needs review
FileSize
1.66 KB

Ok, there was a bug in the SQLite replacement of unamed placeholders: it replaced all matches of a given placeholder (so both ':db-update-1' and ':db-update-11' where replaced. Fixed to replace only true placeholders.

Note that SQLite is also broken because of #342693: SQLite broken: DatabaseStatementPrefetch iterator implements a scroll cursor, not a forward only one. Please apply both patch for testing purposes.

Status: Needs review » Needs work

The last submitted patch failed testing.

Dave Reid’s picture

Marked #342725: Broken HEAD - Super long update queries as a duplicate of this bug.

Dave Reid’s picture

Priority: Normal » Critical

Bumping this to critical since this is essential to fixing broken HEAD on sqlite.

Dave Reid’s picture

Revised patch without commenting out the error handling. Confirmed with this patch I can now install HEAD.

Dave Reid’s picture

Status: Needs work » Needs review

Marking code needs review.

Crell’s picture

Status: Needs review » Needs work

[^a-zA-Z0-9-] can be shortened to [^\W-], can't it?

I know it's one line, but anything involving a regex needs a direct comment, IMO. Those things are ridiculous to try and figure out otherwise, even if relatively simple.

Dave Reid’s picture

It should actually be [^\w-]. Not sure what comment to put there, I was just re-formatting #4.

chx’s picture

Status: Needs work » Reviewed & tested by the community

Word character, I would rather not try. This is fine as it is. And no, not every regex needs a comment if it's trivial like that. It can be that you dislike regex as I dislike OOP but that does not mean we should comment every single occurence.

chx’s picture

Status: Reviewed & tested by the community » Needs work

On IRC we discussed and there is a need for a comment and the regex can and should be shortened to (?!\w).

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
1.08 KB

Revised patch using /b to make sure the placeholder ends in a word boundary.

John Morahan’s picture

Status: Needs review » Needs work

That looks even better, but now it doesn't need the '$1' because there is no final matching character to tack back on.

Dave Reid’s picture

Status: Needs work » Needs review
FileSize
1.07 KB

Oops.

Yay...I can install HEAD on sqlite again!

Damien Tournoud’s picture

Status: Needs review » Reviewed & tested by the community
John Morahan’s picture

Ok, with this patch alone I can install HEAD again, but not do much else. With this plus #342693: SQLite broken: DatabaseStatementPrefetch iterator implements a scroll cursor, not a forward only one I can install and run the tests on SQLite: 7469 passes, 11 fails, and 0 exceptions. The fails are in search and user. I don't know what causes them but they are all in ordering tests, so maybe they're related to the other patch which does stuff with cursors and iteration. This patch here looks good to me.

One very minor nit though, the example placeholders in the comments should use '_' not '-'. Attached patch changes this but is otherwise identical to #16.

John Morahan’s picture

err... without the .htaccess bit. sorry

hswong3i’s picture

Subscribe

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.