Bug #82217 SED errors when running generate_sql_file
Submitted: 13 Jul 2016 14:35 Modified: 14 Jul 2016 4:21
Reporter: Hugo Palma Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: SYS Schema Severity:S3 (Non-critical)
Version:1.5.1 OS:Ubuntu
Assigned to: CPU Architecture:Any

[13 Jul 2016 14:35] Hugo Palma
I just downloaded sys schema version 1.5.1 from here https://github.com/mysql/mysql-sys/archive/1.5.1.zip and when running:

./generate_sql_file.sh -v 57 -m

i get the following output:

sed: can't read : No such file or directory
sed: can't read : No such file or directory
sed: can't read : No such file or directory

    Wrote file: /home/hpalma/mysql-sys-1.5.1/gen/mysql_sys_schema.sql
Object Definer: 'mysql.sys'@'localhost'
   sql_log_bin: enabled

Notice the sed errors.
This also happens for version 56.
I've filtered the error down to the last three seds after:

# Remove final leading and trailing spaces

This problem could be os specific as it seems to work on osx.

How to repeat:
./generate_sql_file.sh -v 57 -m


./generate_sql_file.sh -v 56 -m

On a linux box.
[14 Jul 2016 4:21] MySQL Verification Team
Hello Hugo Palma,

Thank you for the report.

[21 Jul 2016 22:47] Jesper wisborg Krogh
Posted by developer:
Hi Hugo,

Thank you for the bug report.

I believe the generated SQL file should still be correct. Can you confirm that?

[22 Jul 2016 1:21] Tsubasa Tanaka
I seem this causes these lines.

`-i ''` raises error, because sed interprets '' as filename(not prefix).
If what you need is telling "-i with blank prefix", you have to set it `-i''` (without space character).

But I found the other places where using sed with -i option, they don't give any arguments to `-i`.


So, is `-i ''` a typo?
[25 Jul 2016 13:36] Hugo Palma
the sql file seems to be just fine.

In fact, the only difference i see by comparing with a file generated with no error is that the one with the errors has an extra new line at the end.