dimitri / pgloader

Migrate to PostgreSQL in a single command!
http://pgloader.io
Other
5.45k stars 548 forks source link

MySQL's utf8mb3 (formerly utf8) not supported? #1592

Open aspantel opened 4 months ago

aspantel commented 4 months ago

We've recently upgraded Mysql to 8.x and pgloader cant load MySQL data anymore. It seems the MySQL's charset/collation rename from utf8 to utf8mb3 is the issue.

pgloader version "3.6.3~devel" compiled with SBCL 2.1.11.debian

2024-06-30T07:14:21.871987Z ERROR mysql: 255 fell through ECASE expression. Wanted one of (2 3 4 5 6 8 9 10 11 14 15 17 20 21 23 27 28 30 31 32 33 35 41 42 45 46 47 48 49 50 51 52 54 55 56 60 61 62 63 64 65 69 72 77 78 79 82 83 87 90 92 93 94 95 96 97 98 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 254).

aspantel commented 4 months ago

Trying

DECODING TABLE NAMES MATCHING 'oneTable' AS utf8

and that is producing:

KABOOM! FATAL error: The value

(#S(SB-IMPL::EXTERNAL-FORMAT

                :NAMES (:ASCII :US-ASCII :ANSI_X3.4-1968 :ISO-646
                        :ISO-646-US :|646|)
                :DEFAULT-REPLACEMENT-CHARACTER #\?
                :READ-N-CHARS-FUN #<FUNCTION SB-IMPL::FD-STREAM-READ-N-CHARACTERS/ASCII>
                :READ-CHAR-FUN #<FUNCTION SB-IMPL::INPUT-CHAR/ASCII>
                :WRITE-N-BYTES-FUN #<FUNCTION SB-IMPL::OUTPUT-BYTES/ASCII>
                :WRITE-CHAR-NONE-BUFFERED-FUN #<FUNCTION SB-IMPL::OUTPUT-CHAR-ASCII-NONE-BUFFERED>
                :WRITE-CHAR-LINE-BUFFERED-FUN #<FUNCTION SB-IMPL::OUTPUT-CHAR-ASCII-LINE-BUFFERED>
                :WRITE-CHAR-FULL-BUFFERED-FUN #<FUNCTION SB-IMPL::OUTPUT-CHAR-ASCII-FULL-BUFFERED>
                :RESYNC-FUN #<FUNCTION SB-IMPL::RESYNC/ASCII>
                :BYTES-FOR-CHAR-FUN #<FUNCTION SB-FASL::FOP-INT-CONST1>
                :READ-C-STRING-FUN #<FUNCTION SB-IMPL::READ-FROM-C-STRING/ASCII>
                :WRITE-C-STRING-FUN #<FUNCTION SB-IMPL::OUTPUT-TO-C-STRING/ASCII>
                :OCTETS-TO-STRING-FUN #<FUNCTION (LAMBDA (&REST REST)
                                                   :IN
                                                   "SYS:SRC;CODE;EXTERNAL-FORMATS;ENC-BASIC.LISP") {53DF50AB}>
                :STRING-TO-OCTETS-FUN #<FUNCTION (LAMBDA (&REST REST)
                                                   :IN
                                                   "SYS:SRC;CODE;EXTERNAL-FORMATS;ENC-BASIC.LISP") {53DF51AB}>)
                                                   ...

                                                    is not of type
           HASH-TABLE
aspantel commented 4 months ago

@dimitri would it be easy for you to make pgloader aware of the 'utf8mb3' charset in MySql 8.x? Thank you

aspantel commented 3 months ago

Are there any plans to make pgloader work for MySql 8.x migrations? Thanks