You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: includes/functions-upgrade.php
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -356,6 +356,10 @@ function yourls_create_tables_for_14() {
356
356
'KEY `shorturl` (`shorturl`)'.
357
357
');';
358
358
359
+
// We execute these DDL queries individually rather than concatenating them
360
+
// into a single multi-statement string. Although looping causes multiple roundtrips,
361
+
// combining DDL queries via PDO prepare() fails when emulated prepares are disabled
362
+
// and silently swallows errors for subsequent statements, corrupting the upgrade process.
359
363
foreach( $queriesas$query ) {
360
364
$ydb->perform( $query ); // There's no result to be returned to check if table was created (except making another query to check table existence, which we'll avoid)
0 commit comments