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

bug(sqllogictest): unreacheable code sqllogictest-engines-0.21.0/src/postgres/simple.rs:46:22 #17830

Closed
KeXiangWang opened this issue Jul 27, 2024 · 2 comments
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@KeXiangWang
Copy link
Contributor

KeXiangWang commented Jul 27, 2024

Describe the bug

As titled.

Error message/log

2024-07-27T01:44:17.805588Z  INFO sqllogictest::system_command: system command executed command="psql -c \"\n  DROP TABLE IF EXISTS shipments1;\n  CREATE TABLE shipments1 (\n    shipment_id SERIAL NOT NULL PRIMARY KEY,\n    order_id SERIAL NOT NULL,\n    origin VARCHAR(255) NOT NULL,\n    destination VARCHAR(255) NOT NULL,\n    is_arrived BOOLEAN NOT NULL\n  );\n  ALTER SEQUENCE public.shipments1_shipment_id_seq RESTART WITH 1001;\n  INSERT INTO shipments1\n  VALUES (default,10001,'Beijing','Shanghai',false),\n         (default,10002,'Hangzhou','Shanghai',false),\n         (default,10003,'Shanghai','Hangzhou',false);\n\"" status=ExitStatus(unix_wait_status(0)) stdout="INSERT 0 3\n" stderr="NOTICE:  table \"shipments1\" does not exist, skipping\n"
thread 'main' panicked at /Users/kexiang/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqllogictest-engines-0.21.0/src/postgres/simple.rs:46:22:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[cargo-make] ERROR - Error while executing command, exit code: 101
[cargo-make] WARN - Build Failed.

To Reproduce

Prepare your own postgres and mysql.

In risedev.yml, add following config (update with your own config):

      - use: postgres
        port: 5432
        user-managed: true
        application: "connector"
        database: "mydb"
        password: "postgrespw"
        user: postgresuser
      - use: mysql
        port: 3306
        user-managed: true
        user: root
        password: "123456"
        database: mydb

In src/risedevtool/src/risedev_env.rs,

  • at line 113, add let database = &c.database;
  • at line 118, add writeln!(env, r#"PGDATABASE="{database}""#,).unwrap();

It's fixed in #17829

Start RW:

./risedev d

Run test

./risedev slt e2e_test/source/cdc_inline/alter/cdc_table_alter.slt

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

RW version

dev=> select version();
                       version                        
------------------------------------------------------
 PostgreSQL 13.14.0-RisingWave-1.11.0-alpha (unknown)
(1 row)

the most recent main branch.

> sqllogictest --version
sqllogictest-bin 0.21.0
rustc --version
rustc 1.78.0-nightly (4a0cc881d 2024-03-11)

Additional context

No response

@KeXiangWang KeXiangWang added the type/bug Something isn't working label Jul 27, 2024
@github-actions github-actions bot added this to the release-1.11 milestone Jul 27, 2024
@xxchan
Copy link
Member

xxchan commented Jul 29, 2024

Sorry, I cannot reproduce this on my machine.

Could you please hack sqllogictest and install locally to print more information of the unreachable for debugging?

@xxchan
Copy link
Member

xxchan commented Jul 29, 2024

The problem is because:

So reinstall it will fix the problem now.

cargo binstall sqllogictest-bin --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants