config root man

Current Path : /usr/opt/mysql57/mysql-test/suite/x/t/

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/t/admin_create_index_string.test

## generated

--source ../include/xplugin_preamble.inc
## Test starts here
--write_file $MYSQL_TMP_DIR/admin_create_index_string.tmp
## Test data
-->sql
drop schema if exists xtest;
create schema xtest default charset 'utf8mb4';
use xtest;
-->endsql
Mysqlx.Sql.StmtExecute {
  stmt: "create_collection"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Sql.StmtExecuteOk
-->recvresult
Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "isbn"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: true
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.isbn"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "TEXT(13)"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Sql.StmtExecuteOk
-->recvresult
Mysqlx.Crud.Insert {
  collection {
    name: "books1"
    schema: "xtest"
  }
  data_model: DOCUMENT
  row {
    field {
      type: LITERAL
      literal {
        type: V_STRING
        v_string {
          value: "{\"_id\": \"one\", \"name\": \"The Bla\", \"isbn\" : \"9780262527804\", \"pages\":30}"
        }
      }
    }
  }
}

## expect Mysqlx.Sql.StmtExecuteOk
-->recvresult
Mysqlx.Crud.Insert {
  collection {
    name: "books1"
    schema: "xtest"
  }
  data_model: DOCUMENT
  row {
    field {
      type: LITERAL
      literal {
        type: V_STRING
        v_string {
          value: "{\"_id\": \"two\", \"name\": \"The Bla II\", \"isbn\" : \"9780262527805\"}"
        }
      }
    }
  }
}

## expect Mysqlx.Sql.StmtExecuteOk
-->recvresult
Mysqlx.Crud.Insert {
  collection {
    name: "books1"
    schema: "xtest"
  }
  data_model: DOCUMENT
  row {
    field {
      type: LITERAL
      literal {
        type: V_STRING
        v_string {
          value: "{\"_id\": \"three\", \"name\": \"The Bla III\"}"
        }
      }
    }
  }
}

## expect Mysqlx.Sql.StmtExecuteOk
-->recvresult
Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "pages"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: true
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.pages"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "INT"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: true
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Error
-->recverror ER_X_DOC_REQUIRED_FIELD_MISSING

Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "name"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: true
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.name"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "TEXT(80)"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: true
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Sql.StmtExecuteOk
-->recvresult
Mysqlx.Crud.Insert {
  collection {
    name: "books1"
    schema: "xtest"
  }
  data_model: DOCUMENT
  row {
    field {
      type: LITERAL
      literal {
        type: V_STRING
        v_string {
          value: "{\"_id\": \"four\", \"isbn\": \"9780262527809\"}"
        }
      }
    }
  }
}

## expect Mysqlx.Error
-->recverror ER_X_DOC_ID_MISSING

Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "datetime`;drop table"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.data.datetime"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "DATETIME"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Sql.StmtExecuteOk
-->recvresult
Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "datetime\\`;drop table"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.data.datetime"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "DATETIME"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Sql.StmtExecuteOk
-->recvresult
Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "_id"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.data.datetime"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "DATETIME"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Error
-->recvresult

Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: ""
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.data.datetime"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "DATETIME"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Error
-->recv
Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "aaa"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.data.datetime"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "text(20);drop table"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Error
-->recverror 5017


Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "aaa"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.data.datetime"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "varchar(20)"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  namespace: "xplugin"
}

## expect Mysqlx.Error
-->recverror 5017


Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "aaa"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.data datetime"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "int"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  namespace: "xplugin"
}
-->recverror ER_INVALID_JSON_PATH


Mysqlx.Sql.StmtExecute {
  stmt: "create_collection_index"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "xtest"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "books1"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "aaa"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "$.data' foo"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "int"
      }
    }
  }
  args {
    type: SCALAR
    scalar {
      type: V_BOOL
      v_bool: false
    }
  }
  namespace: "xplugin"
}
-->recverror ER_INVALID_JSON_PATH


## Cleanup
-->sql
drop schema if exists xtest;
-->endsql
EOF

--exec $MYSQLXTEST -uroot --password='' --file=$MYSQL_TMP_DIR/admin_create_index_string.tmp 2>&1
--remove_file $MYSQL_TMP_DIR/admin_create_index_string.tmp

## Postamble
uninstall plugin mysqlx;

Man Man