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/notice_warning.test

## generated
## Test query with resultset

--source ../include/xplugin_preamble.inc
## Test starts here
--write_file $MYSQL_TMP_DIR/stmtexecute_query_result.tmp

-->sql
use test;
create table chartab (d varchar(1));
set @old_sql_mode=@@sql_mode;
set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO';
-->endsql

Mysqlx.Sql.StmtExecute {
  stmt: "select 1/0, 1/0"
}
-->recvuntil Mysqlx.Sql.StmtExecuteOk

## Disable warnings and try again
Mysqlx.Sql.StmtExecute {
  stmt: "disable_notices"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "warnings"
      }
    }
  }
  namespace: "xplugin"
}
-->recvresult

Mysqlx.Sql.StmtExecute {
  stmt: "select 1/0"
}
-->recvuntil Mysqlx.Sql.StmtExecuteOk

## Enable warnings and try again
Mysqlx.Sql.StmtExecute {
  stmt: "enable_notices"
  args {
    type: SCALAR
    scalar {
      type: V_STRING
      v_string {
        value: "warnings"
      }
    }
  }
  namespace: "xplugin"
}
-->recv

## SQL
Mysqlx.Sql.StmtExecute {
  stmt: "select 1/0"
}
-->recvuntil Mysqlx.Sql.StmtExecuteOk

## CRUD Insert
Mysqlx.Crud.Insert {
  collection {
    name: "chartab"
    schema: "test"
  }
  data_model: TABLE
  projection {
    name: "d"
  }
  row {
    field {
      type: LITERAL
      literal {
        type: V_STRING
        v_string {
          value: "XX"
        }
      }
    }
  }
}
-->recvuntil Mysqlx.Sql.StmtExecuteOk

## CRUD Find
Mysqlx.Crud.Find {
  collection {
    name: "chartab"
    schema: "test"
  }
  data_model: TABLE
  criteria {
    type: OPERATOR
    operator {
      name: "/"
      param {
        type: LITERAL
        literal {
          type: V_SINT
          v_signed_int: 1
        }
      }
      param {
        type: LITERAL
        literal {
          type: V_SINT
          v_signed_int: 0
        }
      }
    }
  }
}
-->recvuntil Mysqlx.Sql.StmtExecuteOk

## CRUD Update
Mysqlx.Crud.Update {
  collection {
    name: "chartab"
    schema: "test"
  }
  data_model: TABLE
  operation {
    source {
      name: "d"
    }
    operation: SET
    value {
      type: LITERAL
      literal {
        type: V_STRING
        v_string {
          value: "XX"
        }
      }
    }
  }
}
-->recvuntil Mysqlx.Sql.StmtExecuteOk

## CRUD Delete
# Not sure what kind of delete generates warnings...

Mysqlx.Sql.StmtExecute {
  stmt: "list_notices"
  namespace: "xplugin"
}
-->recvuntil Mysqlx.Sql.StmtExecuteOk

-->sql
drop table chartab;
set @@sql_mode = @old_sql_mode;
-->endsql

EOF

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

## Postamble
uninstall plugin mysqlx;

Man Man