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
c0cea540
Commit
c0cea540
authored
Aug 26, 2003
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into narttu.mysql.fi:/my/mysql-4.1 sql/sql_yacc.yy: Auto merged
parents
3b799e8f
c01d65bc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
42 deletions
+39
-42
mysql-test/t/loaddata.test
mysql-test/t/loaddata.test
+0
-4
mysys/my_malloc.c
mysys/my_malloc.c
+17
-17
mysys/my_realloc.c
mysys/my_realloc.c
+17
-16
sql/sql_yacc.yy
sql/sql_yacc.yy
+3
-0
sql/table.cc
sql/table.cc
+2
-5
No files found.
mysql-test/t/loaddata.test
View file @
c0cea540
...
...
@@ -15,7 +15,3 @@ truncate table t1;
load
data
infile
'../../std_data/loaddata1.dat'
into
table
t1
fields
terminated
by
','
LINES
STARTING
BY
','
(
b
,
c
,
d
);
SELECT
*
from
t1
;
drop
table
t1
;
mysys/my_malloc.c
View file @
c0cea540
...
...
@@ -24,26 +24,26 @@
/* My memory allocator */
gptr
my_malloc
(
unsigned
int
Size
,
myf
MyF
lags
)
gptr
my_malloc
(
unsigned
int
size
,
myf
my_f
lags
)
{
gptr
point
;
DBUG_ENTER
(
"my_malloc"
);
DBUG_PRINT
(
"my"
,(
"
Size: %u MyFlags: %d"
,
Size
,
MyF
lags
));
DBUG_PRINT
(
"my"
,(
"
size: %u my_flags: %d"
,
size
,
my_f
lags
));
if
(
!
S
ize
)
S
ize
=
1
;
/* Safety */
if
((
point
=
(
char
*
)
malloc
(
S
ize
))
==
NULL
)
if
(
!
s
ize
)
s
ize
=
1
;
/* Safety */
if
((
point
=
(
char
*
)
malloc
(
s
ize
))
==
NULL
)
{
my_errno
=
errno
;
if
(
MyF
lags
&
MY_FAE
)
if
(
my_f
lags
&
MY_FAE
)
error_handler_hook
=
fatal_error_handler_hook
;
if
(
MyF
lags
&
(
MY_FAE
+
MY_WME
))
my_error
(
EE_OUTOFMEMORY
,
MYF
(
ME_BELL
+
ME_WAITTANG
),
S
ize
);
if
(
MyF
lags
&
MY_FAE
)
if
(
my_f
lags
&
(
MY_FAE
+
MY_WME
))
my_error
(
EE_OUTOFMEMORY
,
MYF
(
ME_BELL
+
ME_WAITTANG
),
s
ize
);
if
(
my_f
lags
&
MY_FAE
)
exit
(
1
);
}
else
if
(
MyF
lags
&
MY_ZEROFILL
)
bzero
(
point
,
S
ize
);
else
if
(
my_f
lags
&
MY_ZEROFILL
)
bzero
(
point
,
s
ize
);
DBUG_PRINT
(
"exit"
,(
"ptr: %lx"
,
point
));
DBUG_RETURN
(
point
);
}
/* my_malloc */
...
...
@@ -64,29 +64,29 @@ void my_no_flags_free(gptr ptr)
/* malloc and copy */
gptr
my_memdup
(
const
byte
*
from
,
uint
length
,
myf
MyF
lags
)
gptr
my_memdup
(
const
byte
*
from
,
uint
length
,
myf
my_f
lags
)
{
gptr
ptr
;
if
((
ptr
=
my_malloc
(
length
,
MyF
lags
))
!=
0
)
if
((
ptr
=
my_malloc
(
length
,
my_f
lags
))
!=
0
)
memcpy
((
byte
*
)
ptr
,
(
byte
*
)
from
,(
size_t
)
length
);
return
(
ptr
);
}
char
*
my_strdup
(
const
char
*
from
,
myf
MyF
lags
)
char
*
my_strdup
(
const
char
*
from
,
myf
my_f
lags
)
{
gptr
ptr
;
uint
length
=
(
uint
)
strlen
(
from
)
+
1
;
if
((
ptr
=
my_malloc
(
length
,
MyF
lags
))
!=
0
)
if
((
ptr
=
my_malloc
(
length
,
my_f
lags
))
!=
0
)
memcpy
((
byte
*
)
ptr
,
(
byte
*
)
from
,(
size_t
)
length
);
return
((
my_string
)
ptr
);
}
char
*
my_strdup_with_length
(
const
byte
*
from
,
uint
length
,
myf
MyF
lags
)
char
*
my_strdup_with_length
(
const
byte
*
from
,
uint
length
,
myf
my_f
lags
)
{
gptr
ptr
;
if
((
ptr
=
my_malloc
(
length
+
1
,
MyF
lags
))
!=
0
)
if
((
ptr
=
my_malloc
(
length
+
1
,
my_f
lags
))
!=
0
)
{
memcpy
((
byte
*
)
ptr
,
(
byte
*
)
from
,(
size_t
)
length
);
((
char
*
)
ptr
)[
length
]
=
0
;
...
...
mysys/my_realloc.c
View file @
c0cea540
...
...
@@ -23,40 +23,41 @@
/* My memory re allocator */
gptr
my_realloc
(
gptr
oldpoint
,
uint
Size
,
myf
MyF
lags
)
gptr
my_realloc
(
gptr
oldpoint
,
uint
size
,
myf
my_f
lags
)
{
gptr
point
;
DBUG_ENTER
(
"my_realloc"
);
DBUG_PRINT
(
"my"
,(
"ptr: %lx Size: %u MyFlags: %d"
,
oldpoint
,
Size
,
MyFlags
));
DBUG_PRINT
(
"my"
,(
"ptr: %lx size: %u my_flags: %d"
,
oldpoint
,
size
,
my_flags
));
if
(
!
oldpoint
&&
(
MyF
lags
&
MY_ALLOW_ZERO_PTR
))
DBUG_RETURN
(
my_malloc
(
Size
,
MyF
lags
));
if
(
!
oldpoint
&&
(
my_f
lags
&
MY_ALLOW_ZERO_PTR
))
DBUG_RETURN
(
my_malloc
(
size
,
my_f
lags
));
#ifdef USE_HALLOC
if
(
!
(
point
=
malloc
(
S
ize
)))
if
(
!
(
point
=
malloc
(
s
ize
)))
{
if
(
MyF
lags
&
MY_FREE_ON_ERROR
)
my_free
(
oldpoint
,
MyF
lags
);
if
(
MyF
lags
&
MY_HOLD_ON_ERROR
)
if
(
my_f
lags
&
MY_FREE_ON_ERROR
)
my_free
(
oldpoint
,
my_f
lags
);
if
(
my_f
lags
&
MY_HOLD_ON_ERROR
)
DBUG_RETURN
(
oldpoint
);
my_errno
=
errno
;
if
(
MyF
lags
&
MY_FAE
+
MY_WME
)
my_error
(
EE_OUTOFMEMORY
,
MYF
(
ME_BELL
+
ME_WAITTANG
),
S
ize
);
if
(
my_f
lags
&
MY_FAE
+
MY_WME
)
my_error
(
EE_OUTOFMEMORY
,
MYF
(
ME_BELL
+
ME_WAITTANG
),
s
ize
);
}
else
{
memcpy
(
point
,
oldpoint
,
S
ize
);
memcpy
(
point
,
oldpoint
,
s
ize
);
free
(
oldpoint
);
}
#else
if
((
point
=
(
char
*
)
realloc
(
oldpoint
,
S
ize
))
==
NULL
)
if
((
point
=
(
char
*
)
realloc
(
oldpoint
,
s
ize
))
==
NULL
)
{
if
(
MyF
lags
&
MY_FREE_ON_ERROR
)
if
(
my_f
lags
&
MY_FREE_ON_ERROR
)
my_free
(
oldpoint
,
MyFLAGS
);
if
(
MyF
lags
&
MY_HOLD_ON_ERROR
)
if
(
my_f
lags
&
MY_HOLD_ON_ERROR
)
DBUG_RETURN
(
oldpoint
);
my_errno
=
errno
;
if
(
MyF
lags
&
(
MY_FAE
+
MY_WME
))
my_error
(
EE_OUTOFMEMORY
,
MYF
(
ME_BELL
+
ME_WAITTANG
),
S
ize
);
if
(
my_f
lags
&
(
MY_FAE
+
MY_WME
))
my_error
(
EE_OUTOFMEMORY
,
MYF
(
ME_BELL
+
ME_WAITTANG
),
s
ize
);
}
#endif
DBUG_PRINT
(
"exit"
,(
"ptr: %lx"
,
point
));
...
...
sql/sql_yacc.yy
View file @
c0cea540
...
...
@@ -4380,6 +4380,7 @@ keyword:
| BOOL_SYM {}
| BOOLEAN_SYM {}
| BYTE_SYM {}
| BTREE_SYM {}
| CACHE_SYM {}
| CHANGED {}
| CHARSET {}
...
...
@@ -4425,6 +4426,7 @@ keyword:
| GRANTS {}
| GLOBAL_SYM {}
| HANDLER_SYM {}
| HASH_SYM {}
| HEAP_SYM {}
| HELP_SYM {}
| HOSTS_SYM {}
...
...
@@ -4507,6 +4509,7 @@ keyword:
| ROWS_SYM {}
| ROW_FORMAT_SYM {}
| ROW_SYM {}
| RTREE_SYM {}
| SAVEPOINT_SYM {}
| SECOND_SYM {}
| SERIAL_SYM {}
...
...
sql/table.cc
View file @
c0cea540
...
...
@@ -1207,17 +1207,14 @@ bool get_field(MEM_ROOT *mem, Field *field, String *res)
char
*
get_field
(
MEM_ROOT
*
mem
,
Field
*
field
)
{
char
buff
[
MAX_FIELD_WIDTH
]
,
*
to
;
char
buff
[
MAX_FIELD_WIDTH
];
String
str
(
buff
,
sizeof
(
buff
),
&
my_charset_bin
);
uint
length
;
field
->
val_str
(
&
str
,
&
str
);
if
(
!
(
length
=
str
.
length
()))
return
NullS
;
to
=
(
char
*
)
alloc_root
(
mem
,
length
+
1
);
memcpy
(
to
,
str
.
ptr
(),
(
uint
)
length
);
to
[
length
]
=
0
;
return
to
;
return
strmake_root
(
mem
,
str
.
ptr
(),
length
);
}
...
...
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