If one gallon of sugar water is added to a car's gas tank, it is likely that the car's fuel lines will get filled with water, potentially causing serious mechanical issues for the car. However, this is because gasoline floats on top of water, which means that water would be the first liquid available to the car's fuel pump, and not because of any potential harm sugar can do to a car's engine. In fact, the myth that sugar will immediately and permanently damage a car's engine has been proven to be untrue multiple times, although in theory, enough granulated sugar can clog a car's fuel filter as sand might.
Sugar doesn't dissolve in gasoline, meaning that adding it directly to the gas tank won't result in some sort of sugary gasoline solution as is purported by a popular myth. In the case of sugar water because it is more dense than pure water, it would sink below the less-dense liquid gasoline just as pure water would, meaning those who want to disable a car would do just as well adding pure water and leaving the dissolved sugar out of the equation. Sugar's potential harm for car engines is related to it its physical graininess.