Indian English is sometimes hard to digest for native speakers. But it is not as difficult as it seems.
From this old ELU question and Vishy's Indian English Dictionary
July 12, 2006
doubt. /DOWT/. A question asking for clarification. In standard English and American, the noun doubt is uncountable and refers to a lack of complete trust in something. Doubt may be expressed as simply as doubting someone's abilities or as profoundly as someone doubting their own religious faith. Not so in India. In India, doubt can be used as a countable noun. When a school teacher goes over an intricate concept in class, she invariably leaves some students with doubts in their mind about their understanding of the material just covered. Students ask her questions to get a better understanding of the concept and each such question is called a doubt. It is entirely normal to hear a statement like "I have just one doubt, miss" or "If you have any doubts before the exam tomorrow, come see me in the staff room". The doubts in the aforementioned sentences are not as much rooted in a lack of faith as in a lack of understanding. Attentive readers would have encountered the Indian English sense of doubt a fair bit on online message boards in threads started by Indians. Titles such as "Visual Basic .NET/Oracle doubt" are not uncommon for threads on programming-related message boards. It is my understanding that this sense is mostly prevalent in southern India, but I could be wrong on this count.
The author of Vishy's Indian English Dictionary claims that this sort of usage is mostly prevalent in southern India, which is actually quite true. I am from the southern part of India and in Tamil, the direct translation of doubt is Cantēkam. In schools, colleges and even offices (in TamilNadu), when someone gives a set of instructions or lectures a large group, at the end, 99 out of 100 times, they will ask
"Yedhavadhu cantēkam iruka?"
which directly translates in English to
Does anybody have any doubts?
Note: Apologies for quoting a phrase from another language. But I am trying to explain how I think it all started.
With the advent of Internet(that transcended race, color, sex, religion and all those), more Indians began interacting with native speakers. And when they had questions in their mind, their brain fired the familiar "ask-him-the-doubt" neuron and eventually they ended up saying - "Hey Mark! I have a few doubts". And since Mark, who would have gotten offended because some Indian person had a few "doubts" despite such a lucid presentation of his thoughts, his reaction would have been "Excuse me? You have doubts?". Looking at a baffled and bemused Mark, our Indian friend too would have been perplexed, unaware that "doubts" implies "uncertainties" to native speakers and responded with "Chill man! Just a few questions.." (think damage-control).
It's more of a Mother Tongue Influence and cultural effect. I say this because, as non-native speakers, we tend to think of words in our native language (say Hindi or Tamil), and then translate it to English(word-for-word), applying the synatxes and semantics, ensuring that intended recipients and listeners get the message. But sometimes, it so happens that, a legitimate phrase in InE(such as this, "to have doubts") becomes confusing to speakers of AmE/BrE.
Disclaimer : Mark and the Indian guy are used as examples for narrative purposes only. Any resemblance to living person is purely co-incidental.
To answer the OP's Questions
InE : I captured a spy and asked him many doubts.
Although the scenario seems illogical(personally), this is right, purely because doubts directly translates to questions in InE.
AmE/BrE : I captured a spy and asked him many questions.
Why I feel this particular scenario is a bit flawed, even for InE
Purely because, I think you capture a spy and grill the daylights out of him. So you question him hard, shooting questions left, right and center, perpetually threatening to end his life if he doesn't comply. Let me tell you one more thing - Mostly, (read MOSTLY), the conservative Indian culture(of course, now people are opening up, thanks to the Internet and globalization) prevents most of us from asking our doubts(questions) freely. We hesitate a lot. Sometimes and in some parts of India, asking questions to an elder or a professor or a lecturer is even frowned upon. But in this scenario, you don't hesitate to ask your doubts(questions) to the captive. That's why I said this scenario looks wrong even though the sentence would be valid in InE.
Is it because doubt is only used when your question is regarding a detail you're uncertain about, rather than a wholly unknown subject? What about a scenario like "I cornered my chemistry professor after class and asked him many doubts."?
@Mr. Shiny and New... Certain or uncertain, wholly known or partially known is irrelevant. Doubts(questions) can arise in your mind any time about anything. You may be a beginner or you may be a Subject Matter Expert. Doesn't matter. You ask your doubts to the concerned authority whomsoever it may be, trusting that they will have the answers to clarify your queries. Period.
InE : I captured a spy and doubted him for hours.
No. You captured and questioned a spy for hours. The verb form of doubt is incorrect in InE.
InE : I have two doubts about SQL. 1. Can I type in lower-case? 2. Does null equal null?
In InE, Doubts are used as nouns. They are nothing but "questions", which needs answers or clarifications to be made.
Update1: I have edited my answers to be on-topic. I did not intend to digress.
Here's a list of Indianisms that you will find funny, absurd, totally wrong, may be even provocative to an extent but these totally get the message across to the intended parties in InE.
Update2 : Added new points and perspectives to the answer. Not sure if it appeals to readers but nonetheless I am sharing my experience as an Indian English speaker.
Update3 : Added clarification and details as to why I think OP's second example seems illogical to me.