Number in string bug

Bug #1184198 reported by Alexey Kapitansky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tarantool
Confirmed
High
Roman Tsisyk

Bug Description

lua box.select(6,0,1)
---
 - 1: {6, 7, 842216504, '2', '1', '1', 12849, 12849, '2', '14762'}

in this tuple all fields except 0 and 1 are strings, and were provided via php strongly converted to a string.

When I try to set 3rd field of the tuple to value "8432", I got next result:
...
lua box.update(6, 1, "=p", 3, "8432")
---
 - 1: {6, 7, 842216504, '2', '1', '1', 12849, 12849, '2', '14762'}

and the same request via php:

array(2) {
  ["count"]=>
  int(1)
  ["tuples_list"]=>
  array(1) {
    [0]=>
    array(11) {
      [0]=>
      int(1)
      [1]=>
      int(6)
      [2]=>
      int(7)
      [3]=>
      int(842216504)
      [4]=>
      string(1) "2"
      [5]=>
      string(1) "1"
      [6]=>
      string(1) "1"
      [7]=>
      string(2) "12"
      [8]=>
      string(2) "12"
      [9]=>
      string(1) "2"
      [10]=>
      string(5) "14762"
    }
  }
}

Revision history for this message
Alexey Kapitansky (alexey-kapitansky) wrote :

Sorry, here is config for namespace:
# fifo's
space[6].enabled = 1
space[6].index[0].type = "HASH"
space[6].index[0].unique = 1
space[6].index[0].key_field[0].fieldno = 0
space[6].index[0].key_field[0].type = "NUM"

tags: added: string
tags: added: php tarantool
Revision history for this message
Kostja Osipov (kostja) wrote :

Will be fixed with introduction of msgpack.

Changed in tarantool:
milestone: none → 1.6.1
assignee: nobody → Roman Tsisyk (rtsisyk)
importance: Undecided → High
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.