To quote the function's comment:
Awful hack to handle timeouts in SQLite: just retry the transaction. DBD::SQLite has a 30 second retry window, but apparently it doesn't work.
Since SQLite is now dropped entirely, this wrapper can be removed completely.
CUFVKLLAL54OHDMYUHVJZK46LLX7RJMUJUE5HWYDCGIOQ5TIGXZQC
4FGKYUTNQEW7TSNYVKSAULIXNGKR5DH3CKFOFE57IT5WXGDSOCTQC
7OBWA6AZZ4THWIIJE5HZUPDFZ3Z5XKE6BSQ3I623PJVN6ZTKIAYQC
B7KDPCRL4JYJKTZMVADYPTWIXNYARECEQGVP3EYLHADUK62CU3CQC
B3UW2ZRBXXRT4CVGLNPQJG63PQNTEY47N2C3WS56U6SDMIZKJ7HAC
JQQYF4S3QIDRZMONBYMSUOHLZWK5T6FB6TG73ZK56W73VVDC5FPAC
6HWIUOSURE7QRA7AUY2Y6CSNWYV36CAXCZ6I6QU24U7GBZ3ODD5AC
HHWCS3QQCJPWMHOBYZMIL3TCHH66NOHTS4I3XM3ZIPD62Z75XQAAC
4SFOPTHWIN7OM47ENRUGU45DN6CF5MRTUONOD3YGZAQLZDOJT4QAC
PCKLFRT5IZVLG47GQQ23GBSROKUR4CUEZW4PRVGREHNDFTCZ7VBAC
BKOIYITRBRVU4D7XFAZPV5QHAPCBMIO3SBNHYJ6TVT43WR32CTHQC
ZWCTAZGLJZQNTYWTC2XQUKMILJF6JGDL5IND6QNYWK4FIGMLRFXAC
NEWDDAOFCDLYBXQCZNQ2GDH7HPAHVN3YRDL52ZYEMVA4YH6LBDXAC
LZO3C2KIACZ3HN72RBGWWIT5ED4RJMYKI3SAHXT6RIUPHDFL3STQC
LBNVQXUBEZ45SOTGVXK5UEZXIAIZTJLWZNUYFI4JZ6J65N3KPDVQC
36TOESVE7VTGO3GHASDYRDSAUFUP6LAQMAWB7237L3G3OVZARSOQC
PMNWRTGJ4GVSMSSAWSUD57B26PCRAHMZIQ5SIWJIK7A74ENKEQLAC
LZVO64YG43JD7YMZSCTZNOBS5ROZA4FMPKJW2YOMH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7OBEE3YVBUNUFAC
UOINKJ2JBCRTZPFTAXDPRJOEUWWPJ43IGVWLRIRLIGHLBMWDOGDQC
VHV6GI4L2GEV2PV3AEV4C22O3JB4XUS6WPEBFINYD5CJOBMAESAAC
J5ITV54PZKTD3RKFB6XETFNSAJS6NRMGXNRTUYU6ASHE3EBJKENAC
Q5HZWFCYP7E7CZB24WXHZP43M334SFL4GIZLOIAQS2OOVV4RR2WQC
XHOZT4WTBN3Y7Q2MBANFS65X4HYL6SGPA7JNB7T7OD726SU2ACWAC
VU2OLHD246DFWL2WPFSKWPLXTN3WRL25TSRU4PJMJBNWDF35OFRAC
N22GPKYTOLZLBGTGDATQDVZ4R5APZEAOIA7L32X4UXBH4XNI7MWAC
H7CNGK4OJNRYZQGPLBGR72DULLEPFQ5UISF5J24D7IMA7SYW5LGQC
SS4TZXNUWXSEJC3XYHGVS3IBZ2D7GPIPELODVQOHRRGYADI2L72AC
NS7SND6RF6X3CVSVP7MLAQQZFA64E63YKFFABPEAGEPHX6PNWBOQC
5SHCWE7XPQORSOLY7HGAIK2ODKBFPY4KVXRL2W7X6D4WALU544HQC
RXVJFQ5AV3WME4HDVBPSRCALQTXROT4KQPOQVO6KTWTBNZIZZGPAC
S5PV6IIMKJ7PGWIFLLXERHYF3BCP2UEGFRZEZLD6UUBLVEZXJLUAC
WQXF2T3DFC2K72OVX46TUQ4IMZNJ5BSBQ7L7AVI7QL54DXCBEKLQC
NI5BVF2VLMDA7REXTV455SUCQAYMKPKNKQSRII2SJJGG2TCX4CTAC
}
# Awful hack to handle timeouts in SQLite: just retry the transaction.
# DBD::SQLite *has* a 30 second retry window, but apparently it
# doesn't work.
sub txn_do {
my ($db, $coderef) = @_;
my $res;
while (1) {
eval {
$res = $db->txn_do($coderef);
};
return $res if !$@;
die $@ unless $@ =~ "database is locked";
}