config root man

Current Path : /home/usr.opt/mysql57/mysql-test/suite/x/r/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //home/usr.opt/mysql57/mysql-test/suite/x/r/crud_update_table_json.result

install plugin mysqlx soname "mysqlx.so";
call mtr.add_suppression("Plugin mysqlx reported: .Failed at SSL configuration: .SSL context is not usable without certificate and private key..");
call mtr.add_suppression("Plugin mysqlx reported: .SSL_CTX_load_verify_locations failed.");
RUN DROP SCHEMA IF EXISTS xtest

0 rows affected
RUN CREATE SCHEMA xtest

1 rows affected
RUN CREATE TABLE xtest.xtable (xfield JSON)

0 rows affected
RUN TRUNCATE TABLE xtest.xtable

0 rows affected
RUN INSERT INTO xtest.xtable VALUES('{"first":1.0, "second": "two"}')

1 rows affected
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": "two"}
0 rows affected
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      name: "xfield"
    }
    operation: SET
    value {
      type: LITERAL
      literal {
        type: V_OCTETS
        v_octets {
          value: "{\"first\":1.1, \"second\": \"two.1\"}"
        }
      }
    }
  }
}


1 rows affected
Rows matched: 1  Changed: 1  Warnings: 0
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1.1, "second": "two.1"}
0 rows affected
RUN TRUNCATE TABLE xtest.xtable

0 rows affected
RUN INSERT INTO xtest.xtable VALUES('{"first":1.0, "second": "two"}')

1 rows affected
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": "two"}
0 rows affected
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      document_path {
        type: MEMBER
        value: "first"
      }
      name: "xfield"
    }
    operation: ITEM_SET
    value {
      type: LITERAL
      literal {
        type: V_DOUBLE
        v_double: 1.1
      }
    }
  }
  operation {
    source {
      document_path {
        type: MEMBER
        value: "second"
      }
      name: "xfield"
    }
    operation: ITEM_SET
    value {
      type: LITERAL
      literal {
        type: V_OCTETS
        v_octets {
          value: "two.1"
        }
      }
    }
  }
  operation {
    source {
      document_path {
        type: MEMBER
        value: "third"
      }
      name: "xfield"
    }
    operation: ITEM_SET
    value {
      type: LITERAL
      literal {
        type: V_DOUBLE
        v_double: 3.1
      }
    }
  }
}


1 rows affected
Rows matched: 1  Changed: 1  Warnings: 0
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1.1, "third": 3.1, "second": "two.1"}
0 rows affected
RUN TRUNCATE TABLE xtest.xtable

0 rows affected
RUN INSERT INTO xtest.xtable VALUES('{"first":1.0, "second": "two"}')

1 rows affected
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": "two"}
0 rows affected
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      document_path {
        type: MEMBER
        value: "first"
      }
      name: "xfield"
    }
    operation: ITEM_REMOVE
  }
}


1 rows affected
Rows matched: 1  Changed: 1  Warnings: 0
RUN SELECT * FROM xtest.xtable
xfield
{"second": "two"}
0 rows affected
RUN TRUNCATE TABLE xtest.xtable

0 rows affected
RUN INSERT INTO xtest.xtable VALUES('{"first":1.0, "second": "two"}')

1 rows affected
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": "two"}
0 rows affected
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      document_path {
        type: MEMBER
        value: "first"
      }
      name: "xfield"
    }
    operation: ITEM_REPLACE
    value {
      type: LITERAL
      literal {
        type: V_DOUBLE
        v_double: 1.1
      }
    }
  }
  operation {
    source {
      document_path {
        type: MEMBER
        value: "third"
      }
      name: "xfield"
    }
    operation: ITEM_REPLACE
    value {
      type: LITERAL
      literal {
        type: V_OCTETS
        v_octets {
          value: "three.1"
        }
      }
    }
  }
}


1 rows affected
Rows matched: 1  Changed: 1  Warnings: 0
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1.1, "second": "two"}
0 rows affected
RUN TRUNCATE TABLE xtest.xtable

0 rows affected
RUN INSERT INTO xtest.xtable VALUES('{"first":1.0, "second": "two"}')

1 rows affected
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": "two"}
0 rows affected
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      name: "xfield"
    }
    operation: ITEM_MERGE
    value {
      type: LITERAL
      literal {
        type: V_OCTETS
        v_octets {
          value: "{\"third\":3.0, \"fourth\": \"four\"}"
        }
      }
    }
  }
}


1 rows affected
Rows matched: 1  Changed: 1  Warnings: 1
Warnings generated:
WARNING | 1287 | 'JSON_MERGE' is deprecated and will be removed in a future release. Please use JSON_MERGE_PRESERVE/JSON_MERGE_PATCH instead
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "third": 3, "fourth": "four", "second": "two"}
0 rows affected
RUN TRUNCATE TABLE xtest.xtable

0 rows affected
RUN INSERT INTO xtest.xtable VALUES('{"first":1.0, "second": ["two"]}')

1 rows affected
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": ["two"]}
0 rows affected
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      document_path {
        type: MEMBER
        value: "second"
      }
      document_path {
        type: ARRAY_INDEX
        index: 0
      }
      name: "xfield"
    }
    operation: ARRAY_INSERT
    value {
      type: LITERAL
      literal {
        type: V_OCTETS
        v_octets {
          value: "two.1"
        }
      }
    }
  }
}


1 rows affected
Rows matched: 1  Changed: 1  Warnings: 0
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": ["two.1", "two"]}
0 rows affected
RUN TRUNCATE TABLE xtest.xtable

0 rows affected
RUN INSERT INTO xtest.xtable VALUES('{"first":1.0, "second": "two"}')

1 rows affected
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": "two"}
0 rows affected
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      document_path {
        type: MEMBER
        value: "second"
      }
      name: "xfield"
    }
    operation: ARRAY_APPEND
    value {
      type: LITERAL
      literal {
        type: V_OCTETS
        v_octets {
          value: "two.1"
        }
      }
    }
  }
}


1 rows affected
Rows matched: 1  Changed: 1  Warnings: 0
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": ["two", "two.1"]}
0 rows affected
RUN TRUNCATE TABLE xtest.xtable

0 rows affected
RUN INSERT INTO xtest.xtable VALUES('{"first":1.0, "second": "two"}')

1 rows affected
RUN SELECT * FROM xtest.xtable
xfield
{"first": 1, "second": "two"}
0 rows affected
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      document_path {
        type: MEMBER
        value: "second"
      }
      name: "xfield"
    }
    operation: SET
    value {
      type: LITERAL
      literal {
        type: V_OCTETS
        v_octets {
          value: "{\"first\":1.1}"
        }
      }
    }
  }
}

Got expected error: Invalid column name to update (code 5052)
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      name: ""
    }
    operation: SET
    value {
      type: LITERAL
      literal {
        type: V_OCTETS
        v_octets {
          value: "{\"first\":1.1}"
        }
      }
    }
  }
}

Got expected error: Invalid column name to update (code 5052)
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      name: "xfield"
    }
    operation: ITEM_SET
    value {
      type: LITERAL
      literal {
        type: V_DOUBLE
        v_double: 1.1
      }
    }
  }
}

Got expected error: Invalid member location (code 5053)
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      name: "xfield"
    }
    operation: ITEM_REMOVE
  }
}

Got expected error: Invalid member location (code 5053)
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      name: "xfield"
    }
    operation: ITEM_REPLACE
    value {
      type: LITERAL
      literal {
        type: V_DOUBLE
        v_double: 1.1
      }
    }
  }
}

Got expected error: Invalid member location (code 5053)
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      name: "xfield"
    }
    operation: ARRAY_INSERT
    value {
      type: LITERAL
      literal {
        type: V_DOUBLE
        v_double: 1.1
      }
    }
  }
}

Got expected error: Invalid member location (code 5053)
send Mysqlx.Crud.Update {
  collection {
    name: "xtable"
    schema: "xtest"
  }
  data_model: TABLE
  operation {
    source {
      name: "xfield"
    }
    operation: ARRAY_APPEND
    value {
      type: LITERAL
      literal {
        type: V_DOUBLE
        v_double: 1.1
      }
    }
  }
}

Got expected error: Invalid member location (code 5053)
RUN DROP SCHEMA IF EXISTS xtest

1 rows affected
Mysqlx.Ok {
  msg: "bye!"
}
ok
uninstall plugin mysqlx;

Man Man