mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-04 04:28:08 +00:00 
			
		
		
		
	Bump deps
This commit is contained in:
		
							
								
								
									
										12
									
								
								vendor/github.com/go-sql-driver/mysql/connection.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								vendor/github.com/go-sql-driver/mysql/connection.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -92,11 +92,21 @@ func (mc *mysqlConn) markBadConn(err error) error {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (mc *mysqlConn) Begin() (driver.Tx, error) {
 | 
			
		||||
	return mc.begin(false)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (mc *mysqlConn) begin(readOnly bool) (driver.Tx, error) {
 | 
			
		||||
	if mc.closed.IsSet() {
 | 
			
		||||
		errLog.Print(ErrInvalidConn)
 | 
			
		||||
		return nil, driver.ErrBadConn
 | 
			
		||||
	}
 | 
			
		||||
	err := mc.exec("START TRANSACTION")
 | 
			
		||||
	var q string
 | 
			
		||||
	if readOnly {
 | 
			
		||||
		q = "START TRANSACTION READ ONLY"
 | 
			
		||||
	} else {
 | 
			
		||||
		q = "START TRANSACTION"
 | 
			
		||||
	}
 | 
			
		||||
	err := mc.exec(q)
 | 
			
		||||
	if err == nil {
 | 
			
		||||
		return &mysqlTx{mc}, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										9
									
								
								vendor/github.com/go-sql-driver/mysql/connection_go18.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								vendor/github.com/go-sql-driver/mysql/connection_go18.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -14,7 +14,6 @@ import (
 | 
			
		||||
	"context"
 | 
			
		||||
	"database/sql"
 | 
			
		||||
	"database/sql/driver"
 | 
			
		||||
	"errors"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Ping implements driver.Pinger interface
 | 
			
		||||
@@ -41,15 +40,9 @@ func (mc *mysqlConn) Ping(ctx context.Context) error {
 | 
			
		||||
 | 
			
		||||
// BeginTx implements driver.ConnBeginTx interface
 | 
			
		||||
func (mc *mysqlConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error) {
 | 
			
		||||
	if opts.ReadOnly {
 | 
			
		||||
		// TODO: support read-only transactions
 | 
			
		||||
		return nil, errors.New("mysql: read-only transactions not supported")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if err := mc.watchCancel(ctx); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	defer mc.finish()
 | 
			
		||||
 | 
			
		||||
	if sql.IsolationLevel(opts.Isolation) != sql.LevelDefault {
 | 
			
		||||
@@ -63,7 +56,7 @@ func (mc *mysqlConn) BeginTx(ctx context.Context, opts driver.TxOptions) (driver
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return mc.Begin()
 | 
			
		||||
	return mc.begin(opts.ReadOnly)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (mc *mysqlConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user