Lines 13-31
Link Here
|
13 |
# file format change that may be used in the future to implement |
13 |
# file format change that may be used in the future to implement |
14 |
# "ALTER TABLE ... ADD COLUMN". |
14 |
# "ALTER TABLE ... ADD COLUMN". |
15 |
# |
15 |
# |
16 |
# $Id: alter3.test,v 1.3 2005/03/17 12:33:14 drh Exp $ |
16 |
# $Id: alter3.test,v 1.4 2005/03/27 01:56:31 danielk1977 Exp $ |
17 |
# |
17 |
# |
18 |
|
18 |
|
19 |
set testdir [file dirname $argv0] |
19 |
set testdir [file dirname $argv0] |
20 |
|
20 |
|
|
|
21 |
source $testdir/tester.tcl |
22 |
|
21 |
# If SQLITE_OMIT_ALTERTABLE is defined, omit this file. |
23 |
# If SQLITE_OMIT_ALTERTABLE is defined, omit this file. |
22 |
ifcapable !altertable { |
24 |
ifcapable !altertable { |
23 |
finish_test |
25 |
finish_test |
24 |
return |
26 |
return |
25 |
} |
27 |
} |
26 |
|
28 |
|
27 |
source $testdir/tester.tcl |
|
|
28 |
|
29 |
# Test Organisation: |
29 |
# Test Organisation: |
30 |
# ------------------ |
30 |
# ------------------ |
31 |
# |
31 |
# |
Lines 336-339
Link Here
|
336 |
} {1} |
336 |
} {1} |
337 |
} |
337 |
} |
338 |
|
338 |
|
|
|
339 |
# Ticket #1183 - Make sure adding columns to large tables does not cause |
340 |
# memory corruption (as was the case before this bug was fixed). |
341 |
do_test alter3-8.1 { |
342 |
execsql { |
343 |
CREATE TABLE t4(c1); |
344 |
} |
345 |
} {} |
346 |
do_test alter3-8.2 { |
347 |
set cols c1 |
348 |
for {set i 2} {$i < 100} {incr i} { |
349 |
execsql " |
350 |
ALTER TABLE t4 ADD c$i |
351 |
" |
352 |
lappend cols c$i |
353 |
} |
354 |
set ::sql "CREATE TABLE t4([join $cols {, }])" |
355 |
list |
356 |
} {} |
357 |
do_test alter3-8.2 { |
358 |
execsql { |
359 |
SELECT sql FROM sqlite_master WHERE name = 't4'; |
360 |
} |
361 |
} [list $::sql] |
362 |
|
339 |
finish_test |
363 |
finish_test |
|
|
364 |
|