Error: Incorrect parameter for prepared name in encoded plan




I am getting this error in response when a query is being executed through an application (java).

Prepared name in encoded plan parameter is not []b217fd0b75bc740ab648222d07cdc6814eee0e9f

This has started coming today only. however, I am not aware of any change in the configuration of Couchbase server which can cause an encoded plan to get corrupted.
I checked query.log but couldn’t find any log related to this error.

Can anyone tell me what this error actually means and how I can debug it further?


Hi Krishan,

Can you please post the log after setting loggings (by referencing



Hi @Jae,

I am not sure what I need to do here. Can you please be more specific?



It looks like SDK’s sent the prepared name and encoded_plan for execution. But prepared name sent doesn’t match with the prepared name inside encoded_plan. Due to that it return error. cc @marcoeg


@vsr1, Is there any way I can retrieve the encoded plan that is being sent by SDK?
Also, can you explain the flow of execution as well? I am interested in how this works internally so that I can visualize the issue in a better way.

FYI- Couchbase version : 5.5 Enterprise


Hi @krishan.jangid - I’m having a look at the code and try to repro (even though so far a reproduction has eluded me), bear with me and I’ll have some news soon…



Actually, I have found the issue by code inspection.
I have logged MB-31270.


Hi @Marco_Greco, any update on this?


I was going to reply today. Fixed during the weekend, you’ll get it in 5.5.2


By when will this version be available?


If all goes well, it should be GA in a couple of weeks.