File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,8 +48,15 @@ public function setupDatabase(): void {
4848 $ version = $ row ['Value ' ];
4949 [$ major , ] = explode ('. ' , strtolower ($ version ));
5050 if ((int )$ major >= 9 ) {
51- $ statement = $ connection ->prepare ("INSTALL COMPONENT 'file://component_classic_hashing'; " );
52- $ statement ->executeStatement ();
51+ // check if the component is already loaded, if not load it
52+ $ statement = $ connection ->prepare ("SELECT COUNT(*) FROM mysql.component WHERE component_urn = 'file://component_classic_hashing'; " );
53+ $ result = $ statement ->executeQuery ();
54+ $ count = $ result ->fetchOne ();
55+ if ($ count !== false && (int )$ count === 0 ) {
56+ // not yet loaded
57+ $ statement = $ connection ->prepare ("INSTALL COMPONENT 'file://component_classic_hashing'; " );
58+ $ statement ->executeStatement ();
59+ }
5360 }
5461 }
5562
You can’t perform that action at this time.
0 commit comments