Commit 7ffc71e
authored
Fix gaps / inconsistencies in BACKUP / RESTORE device type (microsoft#40)
* Fix gaps / inconsistencies in BACKUP / RESTORE device type
Originally created just to fix microsoft#29, but in the process fixed subtle
issues with VirtualDevice and DatabaseSnapshot device types as well.
* Add the URL device type for use with BACKUP and RESTORE statements for
110 parser and above. URL backups were introduced with SQL Server 2012.
Also updated the ScriptGenerator to ensure URL devices are correctly
scripted.
* Add version constraints for device types DatabaseSnapshot and
VirtualDevice, both of which are only supported for SQL 2005+.
* Remove dead code related to Disk device type in grammar 90 and above.
In all grammars other than 80, the different device types are handled
by the DeviceTypesHelper class, so the special case in the grammar
for Disk device type was never used. In 80 grammar though, the Disk
device type is not treated as an indentifier and hence the special
case for Disk is still needed.
* Add regression tests for device types URL, VIRTUAL_DEVICE and
DATABASE_SNAPSHOT and for good measure, DISK as well.
* Address code review comments1 parent aa1dd2b commit 7ffc71e
13 files changed
Lines changed: 175 additions & 44 deletions
File tree
- SqlScriptDom
- Parser/TSql
- ScriptDom/SqlServer/ScriptGenerator
- Test/SqlDom
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3149 | 3149 | | |
3150 | 3150 | | |
3151 | 3151 | | |
3152 | | - | |
3153 | | - | |
3154 | | - | |
3155 | | - | |
3156 | | - | |
| 3152 | + | |
3157 | 3153 | | |
3158 | 3154 | | |
3159 | 3155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3855 | 3855 | | |
3856 | 3856 | | |
3857 | 3857 | | |
3858 | | - | |
3859 | | - | |
3860 | | - | |
3861 | | - | |
3862 | | - | |
| 3858 | + | |
3863 | 3859 | | |
3864 | 3860 | | |
3865 | 3861 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3965 | 3965 | | |
3966 | 3966 | | |
3967 | 3967 | | |
3968 | | - | |
3969 | | - | |
3970 | | - | |
3971 | | - | |
3972 | | - | |
| 3968 | + | |
3973 | 3969 | | |
3974 | 3970 | | |
3975 | 3971 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4833 | 4833 | | |
4834 | 4834 | | |
4835 | 4835 | | |
4836 | | - | |
4837 | | - | |
4838 | | - | |
4839 | | - | |
4840 | | - | |
| 4836 | + | |
4841 | 4837 | | |
4842 | 4838 | | |
4843 | 4839 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5189 | 5189 | | |
5190 | 5190 | | |
5191 | 5191 | | |
5192 | | - | |
5193 | | - | |
5194 | | - | |
5195 | | - | |
5196 | | - | |
| 5192 | + | |
5197 | 5193 | | |
5198 | 5194 | | |
5199 | 5195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5712 | 5712 | | |
5713 | 5713 | | |
5714 | 5714 | | |
5715 | | - | |
5716 | | - | |
5717 | | - | |
5718 | | - | |
5719 | | - | |
| 5715 | + | |
5720 | 5716 | | |
5721 | 5717 | | |
5722 | 5718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5737 | 5737 | | |
5738 | 5738 | | |
5739 | 5739 | | |
5740 | | - | |
5741 | | - | |
5742 | | - | |
5743 | | - | |
5744 | | - | |
| 5740 | + | |
5745 | 5741 | | |
5746 | 5742 | | |
5747 | 5743 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1259 | 1259 | | |
1260 | 1260 | | |
1261 | 1261 | | |
1262 | | - | |
| 1262 | + | |
1263 | 1263 | | |
1264 | 1264 | | |
1265 | 1265 | | |
| |||
0 commit comments