Remember that the pseudo-*sql query results are inconsistent

Source: Internet
Author: User

The debug code finds that the same method is called at the end of two operations. The incoming parameters are consistent and the query results are inconsistent.

Directly say the cause of the problem: My two operations are AOP surround notification first get the incoming parameters, verify whether you need to insert data into another table. The second invocation of core logic

Object RetVal = Pjp.proceed ();

, the CheckStatus is set to 1, so the number of results queried before the core logic is 0.

Two times separately printed SQL, and enter parameters, and results

[DEBUG] [2017-10-25 20:48:27,888] [Http-nio-8080-exec-1] []-[==> preparing:select ID, name, code, Programcode, Seriescode,
Seriesname, Showid, type, source, SourceID, CPName, Cpcode, status, CheckStatus, Checkcontent, Downloadstatus, transcodes Tatus,
Overallbitrate, Duration, Bitratemode, FilePath, FileSize, FileFormat, Playurl, Videoformat, videobitrate, width, height , Framerate,
BitDepth, Audioformat, Audiobitrate, Samplingrate, ScanType, MD5, priority, Cpcontentid, Cdnstatus, Cdndesc, Domaincode, DomainName,
Offlinereason, Checktime, Createtime, Updatetime,transcodeid,videotype,iscompleted,completereason from T_movie where Type=0 and
Programcode=? and Checkstatus=1 and downloadstatus=2][debug] [2017-10-25 20:48:27,889] [http-nio-8080-exec-1] []-[==> Parameters: 23000022017102510572300001 (String)][debug] [2017-10-25 20:48:27,892] [http-nio-8080-exec-1] []-[<= = Total:1]
[DEBUG] [2017-10-25 20:50:08,957] [Http-nio-8080-exec-9] []-[==> preparing:select ID, name, code, Programcode, Seriescode,
Seriesname, Showid, type, source, SourceID, CPName, Cpcode, status, CheckStatus, Checkcontent, Downloadstatus, transcodes Tatus,
Overallbitrate, Duration, Bitratemode, FilePath, FileSize, FileFormat, Playurl, Videoformat, videobitrate, width, height , Framerate,
BitDepth, Audioformat, Audiobitrate, Samplingrate, ScanType, MD5, priority, Cpcontentid, Cdnstatus, Cdndesc, Domaincode, DomainName,
Offlinereason, Checktime, Createtime, Updatetime,transcodeid,videotype,iscompleted,completereason from T_movie where Type=0 and
Programcode=? and Checkstatus=1 and downloadstatus=2][debug] [2017-10-25 20:50:08,958] [http-nio-8080-exec-9] []-[==> Parameters: 23000022017102510572300001 (String)][debug] [2017-10-25 20:50:08,960] [http-nio-8080-exec-9] []-[<= = Total:0]

Remember that the pseudo-*sql query results are inconsistent

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.