Pour olive oil into a frying pan and fry the finely chopped onion over medium heat for 5 minutes, reduce the heat, add the finely chopped garlic and cook for another 2-3 minutes. Peel the tomato, grate it on a fine grater, add to the onion along with sugar, spices, 1 teaspoon of olive liquid and simmer over low heat for 7-10 minutes. Pour boiling water over the olives, drain the water and put it with the vegetables. Close the lid and simmer, stirring occasionally, for 12-15 minutes. Add salt and cook for another 3 minutes.