CN106325902A - Database software upgrading detection method and apparatus - Google Patents

Database software upgrading detection method and apparatus Download PDF

Info

Publication number
CN106325902A
CN106325902A CN201510354661.9A CN201510354661A CN106325902A CN 106325902 A CN106325902 A CN 106325902A CN 201510354661 A CN201510354661 A CN 201510354661A CN 106325902 A CN106325902 A CN 106325902A
Authority
CN
China
Prior art keywords
statement
software
database
change
tested
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201510354661.9A
Other languages
Chinese (zh)
Other versions
CN106325902B (en
Inventor
郝志帅
姜野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201510354661.9A priority Critical patent/CN106325902B/en
Priority to PCT/CN2016/070439 priority patent/WO2016206361A1/en
Publication of CN106325902A publication Critical patent/CN106325902A/en
Application granted granted Critical
Publication of CN106325902B publication Critical patent/CN106325902B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating

Abstract

The invention provides a database software upgrading detection method and apparatus. The method comprises the steps of obtaining an upgrading program statement of a to-be-tested software database; intercepting a change statement in the upgrading program statement, wherein the change statement is a statement for converting an instance of a released software database into an instance of the to-be-tested software database; obtaining an initialized statement of the released software database; extracting database table and field information corresponding to a database table name in the change statement from the initialized statement, wherein the database table and field information includes constraint information and field type information; and detecting whether the change statement is matched with the field type information or not after detecting whether the execution of the change statement violates the constraint information or not. Therefore, the problems of low efficiency and high cost of database software upgrading testing are solved, the database software upgrading testing efficiency is improved, and the testing cost is reduced.

Description

Database software upgrade detection method and device
Technical field
The present invention relates to the communications field, in particular to a kind of database software upgrade detection method and device.
Background technology
, in running, can constantly there is new problem in computer software.Some is the fault that code vulnerabilities causes, and has Being that hardware environment changes the adaptability defect caused a bit, also some is the new demand that user in use proposes. These problems are typically solved to the version updated by software upgrading.On the other hand, in order to strengthen the competitiveness of software, It is also required to constantly upgrade to improve product.Therefore, software upgrading becomes increasingly necessary in later maintenance, the most often See, become an indispensable process in software life-cycle.
A series of versions that research and development of software is issued, general require higher version support from the upgrading of lowest version, here it is Software upgrading.Such as certain software has issued Version 1.0, Version 2.0,3.0 3 big versions of Version;For Version 1.0 has issued some patch releases, such as Version 1.0Service Pack 1, Version 1.0 the most respectively Service Pack2 etc.;Some patch releases are issued the most respectively for Version 2.0 and Version 3.0.With big version liter (putting aside patch release) as a example by Ji, this software Version newly developed 4.0 version needs to support that following upgrading path is surveyed Examination:
1. support to be upgraded to Version 4.0 from Version 1.0;
2. support to be upgraded to Version 4.0 from Version 2.0;
3. support to be upgraded to Version 4.0 from Version 3.0;
4. support to be upgraded to Version 2.0 from Version 1.0, then be upgraded to Version 4.0;
5. support to be upgraded to Version 3.0 from Version 2.0, then be upgraded to Version 4.0;
6. support to be upgraded to Version 3.0 from Version 1.0, then be upgraded to Version 4.0;
7. support to be upgraded to Version 2.0 from Version 1.0, then be upgraded to Version 3.0, then be upgraded to Version 4.0;
First three upgrading test path is obvious.Rear four kinds of paths are also actually needed, because brand-new installation Version 2.0 version and Version 2.0 version obtained from Version 1.0 upgrading can there are differences, although to visitor For family, this species diversity feels unconspicuous often, but often there are differences on database structure with data.From In it can be seen that along with released version is on the increase, edition upgrading test path will be more and more.Assume the most issued N (n >=1) individual software version (i.e. there is n source version), then when issuing (n+1)th software version, need test Upgrading path number be exactly C (n, 1)+C (n, 2)+C (n, 3)+...+C (n, n)=2^n-1.If it addition, the multiple behaviour of software support Make system and type of database to combine, such as in Windows+SQL Server/English, Linux+Oracle in/English, In Solaris+Oracle/English, then upgrading test path considers upper (ω represents test environment number) test environment again, Test path number of combinations just becomes as ω (2^n-1).Along with increasing of number of versions, test path number can be described as explosion type Increase.Meanwhile, edition upgrading test to be carried out, be required for through some processes (installation of source version software, source The generation of version software master data and a certain amount of historical data produce, uniformity test after escalation process, and upgrading Etc. several links), manpower puts into bigger with material resources.
In software upgrading based on data base, the upgrading test of data base is important link, is also that mistake is many simultaneously The region sent out.Database application test is database application test with the main distinction of regular software program test Need testing results use-case under database instance (database positioning), and test result is also relevant with database positioning. Identical database structure records the disparate databases state of formation at different pieces of information database data, and same test can be caused to use The different test outputs of example.But, due to upgrading test combination of paths number exponential increase, database positioning number of combinations also with Exponential increase, reality test in, cost is the highest.
For in correlation technique, the software upgrading testing efficiency of data base is low, the problem that cost is high, there is presently no effectively Solution.
Summary of the invention
The invention provides a kind of database software upgrade detection method and device, at least to solve data base in correlation technique Software upgrading testing efficiency low, problem that cost is high.
According to an aspect of the invention, it is provided a kind of database software upgrade detection method, including:
Obtain the ROMPaq statement of software database to be tested, intercept the change statement in described ROMPaq statement, institute State the statement that change statement is the example that example transitions is described software database to be tested having issued software database;
Obtain the initialization statement having issued software database, and extraction and described change statement from described initialization statement Database table that middle data base's table name is corresponding and field information, described database table and field information include: constraint letter Breath and field type information;
After whether the execution detecting described change statement violates described constraint information, detect described change statement whether Join described field type information.
Further, before intercepting the change statement in described ROMPaq statement,
Scanning whether described ROMPaq statement exists judgement statement, described judgement statement is for detecting described change statement Perform whether violate described constraint information;
If the described judgement statement existed, then whether the execution detecting described change statement violates described constraint information.
Further, the described software of issue having issued software database includes in described software database to be tested to be measured The active version software of software support;
The described version number having issued software and described software software to be tested uniquely determines.
Further, described initialization statement is that brand-new described software database application software to be tested needs of installing perform Database statement.
Further, described change statement includes at least one of:
Insert INSERT statement, delete DELETE statement, update UPDATE statement, create CREATE statement, Delete table DROP statement, revise ALTER statement.
Further, described constraint information includes at least one of: Primary key, foreign key constraint, unique UNIQUE Constraint, checks CHECK constraints, and default DEFAULT defines, it is allowed to null value;
Described field type information includes at least one of: field type, field Breadth Maximum.
According to another aspect of the present invention, additionally provide a kind of database software upgrading detection device, including:
First acquisition module, for obtaining the ROMPaq statement of software database to be tested, intercepts described ROMPaq language Change statement in Ju, described change statement is that to have issued the example transitions of software database be described software data to be tested The statement of the example in storehouse;
Second acquisition module, for obtaining the initialization statement having issued software database, and from described initialization statement Extract the database table corresponding with data base's table name in described change statement and field information, described database table and word Segment information includes: constraint information and field type information;
First detection module, after whether violating described constraint information in the execution detecting described change statement, detection Whether described change statement mates described field type information.
Further, described device also includes:
Judge module, is used for scanning whether described ROMPaq statement exists judgement statement, and described judgement statement is used for detecting Whether the execution of described change statement violates described constraint information;
Second detection module, if for the described judgement statement existed, then whether the execution detecting described change statement violates Described constraint information.
Further, the described software of issue having issued software database includes in described software database to be tested to be measured The active version software of software support;
The described version number having issued software and described software software to be tested uniquely determines.
Further, described initialization statement is that brand-new described software database application software to be tested needs of installing perform Database statement.
Further, described change statement includes at least one of:
Insert INSERT statement, delete DELETE statement, update UPDATE statement, create CREATE statement, Delete table DROP statement, revise ALTER statement.
Further, described constraint information includes at least one of: Primary key, foreign key constraint, unique UNIQUE Constraint, checks CHECK constraints, and default DEFAULT defines, it is allowed to null value;
Described field type information includes at least one of: field type, field Breadth Maximum.
By the present invention, obtain the ROMPaq statement of software database to be tested, intercept the change in this ROMPaq statement More statement, this change statement is the language of the example that example transitions is this software database to be tested having issued software database Sentence, obtains the initialization statement having issued software database, and extraction and number in this change statement from this initialization statement The database table corresponding according to storehouse table name and field information, this database table and field information include: constraint information and word Whether segment type information, after whether the execution detecting this change statement violates this constraint information, detect this change statement Mating this field type information, the software upgrading testing efficiency solving data base is low, and the problem that cost is high improves number According to the software upgrading testing efficiency in storehouse, reduce testing cost.
Accompanying drawing explanation
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, the present invention Schematic description and description be used for explaining the present invention, be not intended that inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the flow chart of a kind of database software upgrade detection method according to embodiments of the present invention;
Fig. 2 is the structured flowchart of a kind of database software upgrading detection device according to embodiments of the present invention;
Fig. 3 is database software upgrade detection method overall flow schematic diagram according to the preferred embodiment of the invention;
Fig. 4 is to scan software database ROMPaq schematic flow sheet to be tested according to the preferred embodiment of the invention;
Fig. 5 is to scan according to the preferred embodiment of the invention to issue software data library initialization program circuit schematic diagram;
Fig. 6 is to change statement error testing process schematic diagram according to the preferred embodiment of the invention.
Detailed description of the invention
Below with reference to accompanying drawing and describe the present invention in detail in conjunction with the embodiments.It should be noted that in the feelings do not conflicted Under condition, the embodiment in the application and the feature in embodiment can be mutually combined.
It should be noted that term " first " in description and claims of this specification and above-mentioned accompanying drawing, " second " Etc. being for distinguishing similar object, without being used for describing specific order or precedence.
Providing a kind of database software upgrade detection method in the present embodiment, Fig. 1 is according to embodiments of the present invention Plant the flow chart of database software upgrade detection method, as it is shown in figure 1, this flow process comprises the steps:
Step S102, obtains the ROMPaq statement of software database to be tested, intercepts the change in this ROMPaq statement More statement, this change statement is the language of the example that example transitions is this software database to be tested having issued software database Sentence;
Step S104, obtains the initialization statement having issued software database, and extracts from this initialization statement and be somebody's turn to do Changing database table and field information that in statement, data base's table name is corresponding, this database table and field information include: Constraint information and field type information;
Step S106, after whether the execution detecting this change statement violates this constraint information, detects this change statement Whether mate this field type information.
By above-mentioned steps, obtain the ROMPaq statement of software database to be tested, intercept in this ROMPaq statement Change statement, this change statement is the example that example transitions is this software database to be tested having issued software database Statement, obtains the initialization statement having issued software database, and extracts from this initialization statement and in this change statement Database table that data base's table name is corresponding and field information, this database table and field information include: constraint information and Whether field type information, after whether the execution detecting this change statement violates this constraint information, detects this change statement Mating this field type information, the software upgrading testing efficiency solving data base is low, and the problem that cost is high improves number According to the software upgrading testing efficiency in storehouse, reduce testing cost.
In the present embodiment, scanning whether this ROMPaq statement exists judgement statement, this judgement statement is used for detecting this change Whether the execution of more statement violates this constraint information;
If this judgement statement existed, then whether the execution detecting this change statement violates this constraint information.
In the present embodiment, this software of issue having issued software database includes in this software database to be tested to be measured The active version software of software support, this version number having issued software and this software software to be tested uniquely determines.
In the present embodiment, this initialization statement is completely newly to install this software database application software to be tested to need to perform Database statement.
In the present embodiment, this change statement includes at least one of:
Insert INSERT statement, delete DELETE statement, update UPDATE statement, create CREATE statement, Delete table DROP statement, revise ALTER statement.
In the present embodiment, this constraint information includes at least one of: Primary key, foreign key constraint, unique UNIQUE Constraint, checks CHECK constraints, and default DEFAULT defines, it is allowed to null value;This field type information includes following At least one: field type, field Breadth Maximum.
Additionally providing a kind of database software upgrading detection device in the present embodiment, this device is used for realizing above-described embodiment And preferred implementation, carried out repeating no more of explanation.As used below, term " module " can be real The software of existing predetermined function and/or the combination of hardware.Although the device described by following example preferably comes real with software Existing, but hardware, or the realization of the combination of software and hardware also may and be contemplated.
Fig. 2 is the structured flowchart of a kind of database software upgrading detection device according to embodiments of the present invention, as in figure 2 it is shown, This device includes:
First acquisition module 22, for obtaining the ROMPaq statement of software database to be tested, intercepts this ROMPaq language Change statement in Ju, this change statement is that to have issued the example transitions of software database be this software database to be tested The statement of example;
Second acquisition module 24, for obtaining the initialization statement having issued software database, and from this initialization statement Extract the database table corresponding with data base's table name in this change statement and field information, this database table and field letter Breath includes: constraint information and field type information;
First detection module 26, after whether violating this constraint information in the execution detecting this change statement, detection should Whether change statement mates this field type information.
By said apparatus, obtain the ROMPaq statement of software database to be tested, intercept in this ROMPaq statement Change statement, this change statement is the example that example transitions is this software database to be tested having issued software database Statement, obtains the initialization statement having issued software database, and extracts from this initialization statement and in this change statement Database table that data base's table name is corresponding and field information, this database table and field information include: constraint information and Whether field type information, after whether the execution detecting this change statement violates this constraint information, detects this change statement Mating this field type information, the software upgrading testing efficiency solving data base is low, and the problem that cost is high improves number According to the software upgrading testing efficiency in storehouse, reduce testing cost.
In the present embodiment, this device also includes:
Judge module, is used for scanning whether this ROMPaq statement exists judgement statement, and this judgement statement is used for detecting this change Whether the execution of more statement violates this constraint information;
Second detection module, if for this judgement statement existed, then whether the execution detecting this change statement violates this about Bundle information.
Below in conjunction with preferred embodiment and embodiment, the present invention is described in detail.
This preferred embodiment provides a kind of database software upgrade detection method, it is not necessary to dynamic construction upgrading test environment, Simple to operate, low cost, speed can find the fault that database upgrade program exists soon, improve DBAS upgrading Testing efficiency.
The method need not dynamically prepare upgrading test environment just can find database upgrade program error in advance.Make mistake Found as early as possible, reduced testing cost simultaneously, improve accurate testing degree.The method comprises the following steps:
1) obtain software database ROMPaq statement to be tested, in described change statement, get data base's table name.
2) obtain issued software database initialization statement, obtaining step 1) data base's table name correspondence table of obtaining and Field information.
3) detecting step 1) whether there is judgement statement before the change statement that obtains, it is judged that and statement purpose is to check this change Whether the execution of more statement violates step 2) the correspondence database table that obtains and field constraint information;Detecting step 1) To change statement whether violate step 2) each field type information of correspondence database table that obtains.
Above-mentioned database software upgrade detection method, described step 1) it is by database instance about databases comparison statement It is changed into the statement of another kind of example state from a kind of state, is namely new by issuing software database example transitions The statement of software database example to be tested.Change statement is the core content of database upgrade program statement;Described step 1) database upgrade program statement information will be used for step 3) detection process.
Above-mentioned database software upgrade detection method, described step 2) can be that software to be tested needs about issuing software Support the active version software of upgrading, it is possible to use software version number uniquely determines;Described step 2) about data Library initialization statement is the database statement that brand-new installation database application software needs to perform;Described step 2) data base Table and field information will be used for step 3) detection process.
Above-mentioned database software upgrade detection method, described step 3) about judging that statement is that a kind of selectivity judges, also That is if it is determined that statement result is true, then perform databases comparison statement thereafter;If it is determined that statement result is false, The most do not perform databases comparison statement thereafter.To guarantee the correct execution of databases comparison statement.
Fig. 3 is database software upgrade detection method overall flow schematic diagram according to the preferred embodiment of the invention, such as Fig. 3 Shown in, including three steps:
Step 1: for the DBAS version to be tested of input, obtain its database upgrade programing change statement.
Specifically, described database program language can be any one SQL (SQL), data base Can be all relevant databases.Described database upgrade programing change statement include INSERT, DELETE, UPDATE, CREATE, DROP, ALTER statement.Need not DBAS to be tested is installed, only need DBAS file to be tested is provided.
Fig. 4 is to scan software database ROMPaq schematic flow sheet to be tested according to the preferred embodiment of the invention, such as figure Shown in 4, Fig. 4 is the schematic flow sheet of above-mentioned steps 1.Including four steps:
Step 401: for the DBAS version to be tested of input, scan its ROMPaq.Described upgrading journey Sequence is exactly the collection of programs that this software needed to perform when software version has been issued in upgrading.
Step 402: obtain database upgrade program statement in ROMPaq.Database upgrade program statement is in step 3 Middle will reuse.
Step 403: obtain database upgrade programing change statement.
Step 404: interception database table name in database upgrade programing change statement.Described intercepting process is according to structure Change query language grammatical rules.
For example, if in the database upgrade statement set obtained after scanning ROMPaq, there is a change statement insert into PM_NEPODEF_TABLE(MOCID,NETYPEID,POID,PONAME,PODES, POTABLENAME) values (' an_port', ' ZXDSL9852V', ' 50009', ' IGMP port statistics ', ' IGMP port Statistics ', ' ZXDSL9852V_50009'), according to grammatical rules " INSERT INTO table (columns) VALUES (columns Values) ", table name PM_NEPODEF_TABLE can be extracted, and this change statement will be comprised All database upgrade program statement set store for future use.
Step 2: for the published data storehouse application software of input, obtains data base's initialization statement.
Specifically, described published data storehouse application software can be any one needs issued to be tested should Source version with software support upgrading.Described data base initializes program statement and installs this version application software process for brand-new The database program statement of middle original execution.Need not published data storehouse application software is installed, it is only necessary to provide and issue DBAS file, positions version according to version number.
Fig. 5 is to scan according to the preferred embodiment of the invention to issue software data library initialization program circuit schematic diagram, as Shown in Fig. 5, Fig. 5 is the schematic flow sheet of step 2.Including three steps:
Step 501: for the published data storehouse application software of input, scan its installation procedure.Described installation procedure is just It it is this software collection of programs that needs perform when initial installation.
Step 502: the initialization journey of the data base's table name beam search acquisition table obtained according to step 1 in installation procedure Sequence.
Step 503: extracted data storehouse table and field information, including constraint information and field type information.Described constraint letter Breath includes Primary key, foreign key constraint, UNIQUE constraints, CHECK constraints, DEFAULT definition, allows sky Value;Described field type information includes field type, field Breadth Maximum.Described database table and field information will be used for Step 3.
For example, scanning obtains published data storehouse application of software data library initialization program statement, according to database table The relevant program statement that initializes of name PM_NEPODEF_TABLE locking is:
According to grammatical rules, extracting constraint information and field type information, final result such as table 1 below is shown:
Table 1
Step 3: whether there is correct judgement, the change that detecting step 1 obtains before the change statement that detecting step 1 obtains Whether more statement violates data base's initialization statement that step 2 obtains.
Specifically, described judgement statement can be to judge statement in arbitrary structures query language, and this statement result is true Or it is false, for whether controlling the execution of follow-up one section of statement.
Fig. 6 is to change statement error testing process schematic diagram, as shown in Figure 6, Fig. 6 according to the preferred embodiment of the invention For the schematic flow sheet of step 3, including two steps:
Step 601: before correspondence database change statement, search is in step 1 the data obtained qurush level program statement set No existence judges statement, it is judged that statement purpose is whether the execution checking this change statement violates the correspondence that step 2 obtains Database table and field constraint information.If it is present detect whether further to be effective in this change statement, say, that Judge whether it violates the constraint information of the table that step 2 obtains.
Step 602: detect in step 1 the data obtained storehouse change statement whether the field value being directed to obtains with step 2 To field type and field Breadth Maximum match.
For example, example INSERT INTO table (colums) VALUES (columnValues) changes statement error Detection.First, the change statement insert in testing data storehouse application software upgrade collection of programs PM_NEPODEF_TABLE(MOCID,NETYPEID,POID,PONAME,PODES, POTABLENAME) values (' an_port', ' ZXDSL9852V', ' 50009', ' IGMP port statistics ', ' IGMP port system Meter ', ' ZXDSL9852V_50009') whether front search exist judgement statement, such as if there is following statement:
If exists (select*from PM_NEPODEF_TABLE where NETYPEID='ZXDSL9852V' And MOCID='an_port'and POID='50009'and POTABLENAME='ZXDSL9852V_50009')
The most whether detection corresponding field comprises Primary key NETYPEID, MOCID, POID, POTABLENAME, and after whether corresponding field value the most consistent with field value type in change statement or the former comprises The scope of person.In described step, in addition it is also necessary to the field related in detection change statement The value that (MOCID, NETYPEID, POID, PONAME, PODES, POTABLENAME) is corresponding ' an_port', ' ZXDSL9852V', ' 50009', ' IGMP port statistics ', ' IGMP port statistics ', ' ZXDSL9852V_50009' type, On field width, field type information with table PM_NEPODEF_TABLE matches.
In sum, this preferred embodiment provide one rapidly, need not dynamically install and build test environment, can carry The static test of front discovery DBAS ROMPaq mistake.Reduce to a certain extent due to upgrading road The risk that the high cost test that footpath explosive growth causes puts into, for discovery procedure mistake as early as possible, software version of upgrading as early as possible Originally introduce to the market and provide guarantee.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive according to above-described embodiment Method can add the mode of required general hardware platform by software and realize, naturally it is also possible to by hardware, but a lot In the case of the former is more preferably embodiment.Based on such understanding, technical scheme is the most in other words to existing The part having technology to contribute can embody with the form of software product, and this computer software product is stored in one In storage medium (such as ROM/RAM, magnetic disc, CD), including some instructions with so that a station terminal equipment (can To be mobile phone, computer, server, or the network equipment etc.) perform the method described in each embodiment of the present invention.
Embodiments of the invention additionally provide a kind of storage medium.Alternatively, in the present embodiment, above-mentioned storage medium can To be arranged to storage for the program code performing above-described embodiment method step:
Alternatively, in the present embodiment, above-mentioned storage medium can include but not limited to: USB flash disk, read only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), portable hard drive, The various medium that can store program code such as magnetic disc or CD.
Alternatively, in the present embodiment, processor performs above-described embodiment according to the program code stored in storage medium Method step.
Obviously, those skilled in the art should be understood that each module of the above-mentioned present invention or each step can be with general Calculating device to realize, they can concentrate on single calculating device, or be distributed in multiple calculating device and formed Network on, alternatively, they can realize, it is thus possible to by them with calculating the executable program code of device Storage is performed by calculating device in the storage device, and in some cases, can hold with the order being different from herein Step shown or described by row, or they are fabricated to respectively each integrated circuit modules, or by many in them Individual module or step are fabricated to single integrated circuit module and realize.So, the present invention is not restricted to any specific hardware Combine with software.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for the technology of this area For personnel, the present invention can have various modifications and variations.All within the spirit and principles in the present invention, that is made is any Amendment, equivalent, improvement etc., should be included within the scope of the present invention.

Claims (12)

1. a database software upgrade detection method, it is characterised in that including:
Obtain the ROMPaq statement of software database to be tested, intercept the change statement in described ROMPaq statement, Described change statement is the example that example transitions is described software database to be tested having issued software database Statement;
Obtain the initialization statement having issued software database, and extraction and described change from described initialization statement Database table that in statement, data base's table name is corresponding and field information, described database table and field information include: Constraint information and field type information;
After whether the execution detecting described change statement violates described constraint information, detecting described change statement is The described field type information of no coupling.
Method the most according to claim 1, it is characterised in that intercept the change statement in described ROMPaq statement it Before,
Scanning whether described ROMPaq statement exists judgement statement, described judgement statement is used for detecting described change language Whether the execution of sentence violates described constraint information;
If the described judgement statement existed, then whether the execution detecting described change statement violates described constraint information.
Method the most according to claim 1, it is characterised in that also include,
The described software of issue having issued software database includes software under testing in described software database to be tested The active version software supported;
The described version number having issued software and described software software to be tested uniquely determines.
Method the most according to claim 1, it is characterised in that also include,
Described initialization statement is the brand-new data installing the needs execution of described software database application software to be tested Storehouse statement.
5. according to the method described in any one of Claims 1-4, it is characterised in that described change statement include following at least One of:
Insert INSERT statement, delete DELETE statement, update UPDATE statement, create CREATE statement, Delete table DROP statement, revise ALTER statement.
Method the most according to claim 5, it is characterised in that also include,
Described constraint information includes at least one of: Primary key, foreign key constraint, unique UNIQUE constraints, Checking CHECK constraints, default DEFAULT defines, it is allowed to null value;
Described field type information includes at least one of: field type, field Breadth Maximum.
7. a database software upgrading detection device, it is characterised in that including:
First acquisition module, for obtaining the ROMPaq statement of software database to be tested, intercepts described upgrading journey Change statement in sequence statement, described change statement is that to have issued the example transitions of software database be described to be tested The statement of the example of software database;
Second acquisition module, for obtaining the initialization statement having issued software database, and from described initialization language The database table corresponding with data base's table name in described change statement and field information, described data base is extracted in Ju Table and field information include: constraint information and field type information;
First detection module, after whether violating described constraint information in the execution detecting described change statement, Detect whether described change statement mates described field type information.
Device the most according to claim 7, it is characterised in that described device also includes:
Judge module, is used for scanning whether described ROMPaq statement exists judgement statement, and described judgement statement is used for Whether the execution detecting described change statement violates described constraint information;
Whether second detection module, if for the described judgement statement existed, then detecting the execution of described change statement Violate described constraint information.
Device the most according to claim 7, it is characterised in that also include,
The described software of issue having issued software database includes software under testing in described software database to be tested The active version software supported;
The described version number having issued software and described software software to be tested uniquely determines.
Device the most according to claim 7, it is characterised in that also include,
Described initialization statement is the brand-new data installing the needs execution of described software database application software to be tested Storehouse statement.
11. according to the device described in any one of claim 7 to 10, it is characterised in that described change statement include with down to One of few:
Insert INSERT statement, delete DELETE statement, update UPDATE statement, create CREATE statement, Delete table DROP statement, revise ALTER statement.
12. devices according to claim 10, it is characterised in that also include,
Described constraint information includes at least one of: Primary key, foreign key constraint, unique UNIQUE constraints, Checking CHECK constraints, default DEFAULT defines, it is allowed to null value;
Described field type information includes at least one of: field type, field Breadth Maximum.
CN201510354661.9A 2015-06-24 2015-06-24 Database software upgrade detection method and device Active CN106325902B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201510354661.9A CN106325902B (en) 2015-06-24 2015-06-24 Database software upgrade detection method and device
PCT/CN2016/070439 WO2016206361A1 (en) 2015-06-24 2016-01-07 Method and device for detecting software upgrade of database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510354661.9A CN106325902B (en) 2015-06-24 2015-06-24 Database software upgrade detection method and device

Publications (2)

Publication Number Publication Date
CN106325902A true CN106325902A (en) 2017-01-11
CN106325902B CN106325902B (en) 2020-09-15

Family

ID=57584565

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510354661.9A Active CN106325902B (en) 2015-06-24 2015-06-24 Database software upgrade detection method and device

Country Status (2)

Country Link
CN (1) CN106325902B (en)
WO (1) WO2016206361A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107179926A (en) * 2017-04-28 2017-09-19 国家电网公司 Database software upgrading detecting system and method based on dynamic programming algorithm
CN110659293A (en) * 2019-09-24 2020-01-07 支付宝(杭州)信息技术有限公司 Data table determining method and device based on change codes
CN110865829A (en) * 2018-08-28 2020-03-06 北京京东金融科技控股有限公司 Database upgrading method, system, device and storage medium
CN113741931A (en) * 2021-08-18 2021-12-03 苏州浪潮智能科技有限公司 Software upgrading method and device, electronic equipment and readable storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111221551B (en) * 2019-10-29 2023-10-31 中盈优创资讯科技有限公司 Database upgrading method and device
CN116700763B (en) * 2023-08-07 2023-10-27 长扬科技(北京)股份有限公司 Version upgrading method and device for Clickhouse database

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1971556A (en) * 2005-11-26 2007-05-30 华为技术有限公司 System and method to realize database upgrading in background management system
US20110218983A1 (en) * 2000-05-22 2011-09-08 Realnetworks, Inc. System and method of organizing and editing metadata
CN102402559A (en) * 2010-09-16 2012-04-04 中兴通讯股份有限公司 Database upgrade script generating method and device
CN102890720A (en) * 2012-10-16 2013-01-23 南京通达海信息技术有限公司 Database inspection and maintenance method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080306986A1 (en) * 2007-06-08 2008-12-11 Accenture Global Services Gmbh Migration of Legacy Applications
CN101650663A (en) * 2009-08-27 2010-02-17 中兴通讯股份有限公司 Database system and upgrading method thereof
CN101789021A (en) * 2010-02-24 2010-07-28 浪潮通信信息系统有限公司 Universal configurable database data migration method
CN104216724B (en) * 2013-06-03 2018-01-02 阿里巴巴集团控股有限公司 A kind of method and system of web application interface upgrade
CN104679527B (en) * 2013-11-26 2017-12-01 中国银联股份有限公司 Virtual machine image upgraded in offline method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110218983A1 (en) * 2000-05-22 2011-09-08 Realnetworks, Inc. System and method of organizing and editing metadata
CN1971556A (en) * 2005-11-26 2007-05-30 华为技术有限公司 System and method to realize database upgrading in background management system
CN102402559A (en) * 2010-09-16 2012-04-04 中兴通讯股份有限公司 Database upgrade script generating method and device
CN102890720A (en) * 2012-10-16 2013-01-23 南京通达海信息技术有限公司 Database inspection and maintenance method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107179926A (en) * 2017-04-28 2017-09-19 国家电网公司 Database software upgrading detecting system and method based on dynamic programming algorithm
CN110865829A (en) * 2018-08-28 2020-03-06 北京京东金融科技控股有限公司 Database upgrading method, system, device and storage medium
CN110865829B (en) * 2018-08-28 2024-04-16 京东科技控股股份有限公司 Database upgrading method, system, equipment and storage medium
CN110659293A (en) * 2019-09-24 2020-01-07 支付宝(杭州)信息技术有限公司 Data table determining method and device based on change codes
CN110659293B (en) * 2019-09-24 2022-02-11 支付宝(杭州)信息技术有限公司 Data table determining method and device based on change codes
CN113741931A (en) * 2021-08-18 2021-12-03 苏州浪潮智能科技有限公司 Software upgrading method and device, electronic equipment and readable storage medium
CN113741931B (en) * 2021-08-18 2023-07-25 苏州浪潮智能科技有限公司 Software upgrading method and device, electronic equipment and readable storage medium

Also Published As

Publication number Publication date
WO2016206361A1 (en) 2016-12-29
CN106325902B (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN106325902A (en) Database software upgrading detection method and apparatus
CN105580032B (en) For reducing instable method and system when upgrading software
CN103473506B (en) For the method and apparatus identifying malice APK file
US9405667B1 (en) Systems and methods for testing a software application
CN111459799B (en) Software defect detection model establishing and detecting method and system based on Github
JP2020510925A (en) Method and apparatus for performing a test using a test case
US9361134B2 (en) Validating translations of externalized content for inclusion in an application
US20070294179A1 (en) Discovering software code subject to licenses
CN110427375B (en) Method and device for identifying field type
CN105868050A (en) Verification method and device based on JSON data
Bidin et al. A lack of close binaries among hot horizontal branch stars in globular clusters-II. NGC 2808
CN102567565B (en) Cable parameter processing method and system utilizing same
CN104537308A (en) System and method for providing application security auditing function
CN103914379B (en) Fault is automatically injected the method with fault detect and system thereof
CN103955429B (en) Determine the method and device of regression test scope
CN114237466B (en) Inspection point configuration method and device
Guaita et al. The VANDELS survey: Discovery of massive overdensities of galaxies at z> 2-Location of Lyα-emitting galaxies with respect to environment
JP6419667B2 (en) Test DB data generation method and apparatus
CN105045715A (en) Programming mode and mode matching based bug clustering method
KR20200096766A (en) Method and system for verifying license of open source software
US8055470B2 (en) Simulated bucket testing
KR102097579B1 (en) Method and system for extracting abnormal road data from road network based on path search failure log
CN107092557A (en) A kind of database schema upgrade script verification method and device
D’Amato et al. A deep 1.4 GHz survey of the J1030 equatorial field: A new window on radio source populations across cosmic time
CN107179926A (en) Database software upgrading detecting system and method based on dynamic programming algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant