Skip to content

Commit

Permalink
Merge pull request #292 from brokercap/v2.3
Browse files Browse the repository at this point in the history
V2.3
  • Loading branch information
jc3wish authored Nov 5, 2024
2 parents fe9297c + e8dabf2 commit 37b5887
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 3 deletions.
7 changes: 5 additions & 2 deletions Bristol/mysql/packets.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,10 +810,13 @@ func (mc *mysqlConn) readBinaryRows(rc *rowsContent) (e error) {
b := int8(byteToUint8(data[pos]))
//length == 1 是 tinyint(1) bool值
if rc.columns[i].length == 1 {
if b == 1 {
switch b {
case 1:
row[i] = true
} else {
case 0:
row[i] = false
default:
row[i] = b
}
} else {
row[i] = b
Expand Down
5 changes: 5 additions & 0 deletions Bristol/mysql/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,11 @@ func (parser *eventParser) GetTableSchemaByName(tableId uint64, database string,
CHARACTER_OCTET_LENGTH = uint64(dest[9].(uint32))
case uint64:
CHARACTER_OCTET_LENGTH = dest[9].(uint64)
case int64:
CHARACTER_OCTET_LENGTH = uint64(dest[9].(int64))
case int32:
CHARACTER_OCTET_LENGTH = uint64(dest[9].(int32))

default:
CHARACTER_OCTET_LENGTH = 0
}
Expand Down
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v2.3.8-beta 2024-11-05
1. fix mysql select tinyint(1) , value > 1 , transfer to bool ,result false bug

v2.3.7-beta 2024-10-16
1. output kakfa tableMap add binlog_timestamp field
2. CHARACTER_OCTET_LENGTH add support for int64 and int32 in mysql parser

v2.3.6-beta 2024-04-21
1. input varchar(255) to output starrocks varchar(765)

Expand Down
2 changes: 1 addition & 1 deletion config/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ limitations under the License.

package config

const VERSION = "v2.3.6-beta"
const VERSION = "v2.3.8-beta"
1 change: 1 addition & 0 deletions plugin/driver/table_map_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func (c *PluginDataType) ToTableMapObject() (data map[string]interface{}, err er
} else {
data["bifrost_query"] = c.Query
}
data["binlog_timestamp"] = fmt.Sprint(c.Timestamp)
data["binlog_event_type"] = c.EventType
data["bifrost_pri"] = strings.Join(c.Pri, ",")
data["bifrost_database"] = c.SchemaName
Expand Down

0 comments on commit 37b5887

Please sign in to comment.