Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL error: 76 fell through ECASE expression. #1211

Closed
7 tasks
mdegoys opened this issue Sep 23, 2020 · 11 comments
Closed
7 tasks

FATAL error: 76 fell through ECASE expression. #1211

mdegoys opened this issue Sep 23, 2020 · 11 comments

Comments

@mdegoys
Copy link

mdegoys commented Sep 23, 2020

I tried this a few months ago and i didn't have this issue (on a different computer though).
Many thanks for your help :).

  • pgloader --version
pgloader version "3.6.1"
compiled with SBCL 1.4.15.debian
  • did you test a fresh compile from the source tree?

yes

  • did you search for other similar issues?

yes

  • how can I reproduce the bug?
LOAD DATABASE                                                                                                                                                     
	FROM mysql://app_20aubac:password@localhost/20aubacfr_migration
	INTO postgresql://app_20aubac:password@localhost/app_20aubac_migration;
  • pgloader output you obtain
KABOOM!
FATAL error: 76 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).
  • data that is being loaded, if relevant
[20aubac_migration_sample.txt](https://github.com/dimitri/pgloader/files/5268412/20aubac_migration_sample.txt)
  • How the data is different from what you expected, if relevant
@mdegoys
Copy link
Author

mdegoys commented Oct 8, 2020

Ok my bad, I tested again using the source build 3.6.2, and now it's working. I guess it's because of postgres 12, as I was also having an error using csv upload, causing this time an error 42703: column "adsrc" does not exist error.

@FridiNaTor1
Copy link

I am having this issue now. First time using this program, And I have the newest version from the repository..

@dennmat-hurdle
Copy link

Just a comment for anyone landing here. Apt got me 3.6.1 and for postgres 12 I was getting this error. By building the source which is currently 3.6.3 this error was gone and it worked.

@drewbroadley
Copy link

drewbroadley commented Feb 17, 2022

APT got me 3.6.3~devel and I am having this issue"

root@cb7de771f065:/# pgloader mysql://root:mysql@mysql:3306/members_civicrm postgres://postgres@localhost/membership_civicrm
2022-02-17T00:57:22.014000Z LOG pgloader version "3.6.3~devel"
2022-02-17T00:57:22.046000Z LOG Migrating from #<MYSQL-CONNECTION mysql://root@mysql:3306/members_civicrm {1007A90333}>
2022-02-17T00:57:22.046000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://postgres@localhost:5432/membership_civicrm {1007C10A53}>
2022-02-17T00:57:22.480000Z ERROR mysql: 76 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).
2022-02-17T00:57:22.481000Z LOG report summary reset
       table name     errors       rows      bytes      total time
-----------------  ---------  ---------  ---------  --------------
  fetch meta data          0          0                     0.000s
-----------------  ---------  ---------  ---------  --------------
-----------------  ---------  ---------  ---------  --------------

@drewbroadley
Copy link

DEBUG version:

root@cb7de771f065:/# pgloader --verbose --debug mysql://root:mysql@mysql:3306/members_civicrm postgres://postgres@localhost/membership_civicrm 
pgloader version 3.6.3~devel
compiled with SBCL 2.1.1.debian
sb-impl::*default-external-format* :UTF-8
tmpdir: #P"/tmp/pgloader/"
2022-02-17T01:02:36.013000Z NOTICE Starting pgloader, log system is ready.
2022-02-17T01:02:36.021000Z INFO Starting monitor
2022-02-17T01:02:36.026000Z LOG pgloader version "3.6.3~devel"
2022-02-17T01:02:36.026000Z INFO     SOURCE: "mysql://root:mysql@mysql:3306/members_civicrm"
2022-02-17T01:02:36.026000Z INFO SOURCE URI: #<PGLOADER.SOURCE.MYSQL:MYSQL-CONNECTION mysql://root@mysql:3306/members_civicrm {1007AA4863}>
2022-02-17T01:02:36.026000Z INFO     TARGET: "postgres://postgres@localhost/membership_civicrm"
2022-02-17T01:02:36.026000Z INFO TARGET URI: #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@localhost:5432/membership_civicrm {1007C11E93}>
2022-02-17T01:02:36.026000Z DEBUG LOAD DATA FROM #<PGLOADER.SOURCE.MYSQL:MYSQL-CONNECTION mysql://root@mysql:3306/members_civicrm {1007AA4863}>
2022-02-17T01:02:36.062000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@localhost:5432/membership_civicrm {1007C11E93}>
2022-02-17T01:02:36.062000Z DEBUG SET client_encoding TO 'utf8'
2022-02-17T01:02:36.063000Z DEBUG SET application_name TO 'pgloader'
2022-02-17T01:02:36.076000Z LOG Migrating from #<MYSQL-CONNECTION mysql://root@mysql:3306/members_civicrm {1007AA4863}>
2022-02-17T01:02:36.076000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://postgres@localhost:5432/membership_civicrm {1007C11E93}>
2022-02-17T01:02:36.132000Z DEBUG CONNECTED TO #<MYSQL-CONNECTION mysql://root@mysql:3306/members_civicrm {1007AA4863}>
2022-02-17T01:02:36.142000Z SQL MySQL: sending query: -- params: db-name
--         table-type-name
--         only-tables
--         only-tables
--         including
--         filter-list-to-where-clause incuding
--         excluding
--         filter-list-to-where-clause excluding
  select c.table_name, t.table_comment,
         c.column_name, c.column_comment,
         c.data_type, c.column_type, c.column_default,
         c.is_nullable, c.extra
    from information_schema.columns c
         join information_schema.tables t using(table_schema, table_name)
   where c.table_schema = 'members_civicrm' and t.table_type = 'BASE TABLE'
         
         
