зеркало из https://github.com/github/vitess-gh.git
Submitting changes that were already made internally.
This commit is contained in:
Родитель
c7fb1dcb3c
Коммит
51be389106
|
@ -392,6 +392,6 @@ func checkEcho(t *testing.T, name string, qr *mproto.QueryResult, err error, wan
|
|||
t.Errorf("MySQL NULL value wasn't preserved")
|
||||
}
|
||||
if !got["emptyString"].IsString() || got["emptyString"].String() != "" {
|
||||
t.Errorf("Empty string value wasn't preserved")
|
||||
t.Errorf("Empty string value wasn't preserved: %#v", got)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ func echoQueryResult(vals map[string]interface{}) *mproto.QueryResult {
|
|||
qr.Fields = append(qr.Fields, mproto.Field{Name: "null", Type: mproto.VT_VAR_STRING})
|
||||
row = append(row, sqltypes.NULL)
|
||||
qr.Fields = append(qr.Fields, mproto.Field{Name: "emptyString", Type: mproto.VT_VAR_STRING})
|
||||
row = append(row, sqltypes.MakeString(nil))
|
||||
row = append(row, sqltypes.MakeString([]byte("")))
|
||||
|
||||
for k, v := range vals {
|
||||
qr.Fields = append(qr.Fields, mproto.Field{Name: k, Type: mproto.VT_VAR_STRING})
|
||||
|
|
|
@ -65,7 +65,7 @@ func IsBinary(t query.Type) bool {
|
|||
// Vitess data types. These are idiomatically
|
||||
// named synonyms for the query.Type values.
|
||||
const (
|
||||
Null = query.Type_NULL
|
||||
Null = query.Type_NULL_TYPE
|
||||
Int8 = query.Type_INT8
|
||||
Uint8 = query.Type_UINT8
|
||||
Int16 = query.Type_INT16
|
||||
|
|
|
@ -92,8 +92,8 @@ func (x Flag) String() string {
|
|||
type Type int32
|
||||
|
||||
const (
|
||||
// NULL specifies a NULL type.
|
||||
Type_NULL Type = 0
|
||||
// NULL_TYPE specifies a NULL type.
|
||||
Type_NULL_TYPE Type = 0
|
||||
// INT8 specifies a TINYINT type.
|
||||
// Properties: 1, IsNumber.
|
||||
Type_INT8 Type = 257
|
||||
|
@ -183,7 +183,7 @@ const (
|
|||
)
|
||||
|
||||
var Type_name = map[int32]string{
|
||||
0: "NULL",
|
||||
0: "NULL_TYPE",
|
||||
257: "INT8",
|
||||
770: "UINT8",
|
||||
259: "INT16",
|
||||
|
@ -214,7 +214,7 @@ var Type_name = map[int32]string{
|
|||
28: "TUPLE",
|
||||
}
|
||||
var Type_value = map[string]int32{
|
||||
"NULL": 0,
|
||||
"NULL_TYPE": 0,
|
||||
"INT8": 257,
|
||||
"UINT8": 770,
|
||||
"INT16": 259,
|
||||
|
|
|
@ -182,7 +182,7 @@ public class Proto {
|
|||
|
||||
TypedValue(Object value) {
|
||||
if (value == null) {
|
||||
this.type = Query.Type.NULL;
|
||||
this.type = Query.Type.NULL_TYPE;
|
||||
} else if (value instanceof String) {
|
||||
// String
|
||||
this.type = Query.Type.VARCHAR;
|
||||
|
|
|
@ -180,7 +180,7 @@ public class Row {
|
|||
return Float.valueOf(value.toStringUtf8());
|
||||
case FLOAT64:
|
||||
return Double.valueOf(value.toStringUtf8());
|
||||
case NULL:
|
||||
case NULL_TYPE:
|
||||
return null;
|
||||
case DATE:
|
||||
return DateTime.parse(value.toStringUtf8(), ISODateTimeFormat.date());
|
||||
|
|
|
@ -262,7 +262,7 @@ public class CursorTest {
|
|||
try (
|
||||
Cursor cursor = new SimpleCursor(
|
||||
QueryResult.newBuilder()
|
||||
.addFields(Field.newBuilder().setName("col0").setType(Query.Type.NULL).build())
|
||||
.addFields(Field.newBuilder().setName("col0").setType(Query.Type.NULL_TYPE).build())
|
||||
.addRows(
|
||||
Query.Row.newBuilder()
|
||||
.addLengths("1234".length())
|
||||
|
|
|
@ -44,8 +44,8 @@ enum Flag {
|
|||
// Type defines the various supported data types in bind vars
|
||||
// and query results.
|
||||
enum Type {
|
||||
// NULL specifies a NULL type.
|
||||
NULL = 0;
|
||||
// NULL_TYPE specifies a NULL type.
|
||||
NULL_TYPE = 0;
|
||||
// INT8 specifies a TINYINT type.
|
||||
// Properties: 1, IsNumber.
|
||||
INT8 = 257;
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Загрузка…
Ссылка в новой задаче