Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[[constraint]]
name = "gopkg.in/src-d/go-mysql-server.v0"
revision = "4a751c09d9fd0d59f790ad8edd28a9799fe669f8"
revision = "8cb8028a413e4edf66c4b57bc3eb570950d7bcfb"

[[constraint]]
name = "github.com/jessevdk/go-flags"
Expand Down
4 changes: 3 additions & 1 deletion cmd/gitbase/command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func NewDatabaseEngine(
squash bool,
) *sqle.Engine {
catalog := sql.NewCatalog()
ab := analyzer.NewBuilder(catalog).WithAuth(userAuth)
ab := analyzer.NewBuilder(catalog)

if parallelism == 0 {
parallelism = runtime.NumCPU()
Expand All @@ -96,6 +96,7 @@ func NewDatabaseEngine(
a := ab.Build()
engine := sqle.New(catalog, a, &sqle.Config{
VersionPostfix: version,
Auth: userAuth,
})

return engine
Expand Down Expand Up @@ -126,6 +127,7 @@ func (c *Server) Execute(args []string) error {
c.userAuth = auth.NewNativeSingle(c.User, c.Password, permissions)
}

c.userAuth = auth.NewAudit(c.userAuth, auth.NewAuditLog(logrus.New()))
if err := c.buildDatabase(); err != nil {
logrus.WithField("error", err).Fatal("unable to initialize database engine")
return err
Expand Down
2 changes: 1 addition & 1 deletion docs/using-gitbase/functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ Also, if you want to retrieve values from a non common property, you can pass it

## Standard functions

You can check standard functions in [`go-mysql-server` documentation](https://github.com/src-d/go-mysql-server/tree/4a751c09d9fd0d59f790ad8edd28a9799fe669f8#custom-functions).
You can check standard functions in [`go-mysql-server` documentation](https://github.com/src-d/go-mysql-server/tree/8cb8028a413e4edf66c4b57bc3eb570950d7bcfb#custom-functions).
2 changes: 1 addition & 1 deletion docs/using-gitbase/indexes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Note that you can create an index either **on one or more columns** or **on a si

You can find some more examples in the [examples](./examples.md#create-an-index-for-columns-on-a-table) section.

See [go-mysql-server](https://github.com/src-d/go-mysql-server/tree/4a751c09d9fd0d59f790ad8edd28a9799fe669f8#indexes) documentation for more details
See [go-mysql-server](https://github.com/src-d/go-mysql-server/tree/8cb8028a413e4edf66c4b57bc3eb570950d7bcfb#indexes) documentation for more details
2 changes: 1 addition & 1 deletion docs/using-gitbase/supported-clients.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Supported clients

To see the supported MySQL clients and examples about how to use them, take a look [here](https://github.com/src-d/go-mysql-server/blob/4a751c09d9fd0d59f790ad8edd28a9799fe669f8/SUPPORTED_CLIENTS.md).
To see the supported MySQL clients and examples about how to use them, take a look [here](https://github.com/src-d/go-mysql-server/blob/8cb8028a413e4edf66c4b57bc3eb570950d7bcfb/SUPPORTED_CLIENTS.md).
2 changes: 1 addition & 1 deletion docs/using-gitbase/supported-syntax.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
## Supported syntax

To see the SQL subset currently supported take a look at [this list](https://github.com/src-d/go-mysql-server/blob/4a751c09d9fd0d59f790ad8edd28a9799fe669f8/SUPPORTED.md) from [src-d/go-mysql-server](https://github.com/src-d/go-mysql-server).
To see the SQL subset currently supported take a look at [this list](https://github.com/src-d/go-mysql-server/blob/8cb8028a413e4edf66c4b57bc3eb570950d7bcfb/SUPPORTED.md) from [src-d/go-mysql-server](https://github.com/src-d/go-mysql-server).
2 changes: 1 addition & 1 deletion session.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func connectToBblfsh(endpoint string) (*bblfsh.Client, error) {
// NewSessionBuilder creates a SessionBuilder with the given Repository Pool.
func NewSessionBuilder(pool *RepositoryPool, opts ...SessionOption) server.SessionBuilder {
return func(c *mysql.Conn, host string) sql.Session {
opts = append(opts, WithBaseSession(sql.NewSession(host, c.User, c.ConnectionID)))
opts = append(opts, WithBaseSession(sql.NewSession(host, c.RemoteAddr().String(), c.User, c.ConnectionID)))
return NewSession(pool, opts...)
}
}
Expand Down
149 changes: 149 additions & 0 deletions vendor/gopkg.in/src-d/go-mysql-server.v0/auth/audit.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/gopkg.in/src-d/go-mysql-server.v0/auth/auth.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion vendor/gopkg.in/src-d/go-mysql-server.v0/auth/native.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions vendor/gopkg.in/src-d/go-mysql-server.v0/auth/none.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion vendor/gopkg.in/src-d/go-mysql-server.v0/engine.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion vendor/gopkg.in/src-d/go-mysql-server.v0/server/context.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions vendor/gopkg.in/src-d/go-mysql-server.v0/server/handler.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading