Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
452
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. mysql> create function create_stmt(tbl varchar(255), partition int unsigned)
  2. -> returns varchar(500)
  3. -> comment 'Generate a CREATE TABLE statement for the given table
  4. '> and partition number.'
  5. -> return concat(
  6. -> 'create table if not exists ', tbl, partition, ' like ', tbl);
  7. ERROR 1607 (HY000): Cannot create stored routine `create_stmt`. Check warnings
  8. mysql> show warnings;
  9. +---------+------+------------------------------------------------------------+
  10. | Level | Code | Message |
  11. +---------+------+------------------------------------------------------------+
  12. | Warning | 1265 | Data truncated for column 'comment' at row 1 |
  13. | Error | 1607 | Cannot create stored routine `create_stmt`. Check warnings |
  14. +---------+------+------------------------------------------------------------+
  15. 2 rows in set (0.00 sec)
  16.  
  17. mysql>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement