config root man

Current Path : /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 : //usr/opt/mysql57/mysql-test/suite/x/r/crud_insert_expr.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.mytable (id INT PRIMARY KEY, name VARCHAR(40), flag BOOL)

0 rows affected
send Mysqlx.Crud.Insert {
  collection {
    name: "mytable"
    schema: "xtest"
  }
  data_model: TABLE
  projection {
    name: "id"
  }
  projection {
    name: "name"
  }
  projection {
    name: "flag"
  }
  row {
    field {
      type: OPERATOR
      operator {
        name: "+"
        param {
          type: LITERAL
          literal {
            type: V_SINT
            v_signed_int: 19
          }
        }
        param {
          type: LITERAL
          literal {
            type: V_SINT
            v_signed_int: 23
          }
        }
      }
    }
    field {
      type: FUNC_CALL
      function_call {
        name {
          name: "upper"
        }
        param {
          type: LITERAL
          literal {
            type: V_STRING
            v_string {
              value: "Robb"
            }
          }
        }
      }
    }
    field {
      type: OPERATOR
      operator {
        name: "<"
        param {
          type: FUNC_CALL
          function_call {
            name {
              name: "now"
            }
          }
        }
        param {
          type: FUNC_CALL
          function_call {
            name {
              name: "makedate"
            }
            param {
              type: LITERAL
              literal {
                type: V_SINT
                v_signed_int: 2015
              }
            }
            param {
              type: LITERAL
              literal {
                type: V_SINT
                v_signed_int: 15
              }
            }
          }
        }
      }
    }
  }
}


1 rows affected
RUN SELECT * FROM xtest.mytable
id	name	flag
42	ROBB	0
0 rows affected
RUN CREATE TABLE xtest.mycoll (doc JSON, _id VARBINARY(16) GENERATED ALWAYS AS (JSON_UNQUOTE(JSON_EXTRACT(doc, '$._id'))) STORED PRIMARY KEY)

0 rows affected
send Mysqlx.Crud.Insert {
  collection {
    name: "mycoll"
    schema: "xtest"
  }
  data_model: DOCUMENT
  row {
    field {
      type: FUNC_CALL
      function_call {
        name {
          name: "replace"
        }
        param {
          type: LITERAL
          literal {
            type: V_STRING
            v_string {
              value: "{\"_id\": \"one\", \"value\": 77}"
            }
          }
        }
        param {
          type: LITERAL
          literal {
            type: V_STRING
            v_string {
              value: "one"
            }
          }
        }
        param {
          type: FUNC_CALL
          function_call {
            name {
              name: "hex"
            }
            param {
              type: LITERAL
              literal {
                type: V_STRING
                v_string {
                  value: "two"
                }
              }
            }
          }
        }
      }
    }
  }
}


1 rows affected
RUN SELECT hex("one")
hex("one")
6F6E65
0 rows affected
RUN SELECT hex("two")
hex("two")
74776F
0 rows affected
RUN SELECT * FROM xtest.mycoll
doc	_id
{"_id": "74776F", "value": 77}	74776F
0 rows affected
RUN drop schema if exists xtest

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

Man Man