The Wayback Machine - http://web.archive.org/web/20220524074116/https://github.com/dolthub/go-mysql-server/issues/738
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

mysql SERIAL alias unsupported #738

Open

suessflorian opened this issue Jan 16, 2022 · 1 comment
Open

mysql SERIAL alias unsupported #738

suessflorian opened this issue Jan 16, 2022 · 1 comment
Labels
enhancement good first issue

Comments

@suessflorian
Copy link

@suessflorian suessflorian commented Jan 16, 2022

Spinning up an instance;

import (
	"github.com/dolthub/go-mysql-server/auth"
	"github.com/dolthub/go-mysql-server/memory"
	"github.com/dolthub/go-mysql-server/server"
	"github.com/dolthub/go-mysql-server/sql"
	"github.com/dolthub/go-mysql-server/sql/information_schema"
)

func main() {
	engine := sqle.NewDefault(
		sql.NewDatabaseProvider(
			memory.NewDatabase(TEST_DB_MYSQL_DATABASE),
			information_schema.NewInformationSchemaDatabase(),
		),
	)
	s, err := server.NewDefaultServer(server.Config{
		Protocol: "tcp",
		Address:  "127.0.0.1:3306",
		Auth:     auth.NewNativeSingle(TEST_DB_MYSQL_USER, TEST_DB_MYSQL_PASSWORD, auth.AllPermissions),
	}, engine)
	if err != nil {
		panic(err)
	}
	s.Start()
}

Then connecting

mysql> CREATE TABLE gizmos (id serial);
ERROR 1105 (HY000): syntax error at position 31 near 'serial'
mysql> 
@zachmu
Copy link
Member

@zachmu zachmu commented Jan 20, 2022

Thanks for the feature request, @suessflorian

Until we get to this, please use the full type description: BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE

@zachmu zachmu added the enhancement label Jan 20, 2022
@zachmu zachmu added the good first issue label Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement good first issue
Projects
None yet
Development

No branches or pull requests

2 participants