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

Granted permission for root to insert, delete, update on all tables #123

Closed
wants to merge 1 commit into from

Conversation

lukasc03
Copy link

@lukasc03 lukasc03 commented Jun 6, 2020

Granted permission for root to insert, delete, update on all tables

Granted permission for root to insert, delete, update on all tables
Copy link
Member

@dmalan dmalan left a 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"])
Copy link
Member

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!

Copy link
Author

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;")

Copy link
Member

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)
Copy link
Member

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!

Copy link
Author

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.

@dmalan dmalan closed this Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants