1 // Go MySQL Driver - A MySQL-Driver for Go's database/sql package
3 // Copyright 2013 The Go-MySQL-Driver Authors. All rights reserved.
5 // This Source Code Form is subject to the terms of the Mozilla Public
6 // License, v. 2.0. If a copy of the MPL was not distributed with this file,
7 // You can obtain one at http://mozilla.org/MPL/2.0/.
17 func TestErrorsSetLogger(t *testing.T) {
24 const expected = "prefix: test\n"
25 buffer := bytes.NewBuffer(make([]byte, 0, 64))
26 logger := log.New(buffer, "prefix: ", 0)
33 if actual := buffer.String(); actual != expected {
34 t.Errorf("expected %q, got %q", expected, actual)
38 func TestErrorsStrictIgnoreNotes(t *testing.T) {
39 runTests(t, dsn+"&sql_notes=false", func(dbt *DBTest) {
40 dbt.mustExec("DROP TABLE IF EXISTS does_not_exist")