At the heart of the legal mess that led to a mistrial in the Dennis Oland murder case is the unseemly notion of "jury shopping."

That's when the Crown uses otherwise private information about potential jurors to screen for qualities that may help its case.

On Tuesday, Justice Terrence Morrison of the New Brunswick Court of Queen's Bench declared a mistrial when he learned that a Saint John police officer used a police database to track all interactions would-be jurors had with police.

Some of that information was then passed along to the Crown during the jury selection process.

"That would leave an impression of potential bias that would taint the jury process itself and, potentially, the verdict that they might ultimately reach," said Wayne MacKay a law professor at Dalhousie University in Halifax.

"The key point is that a jury is supposed to be as objective as possible. They're supposed to make their decision strictly on the evidence provided to them. There's concern when there appears to be some attempt at what's called jury shopping. That's at the heart of this."

In a 2012 decision, the Supreme Court of Canada restricted police to checking only for criminal convictions -- an automatic disqualification for jury duty.

Defence lawyer Alan Gold said Tuesday he found it hard to understand how the Saint John force could not have known about the ruling.

"When the courts talk, the police have to listen," Gold said after the mistrial was granted.

"The cases in 2012 were notorious. They were landmark decisions. To find this island of ignorance here was a little shocking and surprising."

The Supreme Court decided in 2012 that prosecutors and police had acted improperly in three cases when they went beyond checking for convictions, although the misconduct was not serious enough to quash the convictions.

The defence argued that the Crown had obtained an unfair advantage by having police do extensive background checks.

In one case, Crown attorneys asked police in the Barrie, Ont., area to screen would-be jurors to see if they were "disreputable persons."

The Crown used the information, which was not turned over to defence lawyers, to exclude jurors who might have been less favourable to the prosecution, the defence argued.

Abby Deshman, director of the criminal justice program at the Canadian Civil Liberties Association, said Tuesday the Crown's obligation during jury selection is finding an impartial group.

"When the police go beyond looking for eligibility ... it brings the entire process into question and impacts fair trial rights," she said, adding that jurors' private lives are off limits.

"We have instances where an individual's mental health information was disclosed to the Crown," she said. "There's really a lot of private information in police databases. That information should stay private."

Gold's application for a mistrial in the Oland case argued that Const. Sean Rocca, the trial's file co-ordinator, had gained access to a database known as the Crime Management System (CMS) during the jury selection process.

"Const. Rocca confirmed that 'absolutely' during the jury selection process there were potential jurors that came forward where a CMS query led to discovering information about them," the application says.

None of this information was disclosed to the defence, but Rocca confirmed that he offered his "opinion from time to time" to the Crown.

Gold called it "serious misconduct," saying the Supreme Court had made it clear that jurors' privacy should be protected from police database searches.

"The jury selection process was invalidated and a gross unfairness was committed upon Dennis and the defence," Gold said.

In 2015, Oland was jailed for 10 months after a jury found him guilty of second-degree murder in the 2011 bludgeoning of his multi-millionaire father, businessman Richard Oland. Dennis Oland was released on bail last year after a court overturned the conviction and ordered a new trial.

The retrial is now expected to begin Wednesday in front of Morrison alone.