anyongjin / mysql_ibd

import data from ibd files for mysql
MIT License
28 stars 5 forks source link

whereis on Linux #4

Open negrusti opened 1 year ago

negrusti commented 1 year ago

whereis on Linux works like this:

whereis ibd2sdi
ibd2sdi: /usr/bin/ibd2sdi /usr/share/man/man1/ibd2sdi.1.gz

so the script crashes with:

Traceback (most recent call last):
  File "sdi2sql.py", line 182, in <module>
    ibd2sql(config)
  File "sdi2sql.py", line 52, in ibd2sql
    sdi_result = subprocess.run([ibd2sdi_path, '--dump-file=' + sdi_path, ibd_path], stdout=subprocess.PIPE)
  File "/usr/lib/python3.8/subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ibd2sdi: /usr/bin/ibd2sdi /usr/share/man/man1/ibd2sdi.1.gz'
anyongjin commented 1 year ago

Thanks for your feedback. I fixed this bug in commit: a9cfa9a4ea203d7faddc8058c99525883fb62275 But I don't have suitable environment to test it. So, some more feedback is welcome if there is still a probleam