mirror of
https://github.com/dolthub/dolt.git
synced 2026-02-24 18:38:51 -06:00
Merge pull request #10450 from dolthub/zachmu/table-name-panic
fix panic for empty table names, now a normal error
This commit is contained in:
@@ -472,6 +472,10 @@ func encodeTableNameForSerialization(name TableName) string {
|
||||
// decodeTableNameFromSerialization decodes a table name from a serialized string. See notes on serialization in
|
||||
// |encodeTableNameForSerialization|
|
||||
func decodeTableNameFromSerialization(encodedName string) (TableName, bool) {
|
||||
if len(encodedName) == 0 {
|
||||
return TableName{}, false
|
||||
}
|
||||
|
||||
if encodedName[0] != 0 {
|
||||
return TableName{Name: encodedName}, true
|
||||
} else if len(encodedName) >= 4 { // 2 null bytes plus at least one char for schema and table name
|
||||
|
||||
Reference in New Issue
Block a user