order by table_name, ordinal_position;
2022-02-17T01:02:36.285001Z ERROR mysql: 76 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).
2022-02-17T01:02:36.285001Z LOG report summary reset
       table name     errors       read   imported      bytes      total time       read      write
-----------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
  fetch meta data          0          0          0                     0.000s    
-----------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
-----------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
2022-02-17T01:02:36.333001Z INFO Stopping monitor

@drewbroadley
Copy link

Weirdly enough, I built from source, same version of 3.6.3~devel but it's working this time. Same param's, same data source and same destination.

@gcaragea
Copy link

Same issue here with pgloader 3.6.7:

# pgloader --verbose --debug mysql://${MYSQL_CONFIG_DB_USER}:${MYSQL_CONFIG_DB_PASSWORD}@${MYSQL_CONFIG_DB_HOST}:3306/alerts postgresql://postgres:<MASKED>@localhost:5432/alerts_tst
pgloader version 3.6.7~devel
compiled with SBCL 2.1.1.debian
sb-impl::*default-external-format* :UTF-8
tmpdir: #P"/tmp/pgloader/"
2022-09-09T23:55:52.008000Z NOTICE Starting pgloader, log system is ready.
2022-09-09T23:55:52.016000Z INFO Starting monitor
2022-09-09T23:55:52.016000Z LOG pgloader version "3.6.7~devel"
2022-09-09T23:55:52.016000Z INFO     SOURCE: "mysql://<MASKED>@<MASKED>:3306/alerts"
2022-09-09T23:55:52.016000Z INFO SOURCE URI: #<PGLOADER.SOURCE.MYSQL:MYSQL-CONNECTION mysql://<MASKED>:3306/alerts {1005942323}>
2022-09-09T23:55:52.016000Z INFO     TARGET: "postgresql://<MASKED>@localhost:5432/alerts_tst"
2022-09-09T23:55:52.016000Z INFO TARGET URI: #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@localhost:5432/alerts_tst {1005A9EE93}>
2022-09-09T23:55:52.016000Z DEBUG LOAD DATA FROM #<PGLOADER.SOURCE.MYSQL:MYSQL-CONNECTION mysql://<MASKED>:3306/alerts {1005942323}>
2022-09-09T23:55:52.036000Z DEBUG CONNECTED TO #<PGLOADER.PGSQL:PGSQL-CONNECTION pgsql://postgres@localhost:5432/alerts_tst {1005A9EE93}>
2022-09-09T23:55:52.036000Z DEBUG SET client_encoding TO 'utf8'
2022-09-09T23:55:52.036000Z DEBUG SET application_name TO 'pgloader'
2022-09-09T23:55:52.044000Z LOG Migrating from #<MYSQL-CONNECTION mysql://<MASKED>:3306/alerts {1005942323}>
2022-09-09T23:55:52.044000Z LOG Migrating into #<PGSQL-CONNECTION pgsql://postgres@localhost:5432/alerts_tst {1005A9EE93}>
2022-09-09T23:55:52.080000Z DEBUG CONNECTED TO #<MYSQL-CONNECTION mysql://<MASKED>:3306/alerts {1005942323}>
2022-09-09T23:55:52.084000Z SQL MySQL: sending query: -- params: db-name
--         table-type-name
--         only-tables
--         only-tables
--         including
--         filter-list-to-where-clause incuding
--         excluding
--         filter-list-to-where-clause excluding
  select c.table_name, t.table_comment,
         c.column_name, c.column_comment,
         c.data_type, c.column_type, c.column_default,
         c.is_nullable, c.extra
    from information_schema.columns c
         join information_schema.tables t using(table_schema, table_name)
   where c.table_schema = 'alerts' and t.table_type = 'BASE TABLE'


order by table_name, ordinal_position;
2022-09-09T23:55:52.092000Z ERROR mysql: 76 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).
2022-09-09T23:55:52.092000Z LOG report summary reset
       table name     errors       read   imported      bytes      total time       read      write
-----------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
  fetch meta data          0          0          0                     0.000s
-----------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
-----------------  ---------  ---------  ---------  ---------  --------------  ---------  ---------
2022-09-09T23:55:52.120000Z INFO Stopping monitor

This is with Aurora mysql8 in AWS.

@bauerstefan
Copy link

bauerstefan commented Oct 25, 2022

Can confirm with 3.6.7~devel on Ubuntu 22 from apt.
Source-DB is mysql Ver 8.0.30-0ubuntu0.20.04.2
Destination DB is Postgresql-14.5-1.

Fix was to build pgloader from sources.

@Hritik14
Copy link

Hritik14 commented Oct 30, 2023

The issue still exists in apt repo, although I was able to use the docker container for latest build.
docker run --rm -it ghcr.io/dimitri/pgloader:latest pgloader

@isacikgoz
Copy link

Having similar error with mysql-8 with version 3.6.7~devel.

...
order by table_name, ordinal_position;
2023-11-21T12:23:29.108001Z ERROR mysql: 76 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).
2023-11-21T12:23:29.108001Z NOTICE Executing SQL block for after load
...

You can check full logs https://github.com/mattermost/mattermost/actions/runs/6943660567/job/18889225761?pr=25465

@bherrmann7
Copy link

I did a local rebuild on ubuntu and the CASE error did not occur when running the local binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants