Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
88822b35
Commit
88822b35
authored
Nov 29, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk@192.168.21.1:mysql-5.0
into mysql.com:/home/hf/work/mysql-5.0.14693 sql/sql_table.cc: Auto merged
parents
5b6a28d1
ae2dc309
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
mysql-test/r/alter_table.result
mysql-test/r/alter_table.result
+6
-0
mysql-test/t/alter_table.test
mysql-test/t/alter_table.test
+9
-0
sql/sql_table.cc
sql/sql_table.cc
+4
-1
No files found.
mysql-test/r/alter_table.result
View file @
88822b35
...
...
@@ -556,3 +556,9 @@ ERROR 3D000: No database selected
alter table test.t1 rename test.t1;
use test;
drop table t1;
create table t1 (mycol int(10) not null);
alter table t1 alter column mycol set default 0;
desc t1;
Field Type Null Key Default Extra
mycol int(10) NO 0
drop table t1;
mysql-test/t/alter_table.test
View file @
88822b35
...
...
@@ -401,3 +401,12 @@ use test;
drop
table
t1
;
# End of 4.1 tests
#
# Bug #14693 (ALTER SET DEFAULT doesn't work)
#
create
table
t1
(
mycol
int
(
10
)
not
null
);
alter
table
t1
alter
column
mycol
set
default
0
;
desc
t1
;
drop
table
t1
;
sql/sql_table.cc
View file @
88822b35
...
...
@@ -3400,7 +3400,10 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
my_error
(
ER_BLOB_CANT_HAVE_DEFAULT
,
MYF
(
0
),
def
->
change
);
DBUG_RETURN
(
TRUE
);
}
def
->
def
=
alter
->
def
;
// Use new default
if
((
def
->
def
=
alter
->
def
))
// Use new default
def
->
flags
&=
~
NO_DEFAULT_VALUE_FLAG
;
else
def
->
flags
|=
NO_DEFAULT_VALUE_FLAG
;
alter_it
.
remove
();
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment