File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
lib/internal/Magento/Framework/Setup/Declaration/Schema/Db/MySQL Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,15 @@ public function getTableOptions($tableName, $resource)
54
54
{
55
55
$ adapter = $ this ->resourceConnection ->getConnection ($ resource );
56
56
$ dbName = $ this ->resourceConnection ->getSchemaName ($ resource );
57
+ $ collationNameColumn = 'charset_applicability.collation_name ' ;
58
+
59
+ /* In case of mariadb>=11.4 check if column FULL_COLLATION_NAME is exist */
60
+ if ($ adapter ->tableColumnExists ('COLLATION_CHARACTER_SET_APPLICABILITY ' ,
61
+ 'FULL_COLLATION_NAME ' ,
62
+ 'information_schema ' )){
63
+ $ collationNameColumn = 'charset_applicability.full_collation_name ' ;
64
+ }
65
+
57
66
$ stmt = $ adapter ->select ()
58
67
->from (
59
68
['i_tables ' => 'information_schema.TABLES ' ],
@@ -65,7 +74,7 @@ public function getTableOptions($tableName, $resource)
65
74
)
66
75
->joinInner (
67
76
['charset_applicability ' => 'information_schema.COLLATION_CHARACTER_SET_APPLICABILITY ' ],
68
- 'i_tables.table_collation = charset_applicability.collation_name ' ,
77
+ 'i_tables.table_collation = ' . $ collationNameColumn ,
69
78
[
70
79
'charset ' => 'charset_applicability.CHARACTER_SET_NAME '
71
80
]
You can’t perform that action at this time.
0 commit comments