daniel added a comment.

That will indeed work:

INSERT INTO wb_id_counters (id_type, id_value) VALUES ('wikibase-item', 1) ON DUPLICATE KEY UPDATE id_value = LAST_INSERT_ID(id_value + 1);
SELECT LAST_INSERT_ID();

This solution is specific to MySQL, right?

I guess that's ok, since Wikibase doesn't support anything else. Do we check on install?


TASK DETAIL
https://phabricator.wikimedia.org/T194299

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: aaron, TerraCodes, Stashbot, Banyek, Paladox, mmodell, daniel, Addshore, Aklapper, gerritbot, hoo, CucyNoiD, Nandana, NebulousIris, Gaboe420, Versusxo, Majesticalreaper22, Giuliamocci, Adrian1985, Cpaulf30, Lahi, Gq86, Baloch007, Darkminds3113, Bsandipan, Lordiis, GoranSMilovanovic, lisong, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, LawExplorer, Lewizho99, Maathavan, D3r1ck01, Jonas, Wikidata-bugs, aude, Lydia_Pintscher, Jdforrester-WMF, Mbch331, Jay8g, Krenair
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to