Skip to content

Commit

Permalink
[fix] Fix gh win build
Browse files Browse the repository at this point in the history
  • Loading branch information
reindexer-bot committed Sep 5, 2024
1 parent f058ec1 commit 8eb4f7e
Show file tree
Hide file tree
Showing 63 changed files with 1,175 additions and 1,098 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.10..3.13)

project(reindexer)
cmake_minimum_required(VERSION 3.10)

enable_testing()
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
2 changes: 1 addition & 1 deletion bindings/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package bindings

const CInt32Max = int(^uint32(0) >> 1)

const ReindexerVersion = "v3.28.0"
const ReindexerVersion = "v3.28.1"

// public go consts from type_consts.h and reindexer_ctypes.h
const (
Expand Down
15 changes: 15 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Version 3.28.1 (05.09.2024)
## Core
- [fix] Fixed pagination for `MERGE` fulltext queries. Previously those queries could return duplicates on different pages due to missing ordering guarantees
- [fix] Fixed fields filters serialization for `DISTINCT` aggregations (affects SQL logging only)
- [fix] Temporary disabled default values logic for indexed field from v3.27.0 - this logic may cause stability issues and will be reworked in further releases
- [fix] Add extra check for composites indexes substitution
- [fix] Fix composites substitution after indexes update

## Reindexer tool
- [fix] Fixed crash in `\quit`-command after previous errors
- [fix] Fixed crash in `git bash` on `Windows` platforms

## Face
- [fix] Fixed XSS vulnerability in table view

# Version 3.28.0 (16.08.2024)
## Core
- [fea] Updated [logging library](https://github.com/gabime/spdlog) to v1.14.1 and [formatting library](https://github.com/fmtlib/fmt) to v11.0.2
Expand Down
20 changes: 17 additions & 3 deletions cjson/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ func (dec *Decoder) decodeSlice(pl *payloadIface, rdser *Serializer, v *reflect.
var ptr unsafe.Pointer

k := v.Kind()

offset := 0
switch k {
case reflect.Slice:
Expand All @@ -331,7 +332,11 @@ func (dec *Decoder) decodeSlice(pl *payloadIface, rdser *Serializer, v *reflect.
// offset is 0
// No concatenation for the fixed size arrays
default:
panic(fmt.Errorf("can not convert '%s' to 'array'", v.Type().Kind().String()))
if count == 0 { // Allows empty slice for any scalar type (using default value)
return
} else {
panic(fmt.Errorf("can not convert '%s' to 'array'", v.Type().Kind().String()))
}
}

if subtag != TAG_OBJECT {
Expand Down Expand Up @@ -583,6 +588,7 @@ func (dec *Decoder) decodeValue(pl *payloadIface, rdser *Serializer, v reflect.V
ctagName := ctag.Name()

k := v.Kind()
initialV := v
if k == reflect.Ptr {
if v.IsNil() {
v.Set(reflect.New(v.Type().Elem()))
Expand Down Expand Up @@ -641,6 +647,7 @@ func (dec *Decoder) decodeValue(pl *payloadIface, rdser *Serializer, v reflect.V
} else {
panic(fmt.Errorf("err: intf=%s, name='%s' %s", v.Type().Name(), dec.state.tagsMatcher.tag2name(ctagName), ctag.Dump()))
}
initialV = v
k = v.Kind()
if k == reflect.Ptr {
if v.IsNil() {
Expand All @@ -659,8 +666,12 @@ func (dec *Decoder) decodeValue(pl *payloadIface, rdser *Serializer, v reflect.V
switch ctagType {
case TAG_ARRAY:
count := int(rdser.GetVarUInt())
pl.getArray(int(ctagField), *cnt, count, v)
*cnt += count
if k == reflect.Slice || k == reflect.Array || count != 0 { // Allows empty slice for any scalar type (using default value)
pl.getArray(int(ctagField), *cnt, count, v)
*cnt += count
} else {
initialV.Set(reflect.Zero(initialV.Type())) // Set nil to scalar pointers, intialized with empty arrays
}
default:
pl.getValue(int(ctagField), *cnt, v)
(*cnt)++
Expand All @@ -670,6 +681,9 @@ func (dec *Decoder) decodeValue(pl *payloadIface, rdser *Serializer, v reflect.V
switch ctagType {
case TAG_ARRAY:
dec.decodeSlice(pl, rdser, &v, fieldsoutcnt, cctagsPath)
if v.Kind() != reflect.Array && v.Kind() != reflect.Slice && v.Kind() != reflect.Interface {
initialV.Set(reflect.Zero(initialV.Type())) // Set nil to scalar pointers, intialized with empty arrays
}
case TAG_OBJECT:
for dec.decodeValue(pl, rdser, v, fieldsoutcnt, cctagsPath) {
}
Expand Down
31 changes: 0 additions & 31 deletions clang-tidy/.clang-tidy

This file was deleted.

10 changes: 0 additions & 10 deletions clang-tidy/.clang-tidy-ignore

This file was deleted.

Loading

0 comments on commit 8eb4f7e

Please sign in to comment.