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
7f1ffcc4
Commit
7f1ffcc4
authored
Aug 21, 2003
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #1064: SHOW CREATE TABLE: avoid allocations for simple tables, old client compatibility
parent
828789a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
sql/item.h
sql/item.h
+1
-0
sql/sql_show.cc
sql/sql_show.cc
+4
-2
No files found.
sql/item.h
View file @
7f1ffcc4
...
...
@@ -275,6 +275,7 @@ class Item_empty_string :public Item_string
public:
Item_empty_string
(
const
char
*
header
,
uint
length
)
:
Item_string
(
""
,
0
)
{
name
=
(
char
*
)
header
;
max_length
=
length
;}
void
make_field
(
Send_field
*
field
);
};
class
Item_varbinary
:
public
Item
...
...
sql/sql_show.cc
View file @
7f1ffcc4
...
...
@@ -564,7 +564,8 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
DBUG_RETURN
(
1
);
}
String
packet
;
char
buff
[
1024
];
String
packet
(
buff
,
sizeof
(
buff
));
packet
.
length
(
0
);
net_store_data
(
&
packet
,
table
->
table_name
);
/*
...
...
@@ -597,7 +598,8 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list)
List
<
Item
>
field_list
;
field_list
.
push_back
(
new
Item_empty_string
(
"Table"
,
NAME_LEN
));
field_list
.
push_back
(
new
Item_empty_string
(
"Create Table"
,
packet
.
length
()));
field_list
.
push_back
(
new
Item_empty_string
(
"Create Table"
,
max
(
packet
.
length
(),
1024
)));
// 1024 is for not to confuse old clients
if
(
send_fields
(
thd
,
field_list
,
1
))
DBUG_RETURN
(
1
);
...
...
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