Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sieve + mysqldump --skip-comments is broken #69

Open
abg opened this issue Aug 5, 2014 · 0 comments
Open

sieve + mysqldump --skip-comments is broken #69

abg opened this issue Aug 5, 2014 · 0 comments
Assignees

Comments

@abg
Copy link
Owner

abg commented Aug 5, 2014

sieve's tokenizer currently relies on comments to detect section types. This needs to be made more intelligent to support more dump formats.

Currently this should be at least classified as a bug as it raises an unchecked exception:

$ ./dbsake sieve -O < sakila_skip_comments.sql
Uncaught exception! (╯°□°)╯ ︵ ┻━┻
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "./dbsake.sh/__main__.py", line 21, in <module>
    sys.exit(main())
  File "./dbsake.sh/__main__.py", line 18, in main
    sys.exit(dbsake.cli.main())
  File "./dbsake/cli/__init__.py", line 123, in main
    dbsake(args=argv, auto_envvar_prefix='DBSAKE', obj={})
  File "./dbsake.sh/click/core.py", line 488, in __call__
    return self.main(*args, **kwargs)
  File "./dbsake.sh/click/core.py", line 474, in main
    self.invoke(ctx)
  File "./dbsake.sh/click/core.py", line 758, in invoke
    return self.invoke_subcommand(ctx, cmd, cmd_name, ctx.args[1:])
  File "./dbsake.sh/click/core.py", line 767, in invoke_subcommand
    return cmd.invoke(cmd_ctx)
  File "./dbsake.sh/click/core.py", line 659, in invoke
    ctx.invoke(self.callback, **ctx.params)
  File "./dbsake.sh/click/core.py", line 325, in invoke
    return callback(*args, **kwargs)
  File "/home/abg/projects/pristine/dbsake/dbsake/cli/cmd/sieve.py", line 139, in sieve_cli
    stats = sieve.sieve(options)
  File "./dbsake/core/mysql/sieve/__init__.py", line 70, in sieve
    with open_stream(options) as input_stream:
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "./dbsake/util/compression.py", line 77, in decompressed_fileobj
    ext = magic_to_ext(fileobj)
  File "./dbsake/util/compression.py", line 68, in magic_to_ext
    raise OSError(errno.EIO, "Failed to detect compression type")
OSError: [Errno 5] Failed to detect compression type
It's okay. ┬─┬ノ( º_ ºノ)
Consider filing a bug report at https://github.com/abg/dbsake/issues
@abg abg added bug labels Aug 5, 2014
@abg abg self-assigned this Jan 8, 2015
@abg abg removed this from the dbsake 2.1.0 milestone Jan 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant