# Updatefehler 6.4.20 --\> 6.5.1: SQLSTATE\[HY000\]: General error: 1901

**URL:** <https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197>\
**Category:** Shopware 6 (German)\
**Created:** [9. September 2023 um 10:07 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197 "2023-09-09T10:07:42Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![reutli](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@reutli](https://forum.shopware.com/u/reutli)\
**Post date:** [9. September 2023 um 10:07 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/1 "2023-09-09T10:07:42Z")

</div>

Hallo Community,

vielleicht kann jemand helfen. Versuche gerade (zum Glück auf dem Testsystem) von der 6.4.20 auf die 6.5.1 upzudaten.  
Leider bekomme ich Datenbankfehler und habe keine Ahnung wie ich die beheben kann:

```auto
Get collection for identifier: "core"
migrate Migrations
  0/31 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 0% < 1 sec/< 1 sec 119.0 MiB09:48:16 ERROR [app] Migration: "Shopware\Core\Migration\V6_5\Migration1675082889DropUnusedTables" failed: "An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1901 Function or expression 'variant_listing_config' cannot be used in the CHECK clause of `variant_listing_config`"

```

Das Ganze wiederholt sich unten im Log dann noch mehrfach:

```auto
Exception trace:
  at /www/htdocs/w0178bf0/shop_staging/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php:167
 Shopware\Core\Framework\Migration\Command\MigrationCommand->runMigrationForIdentifier() at /www/htdocs/w0178bf0/shop_staging/vendor/shopware/core/Framework/Migration/Command/MigrationCommand.php:102
 Shopware\Core\Framework\Migration\Command\MigrationCommand->execute() at /www/htdocs/w0178bf0/shop_staging/vendor/symfony/console/Command/Command.php:326
 Symfony\Component\Console\Command\Command->run() at /www/htdocs/w0178bf0/shop_staging/vendor/symfony/console/Command/LazyCommand.php:76
 Symfony\Component\Console\Command\LazyCommand->run() at /www/htdocs/w0178bf0/shop_staging/vendor/shopware/core/Maintenance/System/Command/SystemUpdateFinishCommand.php:120
 Shopware\Core\Maintenance\System\Command\SystemUpdateFinishCommand->runMigrations() at /www/htdocs/w0178bf0/shop_staging/vendor/shopware/core/Maintenance/System/Command/SystemUpdateFinishCommand.php:85
 Shopware\Core\Maintenance\System\Command\SystemUpdateFinishCommand->execute() at /www/htdocs/w0178bf0/shop_staging/vendor/symfony/console/Command/Command.php:326
 Symfony\Component\Console\Command\Command->run() at /www/htdocs/w0178bf0/shop_staging/vendor/symfony/console/Application.php:1081
 Symfony\Component\Console\Application->doRunCommand() at /www/htdocs/w0178bf0/shop_staging/vendor/symfony/framework-bundle/Console/Application.php:91
 Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /www/htdocs/w0178bf0/shop_staging/vendor/symfony/console/Application.php:320
 Symfony\Component\Console\Application->doRun() at /www/htdocs/w0178bf0/shop_staging/vendor/symfony/framework-bundle/Console/Application.php:80
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /www/htdocs/w0178bf0/shop_staging/vendor/symfony/console/Application.php:174
 Symfony\Component\Console\Application->run() at /www/htdocs/w0178bf0/shop_staging/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:54
 Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /www/htdocs/w0178bf0/shop_staging/vendor/autoload_runtime.php:29
 require_once() at /www/htdocs/w0178bf0/shop_staging/bin/console:15

In ExceptionConverter.php line 117:
                                                                               
  [Doctrine\DBAL\Exception\DriverException (1901)]                             
  An exception occurred while executing a query: SQLSTATE[HY000]: General err  
  or: 1901 Function or expression 'variant_listing_config' cannot be used in   
  the CHECK clause of `variant_listing_config`                  

```

Irgend etwas scheint mit den Varianten in der DB nicht zu passen  
Damit läuft der Shop dann natürlich nicht mehr:

```auto
An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'tax_rule.active_from' in 'field list'

```

Hat jemand Ideen, wie ich das beheben kann?  
Ansonsten wäre für mich das Update erst mal unmöglich…

HILFE!

Vielen Dank an alle im Voraus!

---

<div class="post-metadata">

**Author:** ![WIDERGANG](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/widergang/32/21768_2.png) [@WIDERGANG](https://forum.shopware.com/u/WIDERGANG)\
**Post date:** [14. September 2023 um 09:39 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/2 "2023-09-14T09:39:09Z")

</div>

Prüf’ mal ob in der .env in Zeile 22 COMPOSER\_HOME nicht ein Pfad zu einer alten URL eingetragen ist. Das war bei einem unserer Projekte die Ursache / Lösung.

---

<div class="post-metadata">

**Author:** ![Teddie](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/teddie/32/26013_2.png) [@Teddie](https://forum.shopware.com/u/Teddie)\
**Post date:** [14. September 2023 um 09:44 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/3 "2023-09-14T09:44:07Z")

</div>

Du benutzt MariaDB, richtig?

---

<div class="post-metadata">

**Author:** ![reutli](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@reutli](https://forum.shopware.com/u/reutli)\
**Post date:** [14. September 2023 um 09:56 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/4 "2023-09-14T09:56:09Z")

</div>

jupp MariaDB. Das war auch der Fehler!  
Habe über den Hoster auf anderen Server mit MariaDB 10.6 umziehen lassen.

Ich habe vergessen hier zu posten - sorry, macht man nicht 🫢

Gibt auch einen anderen post von einem andere TE dazu…

---

<div class="post-metadata">

**Author:** ![Teddie](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/teddie/32/26013_2.png) [@Teddie](https://forum.shopware.com/u/Teddie)\
**Post date:** [14. September 2023 um 09:59 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/5 "2023-09-14T09:59:25Z")

</div>

Sehe jetzt erst, dass du schon am 9.9. geschrieben hast. 😅

Hauptsache es geht wieder. 🙂

---

<div class="post-metadata">

**Author:** ![reutli](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@reutli](https://forum.shopware.com/u/reutli)\
**Post date:** [14. September 2023 um 10:16 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/6 "2023-09-14T10:16:38Z")

</div>

Ja, stimmt.

Für alle die hier drüber gestolpert sind:

Es gibt einen „bug“ in MariaDB 6.x der den Fehler auslöst. Beschrieben auch in diesem Post: [Fehlermeldung Datenbank einspielen aus Datensicherung](https://forum.shopware.com/t/fehlermeldung-datenbank-einspielen-aus-datensicherung/101082)

Nach einem Update (z.B. beim Hoster) auf MariaDB 10.6.10 und höher ist der Fehler behoben.

---

<div class="post-metadata">

**Author:** ![Kai\_Becker](https://avatars.discourse-cdn.com/v4/letter/k/67e7ee/32.png) [@Kai\_Becker](https://forum.shopware.com/u/Kai_Becker)\
**Post date:** [12. März 2024 um 10:28 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/7 "2024-03-12T10:28:02Z")

</div>

Version 6.4.14.0 auf 6.4.20

Guten Morgen zusammen - wir haben jetzt MariaDB 10.11.7 im Einsatz und der Shop läuft immer noch auf diese Fehlermeldung:

Received the following error message:  
An exception occurred while executing ‚ALTER TABLE `product` ADD COLUMN `variant_listing_config` JSON GENERATED ALWAYS AS (CASE WHEN `display_parent` IS NOT NULL OR `main_variant_id` IS NOT NULL OR `configurator_group_config` IS NOT NULL THEN (JSON\_OBJECT( ‚displayParent‘, `display_parent`, ‚mainVariantId‘, LOWER(HEX(`main_variant_id`)) ,‚configuratorGroupConfig‘, JSON\_EXTRACT(`configurator_group_config`, ‚$‘))) END) VIRTUAL‘: SQLSTATE[HY000]: General error: 1901 Function or expression ‚variant\_listing\_config‘ cannot be used in the CHECK clause of `variant_listing_config`

Please try to fix this error and restart the update.  
Response  
{„valid“:false,„errorMsg“:"An exception occurred while executing 'ALTER TABLE `product` ADD COLUMN `variant_listing_config` JSON\n GENERATED ALWAYS AS (CASE WHEN `display_parent` IS NOT NULL OR `main_variant_id` IS NOT NULL OR `configurator_group_config` IS NOT NULL\n

---

<div class="post-metadata">

**Author:** ![MSH](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@MSH](https://forum.shopware.com/u/MSH)\
**Post date:** [13. März 2024 um 18:46 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/8 "2024-03-13T18:46:31Z")

</div>

@ [Kai\_Becker]  
Bei welchen Hoster bist du? Hostingpaket oder Server?

---

<div class="post-metadata">

**Author:** ![paracel](https://avatars.discourse-cdn.com/v4/letter/p/b487fb/32.png) [@paracel](https://forum.shopware.com/u/paracel)\
**Post date:** [15. März 2024 um 10:03 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/9 "2024-03-15T10:03:54Z")

</div>

Für alle die noch auf Version \< 6.5.0.0 festhängen

Wir konnten unseren Shop erst erfolgreich updaten nachdem wir MariaDB fest auf die Version 10.6.10 gesetzt haben.

Unter debian geht das wie folgt:  
sudo add-apt-repository ‚deb [arch=amd64,arm64,ppc64el,s390x] [Index of /mariadb-10.6.10/repo/ubuntu/](http://archive.mariadb.org/mariadb-10.6.10/repo/ubuntu/) focal main main/debug‘

apt install mariadb-client-core-10.6=1:10.6.10+maria~ubu2004 mariadb-client-10.6=1:10.6.10+maria~ubu2004 mariadb-server-10.6=1:10.6.10+maria~ubu2004 mariadb-server-core-10.6=1:10.6.10+maria~ubu2004

Wir sind jetzt auf Shopware 6.5.8.7.

---

<div class="post-metadata">

**Author:** ![creoline](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/creoline/32/15592_2.png) [@creoline](https://forum.shopware.com/u/creoline)\
**Post date:** [15. März 2024 um 16:58 UTC](https://forum.shopware.com/t/updatefehler-6-4-20-6-5-1-sqlstate-hy000-general-error-1901/101197/10 "2024-03-15T16:58:10Z")

</div>

Hallo zusammen,

Shopware stellt für dieses Problem in den Update-Migrationen der Shopware Version 6.5.6.0 eine Lösung bereit.  
([Quelle](https://github.com/shopware/shopware/blob/v6.5.6.0/src/Core/Migration/V6_5/Migration1678197291ConvertVariantListingConfig.php))

Für ältere Shopware-Instanzen kann die Migration von 6.5.6.0 bereits im Vorfeld ausgeführt werden, damit der Fehler bei dem Update auf 6.5 nicht entsteht.

Wir haben hierzu einen Guide in unserem Hilfecenter bereitgestellt:  
[Shopware 6.5 - Function or Expression ‚variant\_listing\_config‘ cannot be used in the CHECK clause](https://help.creoline.com/doc/shopware-65-function-or-expression-variant_listing_config-cannot-be-used-in-the-check-clause-Dgbg2nAJTX)

Ich hoffe, ich konnte damit weiterhelfen. 😊

Liebe Grüße  
Marius

[![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/7/7/7776dd118a9cf33ecbafd2b2e1cda5828898e421.png) ](https://www.creoline.com/?utm_source=shopware_forum_post)
