-
Notifications
You must be signed in to change notification settings - Fork 270
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
Granted permission for root to insert, delete, update on all tables #123
Conversation
Granted permission for root to insert, delete, update on all tables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, but afraid this doesn't seem to address an open issue!
@@ -19,7 +19,7 @@ def test_delete_returns_affected_rows(self): | |||
{"id": 3, "val": "baz"} | |||
] | |||
for row in rows: | |||
self.db.execute("INSERT INTO cs50(val) VALUES(:val);", val=row["val"]) | |||
self.db.execute("INSERT INTO cs50(val) VALUES(:val);", val=row["val"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afraid this is incorrectly indented now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sorry, I just inccidentaly copied one row :-D
//Granted permision to root to select, insert, update and delete anything on all tables | ||
def setUp(self): | ||
self.db.execute("GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES TO root;") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this is solving an open issue?
@@ -172,7 +177,7 @@ def setUp(self): | |||
|
|||
def test_lastrowid(self): | |||
self.db.execute("CREATE TABLE foo(id INTEGER PRIMARY KEY AUTOINCREMENT, firstname TEXT, lastname TEXT)") | |||
self.assertEqual(self.db.execute("INSERT INTO foo (firstname, lastname) VALUES('firstname', 'lastname')"), 1) | |||
self.assertEqual(sv elf.db.execute("INSERT INTO foo (firstname, lastname) VALUES('firstname', 'lastname')"), 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Afraid this isn't syntactically valid!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It supposed to commit changes only at line 163. I will check where it went wrong, why one line is deleted and is changed by the same line.
Granted permission for root to insert, delete, update on all tables