Skip to content
Closed
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
6 changes: 6 additions & 0 deletions enginetest/evaluation.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,12 @@ func injectBindVarsAndPrepare(
skipTypeConv = true
return false, nil
}

// Ensure that the bind variable has the same byte sequence as the original value.
// This is important to ensure that it will get parsed the same way.
// (Example: the value "1e-1" should be parsed as the float 0.1, not as a decimal value.)
bindVar.Value = n.Val

varName := fmt.Sprintf("v%d", bindCnt+1)
bindVars[varName] = bindVar
n.Type = sqlparser.ValArg
Expand Down
5 changes: 5 additions & 0 deletions enginetest/memory_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,11 @@ func TestJsonScripts(t *testing.T) {
enginetest.TestJsonScripts(t, enginetest.NewDefaultMemoryHarness(), skippedTests)
}

func TestJsonScriptsPrepared(t *testing.T) {
var skippedTests []string = nil
enginetest.TestJsonScriptsPrepared(t, enginetest.NewDefaultMemoryHarness(), skippedTests)
}

func TestShowTableStatus(t *testing.T) {
enginetest.TestShowTableStatus(t, enginetest.NewDefaultMemoryHarness())
}
Expand Down