When you are creating your resume, you don’t need to put every random job you’ve ever had. What companies do is they look at your jobs on the resume, and at most call the employer and ask them if you worked for them and how you did at the job.
There is no way for a non government employee to know if you worked other jobs. Keep off any jobs that you worked at for less than 2 years and use every skill you learned as a skill for your resume.
Nothing hurts your resume more than having 3 or 4 jobs in a span of 2 years because it shows you are unreliable.
This also depends on the country and the industry. For many American jobs these days, your previous employer might be opening themselves up to a lawsuit if they said anything bad about you, so many companies now will at most identify the duration of your employment and your job title but nothing else.
The point is not that a former employee would necessarily win a lawsuit, but they could bring one and the legal bills alone would be significant, therefore many company lawyers will say to just shut the hell up when asked any questions about performance.