diff --git a/go/mysql/binlog/binlog_json.go b/go/mysql/binlog/binlog_json.go index 2a096728724..5a32365fcc9 100644 --- a/go/mysql/binlog/binlog_json.go +++ b/go/mysql/binlog/binlog_json.go @@ -19,7 +19,6 @@ package binlog import ( "bytes" "encoding/binary" - "encoding/hex" "fmt" "math" "strconv" @@ -28,7 +27,6 @@ import ( "vitess.io/vitess/go/mysql/format" "vitess.io/vitess/go/mysql/json" "vitess.io/vitess/go/sqltypes" - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/vterrors" querypb "vitess.io/vitess/go/vt/proto/query" @@ -76,7 +74,6 @@ func ParseBinaryJSON(data []byte) (*json.Value, error) { // ParseBinaryJSONDiff provides the parsing function from the MySQL JSON // diff representation to an SQL expression. func ParseBinaryJSONDiff(data []byte) (sqltypes.Value, error) { - log.Errorf("DEBUG: json diff data hex: %s, string: %s", hex.EncodeToString(data), string(data)) pos := 0 opType := jsonDiffOp(data[pos]) pos++ @@ -92,19 +89,14 @@ func ParseBinaryJSONDiff(data []byte) (sqltypes.Value, error) { } diff.WriteString("%s, ") // This will later be replaced by the field name - log.Errorf("DEBUG: json diff opType: %d", opType) - pathLen, readTo, ok := readLenEncInt(data, pos) if !ok { return sqltypes.Value{}, fmt.Errorf("cannot read JSON diff path length") } pos = readTo - log.Errorf("DEBUG: json diff path length: %d", pathLen) - path := data[pos : uint64(pos)+pathLen] pos += int(pathLen) - log.Errorf("DEBUG: json diff path: %s", string(path)) // We have to specify the unicode character set for the strings we // use in the expression as the connection can be using a different // character set (e.g. vreplication always uses set names binary). @@ -120,13 +112,11 @@ func ParseBinaryJSONDiff(data []byte) (sqltypes.Value, error) { return sqltypes.Value{}, fmt.Errorf("cannot read JSON diff path length") } pos = readTo - log.Errorf("DEBUG: json diff value length: %d", valueLen) value, err := ParseBinaryJSON(data[pos : uint64(pos)+valueLen]) if err != nil { return sqltypes.Value{}, fmt.Errorf("cannot read JSON diff value for path %s: %w", path, err) } - log.Errorf("DEBUG: json diff value: %v", value) if value.Type() == json.TypeString { diff.WriteString("_utf8mb4") } diff --git a/go/mysql/binlog/rbr.go b/go/mysql/binlog/rbr.go index ef1e5fdd439..42494b0a346 100644 --- a/go/mysql/binlog/rbr.go +++ b/go/mysql/binlog/rbr.go @@ -26,7 +26,6 @@ import ( "time" "vitess.io/vitess/go/sqltypes" - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/vterrors" querypb "vitess.io/vitess/go/vt/proto/query" @@ -682,12 +681,10 @@ func CellValue(data []byte, pos int, typ byte, metadata uint16, field *querypb.F if typ == TypeJSON { jsonData := data[pos : pos+l] if partialJSON { - log.Errorf("DEBUG: partialJSON cell value: %s", string(jsonData)) val, err := ParseBinaryJSONDiff(jsonData) if err != nil { panic(err) } - log.Errorf("DEBUG: decoded partialJSON cell value: %v", val) return val, l + int(metadata), nil } jsonVal, err := ParseBinaryJSON(jsonData) diff --git a/go/mysql/binlog_event_rbr.go b/go/mysql/binlog_event_rbr.go index ea59a2a2247..0e0ad0c458f 100644 --- a/go/mysql/binlog_event_rbr.go +++ b/go/mysql/binlog_event_rbr.go @@ -21,7 +21,6 @@ import ( "vitess.io/vitess/go/mysql/binlog" "vitess.io/vitess/go/mysql/collations" - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/vterrors" querypb "vitess.io/vitess/go/vt/proto/query" @@ -370,15 +369,12 @@ func (ev binlogEvent) Rows(f BinlogFormat, tm *TableMap) (Rows, error) { } if ev.Type() == ePartialUpdateRowsEvent { - log.Errorf("DEBUG: PartialUpdateRowsEvent found with %d JSON columns", numJSONColumns) // The first byte indicates whether or not any JSON values are partial. // If it's 0 then there's nothing else to do. partialJSON := uint8(data[pos]) - log.Errorf("DEBUG: PartialJSON: %d", partialJSON) pos++ if partialJSON == 1 { row.JSONPartialValues, pos = newBitmap(data, pos, numJSONColumns) - log.Errorf("DEBUG: PartialUpdateRowsEvent: JSONPartialValues: %08b", row.JSONPartialValues) } } diff --git a/go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go b/go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go index 037f5777077..bf282e663c2 100644 --- a/go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go +++ b/go/vt/vttablet/tabletmanager/vreplication/replicator_plan.go @@ -31,7 +31,6 @@ import ( "vitess.io/vitess/go/ptr" "vitess.io/vitess/go/sqltypes" "vitess.io/vitess/go/vt/binlog/binlogplayer" - "vitess.io/vitess/go/vt/log" "vitess.io/vitess/go/vt/sqlparser" "vitess.io/vitess/go/vt/vterrors" "vitess.io/vitess/go/vt/vtgate/evalengine" @@ -387,7 +386,6 @@ func (tp *TablePlan) applyChange(rowChange *binlogdatapb.RowChange, executor fun var newVal *sqltypes.Value var err error if field.Type == querypb.Type_JSON { - log.Errorf("DEBUG: vplayer applyChange: field.Type == querypb.Type_JSON, val type: %v, vals[i]: %+v", vals[i].Type(), vals[i].RawStr()) switch { case vals[i].IsNull(): // An SQL NULL and not an actual JSON value newVal = &sqltypes.NULL @@ -404,7 +402,6 @@ func (tp *TablePlan) applyChange(rowChange *binlogdatapb.RowChange, executor fun return nil, err } } - log.Errorf("DEBUG: vplayer applyChange: field.Type == querypb.Type_JSON, newVal: %+v", newVal) bindVar, err = tp.bindFieldVal(field, newVal) jsonIndex++ } else { @@ -596,7 +593,6 @@ func execParsedQuery(pq *sqlparser.ParsedQuery, bindvars map[string]*querypb.Bin if err != nil { return nil, err } - log.Errorf("DEBUG: vplayer execParsedQuery: query: %s", query) return executor(query) } diff --git a/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go b/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go index cbed5e4fcf8..568461aed3d 100644 --- a/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go +++ b/go/vt/vttablet/tabletserver/vstreamer/vstreamer.go @@ -1116,7 +1116,6 @@ func (vs *vstreamer) extractRowAndFilter(plan *streamerPlan, data []byte, dataCo partialJSON := false if jsonPartialValues.Count() > 0 && plan.Table.Fields[colNum].Type == querypb.Type_JSON { partialJSON = jsonPartialValues.Bit(jsonIndex) - log.Errorf("DEBUG: extractRowAndFilter: table: %s, column: %v, partialJSON: %v", plan.Table.Name, plan.Table.Fields[colNum], partialJSON) jsonIndex++ } value, l, err := mysqlbinlog.CellValue(data, pos, plan.TableMap.Types[colNum], plan.TableMap.Metadata[colNum], plan.Table.Fields[colNum], partialJSON) @@ -1125,8 +1124,6 @@ func (vs *vstreamer) extractRowAndFilter(plan *streamerPlan, data []byte, dataCo err, plan.Table.Name, colNum, plan.Table.Fields, values) return false, nil, false, err } - log.Errorf("DEBUG: extractRowAndFilter: table: %s, column: %v, type: %v, value: %v", - plan.Table.Name, plan.Table.Fields[colNum], plan.TableMap.Types[colNum], value) pos += l if !value.IsNull() { // ENUMs and SETs require no special handling if they are NULL