Any time "Use source text" option is applied, first save fails with DBQueryError. Translating to English is a good way to test, as machine translation providers are disabled. In the following example, article from German Wikipedia is used, but the bug is reproducible with any combination when "Use source text" is chosen.
While translating [[https://de.wikipedia.org/wiki/Burg_Ziesar|de:Burg_Ziesar]] to English, in production, translate infobox and a leading paragraph. Press Ctrl+S or wait for save to see save failure with server response:
```lang=json
{
"error": {
"code": "internal_api_error_DBQueryError",
"info": "[W9cIwQpAAE4AAIYf9ZgAAAAN] Caught exception of type Wikimedia\\Rdbms\\DBQueryError"
},
"servedby": "mw1283"
}
```
Next attempt at saving, after one minute, succeeds. If you go back to the dashboard, delete saved draft and try reproducing with the same article one more time, saving succeeds right away, the first time.
I have found that all pages which use [[https://commons.wikimedia.org/wiki/File:Brandenburg_relief_location_map.jpg|this image]] on German Wikipedia are susceptible to this bug. That list of articles can be used when verifying this bug, because everything works after draft is deleted.
Testing in localhost with de:Burg_Ziesar, gives trace:
```lang=json
{
"error": {
"code": "internal_api_error_DBQueryError",
"info": "[f8c06885368639a7d077938d] Exception caught: A database query error has occurred. This may indicate a bug in the software.",
"*": "Wikimedia\\Rdbms\\DBQueryError at core\\includes\\libs\rdbms\\database\\Database.php(1506)\n#0
core\\includes\\libs\rdbms\\database\\Database.php(1476): Wikimedia\\Rdbms\\Database->makeQueryException(string, integer, string, string)\n#1
core\\includes\\libs\rdbms\\database\\Database.php(1236): Wikimedia\\Rdbms\\Database->reportQueryError(string, integer, string, string, boolean)\n#2
core\\includes\\libs\rdbms\\database\\Database.php(2078): Wikimedia\\Rdbms\\Database->query(string, string)\n#3
core\\extensions\\ContentTranslation\\includes\\TranslationStorageManager.php(64): Wikimedia\\Rdbms\\Database->insert(string, array, string)\n#4
core\\extensions\\ContentTranslation\\includes\\TranslationStorageManager.php(151): ContentTranslation\\TranslationStorageManager::create(Wikimedia\\Rdbms\\DatabaseMysqli, ContentTranslation\\TranslationUnit)\n#5
core\\includes\\libs\rdbms\\database\\Database.php(3815): ContentTranslation\\TranslationStorageManager::ContentTranslation\\{closure}(Wikimedia\\Rdbms\\DatabaseMysqli, string)\n#6
core\\includes\\libs\rdbms\\database\\DBConnRef.php(49): Wikimedia\\Rdbms\\Database->doAtomicSection(string, Closure)\n#7
core\\includes\\libs\rdbms\\database\\DBConnRef.php(538): Wikimedia\\Rdbms\\DBConnRef->__call(string, array)\n#8
core\\extensions\\ContentTranslation\\includes\\TranslationStorageManager.php(153): Wikimedia\\Rdbms\\DBConnRef->doAtomicSection(string, Closure)\n#9
core\\extensions\\ContentTranslation\\api\\ApiContentTranslationSave.php(225): ContentTranslation\\TranslationStorageManager::save(ContentTranslation\\TranslationUnit, boolean)\n#10
core\\extensions\\ContentTranslation\\api\\ApiContentTranslationSave.php(72): ApiContentTranslationSave->saveTranslationUnits(array, ContentTranslation\\Translation)\n#11
core\\includes\\api\\ApiMain.php(1570): ApiContentTranslationSave->execute()\n#12
core\\includes\\api\\ApiMain.php(531): ApiMain->executeAction()\n#13
core\\includes\\api\\ApiMain.php(502): ApiMain->executeActionWithErrorHandling()\n#14
core\\api.php(87): ApiMain->execute()\n#15 {main}"
}
}
```