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

fix example package #1358

Merged
merged 1 commit into from
Nov 1, 2022
Merged

fix example package #1358

merged 1 commit into from
Nov 1, 2022

Conversation

Syuparn
Copy link
Contributor

@Syuparn Syuparn commented Oct 29, 2022

close #1357

This fixes runtime panic raised by example app in /_example.

I checked SQL client can obtain response in my local machine.

~/go-mysql-server/_example$ go build
~/go-mysql-server/_example$ ./_example
$ mysql --host=127.0.0.1 --port=3306 --database=mydb -u root
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.9-Vitess

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select * from mytable;
+----------+-------------------+-------------------------------+---------------------+
| name     | email             | phone_numbers                 | created_at          |
+----------+-------------------+-------------------------------+---------------------+
| Evil Bob | evilbob@gmail.com | ["555-666-555","666-666-666"] | 2018-04-18 09:41:13 |
| Jane Doe | jane@doe.com      | []                            | 2018-04-18 09:41:13 |
| John Doe | john@doe.com      | ["555-555-555"]               | 2018-04-18 09:41:13 |
| John Doe | johnalt@doe.com   | []                            | 2018-04-18 09:41:13 |
+----------+-------------------+-------------------------------+---------------------+
4 rows in set (0.00 sec)

@zachmu zachmu requested a review from Hydrocharged October 31, 2022 23:48
@zachmu
Copy link
Member

zachmu commented Oct 31, 2022

Daylon, can you figure out what the right answer is here for the example script? I'm a little worried that there's too much setup required to get the in-memory server up and running out of the box (things like requiring the root user). There should be sane defaults for these things.

Copy link
Contributor

@Hydrocharged Hydrocharged left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zachmu I'm approving this for now. I've expanded on this greatly, so I'll make another PR. Thank you @Syuparn for bringing this to our attention!

@Hydrocharged Hydrocharged merged commit 093a141 into dolthub:main Nov 1, 2022
@Syuparn Syuparn deleted the fix-example branch November 1, 2022 12:45
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

Successfully merging this pull request may close these issues.

_example/main.go raises panic
3 participants