8000 Show warnings by default in `dolt sql` · Issue #8875 · dolthub/dolt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Show warnings by default in dolt sql #8875

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

Open
macneale4 opened this issue Feb 20, 2025 · 0 comments
Open

Show warnings by default in dolt sql #8875

macneale4 opened this issue Feb 20, 2025 · 0 comments
Assignees
Labels
cli enhancement New feature or request good first issue Good for newcomers

Comments

@macneale4
Copy link
Contributor
macne 9887 ale4 commented Feb 20, 2025

The mysql client has the \W operation to enable showing warnings by default. dolt sql doesn't support that. There is also the > SET SQL_WARNINGS = 1; approach which dolt sql doesn't support either.

We want to enable show warnings by default. This deviates from mysql client a little, but it's the right thing to do.

Generate a warning for testing with the explain warning: EXPLAIN SELECT * FROM T

db/main> create table t (i int primary key);
db/main*> \commit -A -m "asdf";
db/main> EXPLAIN SELECT * FROM T ;
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+-------+
| id | select_type | table | partitions | type | possible_keys | key  | key_len | ref  | rows | filtered | Extra |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+-------+
| 1  | SELECT      | NULL  | NULL       | NULL | NULL          | NULL | NULL    | NULL | NULL | NULL     |       |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+-------+
1 row in set (0.00 sec)

db/main> show warnings;
+---------+------+------------------------------------------------------------------------------+
| Level   | Code | Message                                                                      |
+---------+------+------------------------------------------------------------------------------+
| Warning | 0    | EXPLAIN Output is currently a placeholder; use EXPLAIN PLAN for old behavior |
+---------+------+------------------------------------------------------------------------------+
1 row in set (0.00 sec)
@macneale4 macneale4 self-assigned this Feb 20, 2025
@timsehn timsehn added enhancement New feature or request cli labels Mar 5, 2025
@macneale4 macneale4 added the good first issue Good for newcomers label Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants
0