shlomi-noach / openarkkit

Automatically exported from code.google.com/p/openarkkit
24 stars 16 forks source link

Error running oak-online-alter-table #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm having trouble running this, and it seems that there are either some 
differences in my Python installation that it doesn't handle gracefully, or 
that it's finding an error it doesn't know how to handle.  I am not experienced 
enough with Python to have an opinion.  It always seems to exit with this, no 
matter what error it encounters (e.g. cannot log into MySQL):

-- ERROR: 'str' object is not callable
Traceback (most recent call last):
  File "/usr/bin/oak-online-alter-table", line 954, in ?
    exit_with_error(err)
  File "/usr/bin/oak-online-alter-table", line 853, in exit_with_error
    exit(1)
TypeError: 'str' object is not callable

Here is the full information:

CREATE TABLE `b` (
  `a` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1

$ oak-online-alter-table --host=127.0.0.1 --database=test --table=b 
--alter="engine=innodb" --user=root --port=5141
-- Connecting to MySQL
-- Table test.b is of engine myisam
-- Checking for UNIQUE columns on test.b, by which to chunk
-- Possible UNIQUE KEY column names in test.b:
-- - a
-- Table test.__oak_b has been created
-- Table test.__oak_b has been altered
-- Checking for UNIQUE columns on test.__oak_b, by which to chunk
-- Possible UNIQUE KEY column names in test.__oak_b:
-- - a
-- Checking for UNIQUE columns on test.b, by which to chunk
-- - Found following possible unique keys:
-- - a (int)
-- Chosen unique key is 'a'
-- Shared columns: a
-- Created AD trigger
-- Created AU trigger
-- Created AI trigger
-- Attempting to lock tables

-- Tables locked WRITE
-- a (min, max) values: ([1L], [9990972L])
-- Tables unlocked
exceptions.Exception sequence item 0: expected string, long found
-- ERROR: Errors found. Initiating cleanup
-- Tables unlocked
-- Table test.__oak_b was found and dropped
-- Dropped custom trigger b_AD_oak
-- Dropped custom trigger b_AU_oak
-- Dropped custom trigger b_AI_oak
-- ERROR: sequence item 0: expected string, long found
Traceback (most recent call last):
  File "/usr/bin/oak-online-alter-table", line 954, in ?
    exit_with_error(err)
  File "/usr/bin/oak-online-alter-table", line 853, in exit_with_error
    exit(1)
TypeError: 'str' object is not callable

Original issue reported on code.google.com by baron.schwartz on 17 Feb 2011 at 4:18

GoogleCodeExporter commented 9 years ago
I think this is a duplicate of Issue 7
Can you please try the latest source from trunk: 
http://code.google.com/p/openarkkit/source/browse/#svn%2Ftrunk%2Fopenarkkit%2Fsr
c%2Foak
(it is not yet distributed in package format) and test whether it solves the 
problem?

Thank you

Original comment by shlomi.n...@gmail.com on 19 Feb 2011 at 2:59

GoogleCodeExporter commented 9 years ago

Original comment by shlomi.n...@gmail.com on 19 Feb 2011 at 3:00

GoogleCodeExporter commented 9 years ago
Sorry. Up-to-date source file is here:
http://openarkkit.googlecode.com/svn/trunk/openarkkit/src/oak/oak-online-alter-t
able.py
You can copy+paste the text into your /usr/bin/oak-online-alter-table

Original comment by shlomi.n...@gmail.com on 19 Feb 2011 at 3:07

GoogleCodeExporter commented 9 years ago
That solves the problem, you can close this.

Original comment by baron.schwartz on 22 Feb 2011 at 1:04

GoogleCodeExporter commented 9 years ago

Original comment by shlomi.n...@gmail.com on 22 Feb 2011 at 6:15